- or download this
map { $_ => do { local ($/,*F); open F, "<$_" or die
"Error reading '$_': $!"; <F> }} glob('*')
...
map{$_=>do{open my $fh,$_ or die"$_:$!";<$fh>}}glob('*')
- or download this
package MyPackage;
sub make_hash {
...
__END__
- 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)