Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by davido (Archbishop)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2018-07-20 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (427 votes). Check out past polls.

    Notices?