wrote in news: oups.com:
> I wanted a regular expression to seperate a filename from a full path
> (UNIX).
> I came up with the following:
>
> $target =~ m%(.+/)(.+)%;
> $targetpath = $1;
> $targetfile = $2;
You do not need the full regex machinery to do accomplish such a
task. In addition, using File::Basename is more appropriate than
rolling your own in this case. See
<URL: http://groups-beta.google.com/group/comp.lang.perl.misc/msg/e8d8519b712c483b?dmode=source>
<URL: http://groups-beta.google.com/groups?q=unur+basename&scoring=d>
Sinan
--
A. Sinan Unur <>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/cl...uidelines.html