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.