Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: removing \n with for each

by choroba (Canon)
on Jun 13, 2013 at 13:32 UTC ( #1038737=note: print w/ replies, xml ) Need Help??

in reply to removing \n with for each

If you want to remove the newline from all the lines in the array, use

chomp @lines;

If you want to delete the newline only from the last line, use

chomp $lines[-1];
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Comment on Re: removing \n with for each
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2015-11-27 16:35 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls