Help for this page

Select Code to Download


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