Think about Loose Coupling | |
PerlMonks |
Re: R.Exp. Matching from the Rightby mk. (Friar) |
on Feb 24, 2006 at 17:14 UTC ( [id://532602]=note: print w/replies, xml ) | Need Help?? |
i assume you want the file name, without the path - is it right?!
if so, try this:
if you want to print the path as well, just use print $&; update the code above will replace the path with nothing, so the result will be just the filename. you might recover the path later, as i said, using $&. still, if you really only want to match, i guess Praveen's reply will be more suitable. =)
In Section
Seekers of Perl Wisdom
|
|