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?
LanX - A referendum on whether or not to have another Brexit referendum.
LanX - Legalise the hunting of fox hunters

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-06-23 18:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (554 votes). Check out past polls.