Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Is this expected behavior for chomp/split...?!

by johngg (Canon)
on May 20, 2009 at 09:36 UTC ( [id://765159]=note: print w/replies, xml ) Need Help??


in reply to Is this expected behavior for chomp/split...?!

Because without a third argument split will discard empty trailing fields which, as soon as you chomp away the newline, you have four of.

I hope this is helpful.

Cheers,

JohnGG

  • Comment on Re: Is this expected behavior for chomp/split...?!

Replies are listed 'Best First'.
Re^2: Is this expected behavior for chomp/split...?!
by Krambambuli (Curate) on May 20, 2009 at 09:56 UTC
    Got it. _Now_ it seems sooo obvious :)

    Many thanks!

    Krambambuli
    ---

        Ah, great! Thanks, that's something I didn't actually realize as such from the manpage.

        Krambambuli
        ---

Re^2: Is this expected behavior for chomp/split...?!
by bichonfrise74 (Vicar) on May 20, 2009 at 16:06 UTC
    This is a good and concise answer.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found