in reply to building a hash with filname and itscontents
modify it as above and try.opendir(SPR , "/apps/inst1/metrica/TechnologyPacks/ON-SITE/Nokia_S11.5 +/reportspr/") or die "$!"; while ( defined ( $file_name = readdir(SPR) ) ) { next if ( -d $file_name ); # removing . and .. open ( FH , "/apps/inst1/metrica/TechnologyPacks/ON-SITE/Nokia_S11 +.5/reportspr/$file_name" ) or die "$!"; $spr_hash{$file_name} = []; @{$spr_hash{$file_name}} = <FH>; } print Dumper [ %spr_hash ];
|
|---|