Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: my $x or my ($x)

by johngg (Abbot)
on Apr 04, 2006 at 16:45 UTC ( #541181=note: print w/ replies, xml ) Need Help??


in reply to Re: my $x or my ($x)
in thread my $x or my ($x)

I know that it is really not necessary but I have got into the habit when counting elements in a list of doing

my $elems = scalar @list;

rather than

my $elems = @list;

just to make it crystal clear for "those that come after" what is going on. That the question gets asked demonstrates why such practices can be helpful.

Cheers,

JohnGG


Comment on Re^2: my $x or my ($x)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (12)
As of 2014-12-26 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (173 votes), past polls