Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Two very good points there.

I always use parens on my user-defined functions whether I've got parameters or not. Kind of a habit actually now that I'm fluent in more than just a couple of languages, most of which enforce using parens. In fact, thinking about it, I think Perl's the only language which *doesn't* enforce parens if a function is pre-declared. Also, at a glance (at least with my own code), it's easier to identify built-ins, as I typically don't use parens for them (eg: sleep 10;).

The only time I'll leave parens off of a call, is if it's a method call where I'm not sending in any params:

my $object = My::Thing->new(speak => 'hi'); ... $object->speak;

In reply to Re^2: New Discovery!!! (sub call without parentheses) by stevieb
in thread New Discovery!!! (sub call without parentheses) by harangzsolt33

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2022-01-18 12:47 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (53 votes). Check out past polls.