in reply to Re^2: Only the last file data is getting saved in the hash
in thread Only the last file data is getting saved in the hash

Not certain but may be i should save the data below in an array reference,not in an array??

You already are

$ perl -MData::Dump::Streamer -e" $f{f} = [ grep /\d/ , 1 ..4 ]; Dum +p( \%f ); " $HASH1 = { f => [ 1, 2, 3, 4 ] }; $ perl -MData::Dump::Streamer -e" @{ $f{f} } = grep /\d/ , 1 ..4; Dump +( \%f ); " $HASH1 = { f => [ 1, 2, 3, 4 ] };