greatshots has asked for the wisdom of the Perl Monks concerning the following question:
Outputopendir(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 ];
the file contents are not added in the value of a hash. what is the wrong in the code ?$VAR1 = [ 'rep_vnz_gprs_performance_report_daily_spr.sql', [], 'rep_vnz_cchnwpossumreport2_spr.sql', [], 'rep_vnz_gprs_tbf_report_bh_spr.sql', [], 'rep_vfnz_weeklytrxblockingreport_spr.sql', [], 'rep_vnz_gprs_perf_report_daily_enhanced_spr.sql', [],
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: building a hash with filname and itscontents
by Errto (Vicar) on Oct 30, 2006 at 04:23 UTC | |
|
Re: building a hash with filname and itscontents
by GrandFather (Saint) on Oct 30, 2006 at 04:22 UTC | |
|
Re: building a hash with filname and itscontents
by jdporter (Paladin) on Oct 30, 2006 at 04:41 UTC | |
|
Re: building a hash with filname and itscontents
by graff (Chancellor) on Oct 30, 2006 at 04:41 UTC | |
|
Re: building a hash with filname and itscontents
by jesuashok (Curate) on Oct 30, 2006 at 04:18 UTC |