Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Most of the optimizations listed can be found in the "Other Oddments" chapter of the Camel in the section "Efficiency". But one of my favorites (also in the Camel, but paraphrased using $x/$y/$z instead of $a/$b/$c):
Use $foo = $x || $y || $z; This is much faster (and shorter to say) +than: if ($x) { $foo = $x; } elsif ($y) { $foo = $y; } elsif ($z) { $foo = $z; }

--Jim


In reply to Re: Idiomatic optimizations by jlongino
in thread Idiomatic optimizations by Juerd

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Perl300]: Hi all
    [Perl300]: I need suggestion for a module that'll help me to send email from my perl code. I want it secure and as simple as possible.
    [Perl300]: I found from Super Search
    [Perl300]: I found from Super Search, Net::SMTPS or Net::SMTP, MIME::Lite, Email as options
    [1nickt]: Perl300 Try Email::Stuffer
    [1nickt]: Or for a little more control, Email::Sender:: Simple
    [Perl300]: any suggestion on which one might be secure and simplest. I am not doing anything complex, just check some conditions from DB tables and send email to myself (same domain) if conditions are met
    [1nickt]: read the doc of the suggestions I just gave
    [1nickt]: A lot depends on whether you are sending mail from your local box or using a remote server
    [hippo]: Secure in what sense?

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (10)
    As of 2017-10-17 15:51 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      My fridge is mostly full of:

















      Results (233 votes). Check out past polls.

      Notices?