Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: How to call a function on each item after a split?

by GrandFather (Cardinal)
on Oct 08, 2012 at 23:47 UTC ( #997897=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $str = "item1  | item2| item3 
    |item4|
     ";
    
    print ">$_<\n" for split /\s*\|\s*/, $str, -1;
    
  2. or download this
    >item1<
    >item2<
    >item3<
    >item4<
    ><
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2014-09-18 01:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (103 votes), past polls