Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: split line

by shmem (Chancellor)
on Jul 28, 2008 at 21:14 UTC ( #700649=note: print w/replies, xml ) Need Help??


in reply to split line

You want to split on whitespace, not on quoted whitespace.

my @config = split / /,$line; # split on single space my @config = split / +/,$line; # split on 1 or more spaces my @config = split /\s+/,$line; # split on one or more of spac +es or tabs

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-12-02 06:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?