Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2015-07-31 00:11 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 (274 votes), past polls