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

Re: Re: Re: Reporting

by l2kashe (Deacon)
on Apr 04, 2003 at 05:54 UTC ( [id://247969]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Reporting
in thread Reporting

Im actually thinking the question was.

Which is faster?
$num = scalar(@array); # or $num = $#array;
And as someone pointed out $#array isnt acurate as to the actual number of elements in the array, so I guess you could simply compare the op trees of the two. Or I guess perform 3 benchmarks,
1) plain
2) scalar(@array) - 1
3) $#array + 1;

/* And the Creator, against his better judgement, wrote man.c */

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found