Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Splitting inside an array

by kilinrax (Deacon)
on Feb 05, 2001 at 22:10 UTC ( [id://56457]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my @tokens = split /\s+|(?<=\w)(?=(?:;|:=))/, $str;
    
    print join "\n", @tokens;
    
  2. or download this
    my @tokens = split /
                        \s+      # whitespace
    ...
                         )
                        )
                       /x, $str;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found