Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Counting elements in array

by nithins (Sexton)
on Jan 30, 2014 at 06:52 UTC ( #1072631=note: print w/replies, xml ) Need Help??


in reply to Counting elements in array

Try this !!

print "The Array size is!:: scalar (@array) \n";

Replies are listed 'Best First'.
Re^2: Counting elements in array
by Anonymous Monk on Aug 29, 2017 at 09:15 UTC

    Try this trick to evaluate inside quotation string:

    print "Array has @{[0+@Array]} elements"; print "Hash has @{[0+keys %Hash]} keys";

    Sorry for necrobumping ^))

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1072631]
help
Chatterbox?
and the radiator hisses contentedly...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2018-07-16 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (330 votes). Check out past polls.

    Notices?