Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Adding to array

by mreece (Friar)
on Feb 28, 2007 at 20:33 UTC ( #602589=note: print w/replies, xml ) Need Help??


in reply to Adding to array

using push:
chomp(my @lines = <IN>); push @list, @lines;

update: a complete different approach:

get @ARGV to contain the list of files to slurp, then slurp it all with <>:

@ARGV = grep { -s } map { defined $ENV{$_} ? "$ENV{$_}/common/wins.ini" : () } qw(TEST_DIR WINS_DIR); chomp(my @list = <>);

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2021-03-02 21:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (63 votes). Check out past polls.

    Notices?