>    $f =~ m/:(.*)$/ ? print "$1\n" : print "$f\n";

This will fail if you're more than one directory deep, ie, it'll work fine 
on "HD:filename.xml", but will fail on "HD:Directory:filename.xml". In the 
first case, it will properly return "filename.xml", in the second case, it 
will return "Directory:filename.xml".

This small modification will fix that:

     $f =~ m/:([^:]$.*)$/ ? print "$1\n" : print "$f\n";


--
Morbus Iff ( .sig on other machine. )
http://www.disobey.com/ && http://www.gamegrene.com/
"where's there's a will, there's a morbus ready to collect!"

Reply via email to