Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How do i read each line of the file into string?

by knobunc (Pilgrim)
on May 09, 2001 at 18:35 UTC ( #79100=note: print w/replies, xml ) Need Help??


in reply to How do i read each line of the file into string?

use IO::File; my $fh = IO::File->new("<$filename") or die "Unable to open $filename: $!"; my $string = join(", ", map({ chomp; $_ } $fh->getlines) ); $fh->close;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2016-09-01 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found