would put in $bar everything starting from the first slash. You should instead do:$a =~ s/(\/.*)$//; $bar = $1;
$a =~ s#(/[^/]*)$##; $bar = $1;
-- zigdon
In reply to (z) Re^2: help on reg ex
by zigdon
in thread help on reg ex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |