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

Re: Benchmark array passing Question

by kennethk (Monsignor)
on Jun 04, 2012 at 16:55 UTC ( #974328=note: print w/ replies, xml ) Need Help??


in reply to Benchmark array passing Question

You have a scope issue. You can see this if you change your array declaration from my @binarysearcharray=... to our @binarysearcharray=.... The eval for the benchmark occurs in Benchmark package, and variables declared with my are not visible outside your current scope, in contrast to our. For a little more description of scope, see Private Variables via my().

Please note that if you include output in a benchmarking run, the i/o is likely to invalidate your conclusions.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: Benchmark array passing Question
Select or Download Code
Re^2: Benchmark array passing Question
by rakshas (Novice) on Jun 04, 2012 at 17:01 UTC

    Works Like a Charm now!!!! Thanks!!!!!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-12-21 13:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (105 votes), past polls