Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by alfie (Pilgrim)
on May 09, 2001 at 17:50 UTC ( #79080=note: print w/replies, xml ) Need Help??


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

open (FILE, "<my_file") || die "can't open my_file: $!"; my @stuff = <FILE>; # get whole file into array close(FILE); chomp @stuff; # cut out trailing newlines my $string = join(', ', @stuff); # join to one string undef @stuff; # clean up behind us

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2022-01-21 18:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?