Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: How to get only files ending with a ,<word>

by perlNinny (Beadle)
on Jan 11, 2006 at 22:32 UTC ( #522584=note: print w/replies, xml ) Need Help??


in reply to Re: How to get only files ending with a ,<word>
in thread How to get only files ending with a ,<word>

Yes, you are right. What I want is this: I want the list to contain only the portion after the ,. So, using your example, I want to see bar bas and each a separate element in the list. THANKS for the help!
  • Comment on Re^2: How to get only files ending with a ,<word>

Replies are listed 'Best First'.
Re^3: How to get only files ending with a ,<word>
by japhy (Canon) on Jan 11, 2006 at 22:41 UTC
    Then something like:
    my @comma_extensions = map { /,(\w+)$/ ? $1 : () } @files;
    will produce what you want.

    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://522584]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2022-08-09 17:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?