Help for this page

Select Code to Download


  1. or download this
    # Tye + Juerd in id=204874
    sub slurp {  local( *ARGV, $/ ); @ARGV = shift; <> };
    
    # slurp a bunch of files
    @files = do { local(@ARGV, $/) = @filenames; <> };
    
  2. or download this
    # get the indexes of items in an array
    @foo{ @foo } = 0 .. $#foo;
    ...
      $i++ while $_[$i] ne $target;
      return $i==$#_ ? undef : $i
    }