TotalNewby has asked for the wisdom of the Perl Monks concerning the following question:
I'm looping through an array of file pathnames passed as a param from another program. I'm trying to get a list of just the file names at the end of the filepath. The paths can be any length long. What I'm looking for is the specific patten matching syntax to get this going.
Sample input
/blah/blah/blah/blah/file1.pl
/blah/blah/file2.pl
/blah/blah/blah/blah/blah/blah/blah/file3.pl
Desired output
file1.pl
file2.pl
file3.pl
Any words of wisdom from the ones that know?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Truncating Filename string
by Zaxo (Archbishop) on Jan 28, 2004 at 01:24 UTC | |
|
Re: Truncating Filename string
by davido (Cardinal) on Jan 28, 2004 at 05:38 UTC | |
|
Re: Truncating Filename string
by Roger (Parson) on Jan 28, 2004 at 01:15 UTC | |
|
Re: Truncating Filename string
by borisz (Canon) on Jan 28, 2004 at 01:16 UTC | |
|
Re: Truncating Filename string
by b10m (Vicar) on Jan 28, 2004 at 01:15 UTC | |
by graff (Chancellor) on Jan 28, 2004 at 02:43 UTC |