Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: array or array ref as variable

by HelenCr (Monk)
on Jun 28, 2013 at 07:00 UTC ( #1041156=note: print w/ replies, xml ) Need Help??

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

Or, more idiomatically:
my @everything = (\@fw, \@vlan, \@vrf, \@more); foreach (@everything) { theSub(@$_); }
(or:  theSub($_); depending on your usage).

Replies are listed 'Best First'.
Re^3: array or array ref as variable
by Lawliet (Curate) on Jun 28, 2013 at 11:08 UTC

    How is that more idiomatic? for and foreach are synonyms.

    Perhaps the use of $_ instead of the named variable is what you're referring to, but I am not convinced that that is more idiomatic.

      That's right. I meant the use of $_

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2016-06-29 12:31 GMT
Find Nodes?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...

    Results (378 votes). Check out past polls.