in reply to help on reg ex

$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
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.

artist