Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^6: array or array ref as variable

by Hossein (Acolyte)
on Jun 28, 2013 at 10:57 UTC ( #1041216=note: print w/ replies, xml ) Need Help??

in reply to Re^5: array or array ref as variable
in thread array or array ref as variable

ok, I did this:

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 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 line 48.


Comment on Re^6: array or array ref as variable
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1041216]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-11-26 01:11 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (695 votes), past polls