$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
In reply to Re: Uploading Time (getting last element of a variable)
by thatguy
in thread Uploading Time
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |