Help for this page

Select Code to Download


  1. or download this
    use IO::All;
    my ($io, $contents);
    $io = io 'file.txt';
    $contents < $io;
    
  2. or download this
    # manipulate $contents to write it back out:
    $contents > $io;
    $some_extra_bit >> $io;
    
  3. or download this
      my $filename = 'thefile.txt';
      my $pid = open(FH, "-|");
    ...
        exec('/bin/cat', $filename);
      }
      while (<FH>) { ... }
    
  4. or download this
    @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
    map{y/X_/\n /;print}map{pop@$_}@/for@/