my @arr_methods = ([ \@fw, \&NT::FW, 'FW'], [\@vrf, \&NT::VRF, 'VRF'
+], [\@vlan, \&NT::VLAN, 'VLAN'], [ \@portchannel, \&NT::PORTCHANNEL,
+'PORTCHANNEL'] );
foreach (@arr_methods) {
@{$_->[0]} = ($_->[1])->extract( &slurpFile($CFG{$CFG{$_->[2]}
+} ), %CFG);
}
If I run [ \@fw, &NT::FW, 'FW'] I'll get this error message:
Undefined subroutine &NT::FW called at main4.pl line 32.
but when I do this: [ \@fw, \&NT::FW, 'FW'] that error message is gone.
and when I run it I get this error message:
Can't call method "extract" on unblessed reference at main4.pl line 48.
/Hossein |