Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
The stupid question is the question not asked
 
PerlMonks  

Re: simple printing question

by InfiniteSilence (Deacon)
on Jan 31, 2012 at 23:32 UTC ( #951095=note: print w/ replies, xml ) Need Help??


in reply to simple printing question

Your usage is forcing @array into scalar context which returns the number of elements in the array.

~linux> perl -e '@array = 5..9; push @array,10; print scalar @array;'
Same thing. There are some excellent books you should read in order to learn Perl. Trial and error will only get you so far and will contribute to both confusion and bad habits. Read Effective Perl Programming to eradicate these problems sooner than later.

Celebrate Intellectual Diversity


Comment on Re: simple printing question
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-04-18 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (460 votes), past polls