idy has asked for the wisdom of the Perl Monks concerning the following question:

$var = $AADR2$AADR3$ADDR4
I need a single variable which should hold multiple values from an Array element.something like the above sample.
Is it possible ?
Here ADDR is array and var is a variable.
Help is much appreciated
  • Comment on assigning multiple array values to a single variable is it possible ?

Replies are listed 'Best First'.
Re: assigning multiple array values to a single variable is it possible ?
by ikegami (Patriarch) on Nov 10, 2009 at 17:50 UTC
    References are scalars, and they can reference arrays, and arrays can contain multiple values.
    $var = [ $AADR[2], $AADR[3], $AADR[4] ];