in reply to Re: How Perl Optimize your code & some code TIPS ;-P
in thread How Perl Optimize your code & some code TIPS ;-P
foreach my $Key ( keys %{$rf_h} ) {
This will load only the Key, but the use of ($key, $value) = each %hash is better. (perhaps the only interesting thing that you wrote in your node!)
Shows but doesn't explain
Well, of course, this isn't a tut for reference! How I told, is only a tip! And I think that we can understant very well the basics for ref!
...it uses &testA without parentheses...
Well, perhaps you don't know the difference of &foo and foo(). if you write foo() the parse will tell that foo is an sub only if it has (), and will paste the content of (...) as argument. If you use &foo, this is set as a sub, and the arguments will be the previus @_, if defined, or the content of (...). But if you don't wan't arguments you don't need to use (). But anyway, I was showing how if() evaluate the conditions, in this case the subs, not how to call a sub!
Well, I didn't like your point of view! Man, be more positive! And if you don't know yet, the world is not perfect! Try to look the perfection in everything or wait for the things be always in your mode, just get for you frustration.
With all the respect, you could made a good node with other ideas, or ways to do the things better! Not trying to "create" fool erros in my node!
Graciliano M. P.
"The creativity is the expression of the liberty".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: How Perl Optimize your code & some code TIPS >=/
by ihb (Deacon) on Jan 31, 2003 at 15:06 UTC |