Help for this page

Select Code to Download


  1. or download this
           map { $_ => do { local ($/,*F); open F, "<$_" or die 
                 "Error reading '$_': $!"; <F> }} glob('*')
    ...
           
           map{$_=>do{open my $fh,$_ or die"$_:$!";<$fh>}}glob('*')
    
  2. or download this
      package MyPackage; 
          sub make_hash { 
    ...
         __END__
    
  3. or download this
        foreach $filename (glob('*', '.*')) { 
            open(DF, $filename) or die(); 
    ...
       #the snippet i mentioned would have had the contents in @{$hash{$fi
    +lename}}, 
       #but you would have had to reassemble that back into a single strin
    +g, if that is what you needed)