Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Strip line feeds from file

by cciulla (Friar)
on Jun 09, 2003 at 20:16 UTC ( [id://264448]=note: print w/replies, xml ) Need Help??


in reply to Strip line feeds from file

update: thelenm's solution is more elegant, but here's my (more or less) standard solution:

$_ = $ARGV[0]; $outFile = "$_.1"; open(OUTFILE, ">$outFile") or die "Can't open '$outFile' for writing: +$!"; open(FILE, $_) or die "Can't open '$_': $!"; while (<FILE>) { chomp; print OUTFILE $_; } close(FILE); close(OUTFILE);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found