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');