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

Re: printout of large files. loop vs. flush at once

by davido (Cardinal)
on Apr 18, 2013 at 17:17 UTC ( #1029389=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $string = do{
      open my $fh, '<', 'filename' or die $!;
      local $/ = undef;
      <$fh>;
    };
    
  2. or download this
    use File::Slurp;
    my $text = read_file('filename');
    
  3. or download this
    use File::Slurp;
    my @lines = read_file('filename');
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2018-10-18 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (103 votes). Check out past polls.

    Notices?