while (my $line = <FLHD>) {
Doesn't need to use the my outside, because Perl only do the my 1 time (is always the same scalar reference)! You can test this pasting the reference of $line outside the loop, and see that the next loop will alter that.

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".


In reply to Re: Re: How Perl Optimize your code & some code TIPS >=/ by gmpassos
in thread How Perl Optimize your code & some code TIPS ;-P by gmpassos

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.