Now, what is the purpose behind it..? is it to get directory out of the total path or just the filename?. Use File::Basename. If you give more contextual hints, more help is awaiting for you.$a = '/export/home/test/great'; if($a =~ m/(.*)\/(.*?)$/){ $dir = $1; $file = $2; } print "$a\n$dir\n$file\n"; __END__ /export/home/test/great /export/home/test great
In reply to Re: help on reg ex
by artist
in thread help on reg ex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |