Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Re: Re: Re: packing/unpacking/split/join confusion

by sauoq (Abbot)
on Jan 12, 2003 at 00:07 UTC ( #226162=note: print w/ replies, xml ) Need Help??

in reply to Re: Re: Re: packing/unpacking/split/join confusion
in thread packing/unpacking/split/join confusion

By specifying a space, you are telling split to break the string apart wherever it sees a space.

Almost. A literal space is a special case. It splits on whitespace like /\s+/ but it doesn't return a null field when there is leading whitespace. So, it is just like split with no arguments but it allows you to specify the variable instead of using $_.

"My two cents aren't worth a dime.";

Comment on Re: Re: Re: Re: packing/unpacking/split/join confusion
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2015-11-30 02:32 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (756 votes), past polls