Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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
---

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 wandering the Monastery: (5)
As of 2016-06-26 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (328 votes). Check out past polls.