menylea has asked for the wisdom of the Perl Monks concerning the following question:
it yield somting that looks like that :$symbol_list_hash{$1}= [split(' ',substr $2, 0, (index($2, ")")))]
than, Im trying to search/grep for a spacific value for all of the keys ( I3, I9,I2 ), using :$VAR1 = { 'I2' => [ 'VSS', 'VSS', 'Rep_en', 'ENb', 'VDD', 'VDD' ], 'I9' => [ 'Vctrl', 'ENq', 'net014', 'Vb_CS_LNA', 'VDD_OpAmp', 'VSS' ], 'I3' => [ 'VSS', 'VSS', 'ENb', 'ENq', 'VDD', 'VDD' ] };
but it never find if, and sometimes it gives an error :..if (!grep{ $dd eq "$_"} values %symbol_list_hash )
the thing is, as far as I can understand the array should look like that :"cant coerance into array...."
How do I converte it? thx meny both solutions doest work: it gives:$VAR1 = { 'I2' => [ 'VSS' => 'VSS', 'VSS'=> VSS, 'Rep_en'=>'Rep_en' ,
cant coerce into hash at.... attemp to free unreferanced scalar..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: manipulation to hash
by toolic (Bishop) on Jun 12, 2012 at 15:06 UTC | |
|
Re: manipulation to hash
by NetWallah (Canon) on Jun 13, 2012 at 00:09 UTC |