in reply to Re: Getting the filename from full path name ?
in thread Getting the filename from full path name ?
This is not a real solution - it is not portable. Please use File::Basename. Having said that...
Update: Thank you Chris, the code should be:my $a = "foo/bar/baz"; my ($file) = $a =~ /\/(.*?)$/;
my ($file) = $a =~ m|/([^/]+)$|;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Getting the filename from full path name ?
by tachyon (Chancellor) on Apr 15, 2004 at 05:14 UTC | |
|
Re: Re: Re: Getting the filename from full path name ?
by Anonymous Monk on Apr 15, 2004 at 05:01 UTC |