[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Perl Regexe questions
- Subject: [ale] Perl Regexe questions
- From: fletch at phydeaux.org (Fletch)
- Date: Tue Jun 15 21:25:38 2004
- In-reply-to: <[email protected]> (Keith R. Watson's message of "Tue, 15 Jun 2004 20:36:55 -0400")
- References: <[email protected]>
>>>>> "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