Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by Krambambuli (Deacon)
on May 20, 2009 at 12:17 UTC ( #765201=note: print w/ replies, xml ) Need Help??


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

I don't know the exact number of fields, and I do not want the newline in the last element.

So I decided to chomp _after_ the split:

@x = split(...) chomp $x[-1];
Thanks!

Krambambuli
---


Comment on Re^2: Is this expected behavior for chomp/split...?!
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2015-07-04 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls