[ale] Perl Regexe questions
Fletch
fletch at phydeaux.org
Tue Jun 15 21:25:38 EDT 2004
>>>>> "Keith" == Keith R Watson <keith.watson at gtri.gatech.edu> writes:
[...]
Keith> use File::Basename;
Keith> my ($other_way, undef, undef) = fileparse($full_path,);
Keith> print ($other_way, "\n");
Actually my $name = basename( $full_path ) would probably be better
(not to mention the undefs are extraneous as any extra list elements
would just be dropped; a more succinct way would have been
my $path = ( fileparse( $full_path ) )[0];
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
| scary questions." -- Jules =(___)=
| U
More information about the Ale
mailing list