in reply to array of arrays - context problem

my @masterArray = (@array1, @array2, @array3); foreach (@masterArray){ print $_; } $numElements = @masterArray print $numElements;


Positive vibrations;

Mago
mago@rio.pm.org

Replies are listed 'Best First'.
Re^2: array of arrays - context problem
by Limbic~Region (Chancellor) on Jan 13, 2005 at 20:41 UTC
    Mago,
    Neither one of your comments are correct.
    • # One Element Arrays - This is just one element.
    • # Number of Elements Arrays - print takes a list (see perldoc -f print) so it actually prints the entire array. To get the number of elements use print scalar @masterArray;

    Cheers - L~R

      So thanks you;

      Copy and Paste error !

      $scalar = @array;

      or

      print scalar @array;

      or

      print int @array;



      OK !?

      Mago
      mago@rio.pm.org