hi,
Here is the script which does what you require....
#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
require "find.pl";
# Traverse desired filesystems
&find('/');
exit;
sub wanted {
if (/^monitor$/)
{
print "File ->$File::Find::name<-\n";
}
}
__END__;
There is no magic in it. Actually, this script is
generated by find2perl script. For further details, go
through "perldoc File::Find" and
/usr/lib/perl5/find.pl. I hope this would suffice your
need.
Regards,
Guru Prasad.
--- Elanchezhian Sivanandam <elan@xxxxxxxxxxxx> wrote:
hi,
i want to find the hierarchial path of a file
inside a perl script.
the path can be found using the shell command
find [path] expression..
and assign to a variable in perl.
but it gives me a numerical value.
how to get it as a string?
thanks in advance.
--
cheers../elan
visit www.tamil.net for tamil fonts
_______________________________________________
To unsubscribe, email
ilugc-request@xxxxxxxxxxxxxxxxxx with
"unsubscribe <password> address"
in the subject or body of the message.
http://www.aero.iitm.ernet.in/mailman/listinfo/ilugc