Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Incorrectly adding a newline character

by vinoth.ree (Prior)
on Oct 08, 2013 at 04:38 UTC ( #1057355=note: print w/ replies, xml ) Need Help??

in reply to Incorrectly adding a newline character

Try Chomping an array If you chomp an array, it will remove a newline from the end of every element in the array

So, try the blow code and tell what happens!

open (IN, $ARGV[0]); open (OUT, ">output.txt"); while ($line = <IN>){ chomp $line; @line=split/\t/,$line; chomp(@line); print OUT $line[1]."\t".$line[2]."\t".$line[2]."\n"; } close( OUT);

All is well

Comment on Re: Incorrectly adding a newline character
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2015-11-28 08:53 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 (740 votes), past polls