For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > June 2005 > Re: newbie regexp question: how to extract just the filename from









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: newbie regexp question: how to extract just the filename from
Tim O'Donovan

2005-06-10, 3:59 am

I believe this will do the trick:


use File::Basename;


fileparse - split a pathname into pieces

basename - extract just the filename from a path

dirname - extract just the directory from a path


Hope this helps.


Regards,
Tim
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com