Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
P is for Practical
 
PerlMonks  

Re: array of arrays - context problem

by Mago (Parson)
on Jan 13, 2005 at 15:35 UTC ( [id://422103]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 15: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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://422103]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.