I have this hash of hashes:
Graph = (
lines => {
line1 => {
init => "A1",
term => "A5",
type => "N2Nrev",
},
},
);
For example:
$node = "A5";
And i am doing conditional expression
foreach $key ( keys $graph{lines} ){
if( ($graph{lines}{$key}{'init'} eq $node) or ($graph{lines}{$key}{'term'} eq $node) ){
delete($graph{lines}{$key});
}
}
So why is this producing error "Type of arg 1 to keys must be hash ( not hash element ) on line 1 " ?

New Topic/Question
Reply


MultiQuote



|