Or more perl-ishlyuse File::Basename; my @basenames = map basename($_), my @result = map { chomp; $_ } `find '.' -type f -print -name '*.pl'` or die "No scripts found - $! \n";
See. map, File::Basename and File::Find::Rule for more info.use File::Basename; use File::Find::Rule; my @basenames = map basename($_), my @result = find(file => name => "*.pl", in => ".") or die "No scripts found - $! \n";
_________
broquaint
In reply to Re: Using Basename
by broquaint
in thread Using Basename
by blueapache
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |