Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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;


Comment on Re: How do i read each line of the file into string?
Download Code

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 examining the Monastery: (8)
As of 2014-12-21 21:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (108 votes), past polls