in reply to Re: 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??

@{ $Hash_filematches{ $filename } } = grep( /\/\Q$file_name\E#/i +, @{ $Hash_filenames{ $filename } });

Replies are listed 'Best First'.
Re^3: Only the last file data is getting saved in the hash
by Anonymous Monk on Nov 07, 2010 at 12:02 UTC
    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 ] };