Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: `cat $myfile`; vs. open(MYHANDLE, "myfile")

by rvosa (Curate)
on Aug 08, 2006 at 01:05 UTC ( #566040=note: print w/replies, xml ) Need Help??


in reply to `cat $myfile`; vs. open(MYHANDLE, "myfile")

For portability I don't think I'd recommend using backticks and cat. I personally would do something like:
my $myfile='path_to_my_file'; open my $fh, '<', $myfile or die $!; my @myarray=<$myfile>; close $fh;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2020-12-06 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (65 votes). Check out past polls.

    Notices?