in reply to Uploading Time
sure it's a cludge and there's a better way, but why split when you can just do:
$file="C:/aplle/index.htm"; $file=~ s/(.| )*\///; # delete everything(!) upto the last / print $file;
and to answer your question there AM, you have to escape a / if you use it in a regex because there are /'s as the separator. Naturally if your slash goes the other way (and there is no shame in that) you still have to escape it because perl thinks you are escaping the character after the \.
-phill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Uploading Time (getting last element of a variable)
by SarahM (Monk) on Jun 13, 2002 at 23:46 UTC | |
by thatguy (Parson) on Jun 13, 2002 at 23:52 UTC | |
by dsheroh (Monsignor) on Jun 14, 2002 at 18:21 UTC | |
Re^2: Uploading Time (getting last element of a path)
by Aristotle (Chancellor) on Jun 14, 2002 at 08:47 UTC |
In Section
Seekers of Perl Wisdom