Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: -> Is Optional ?

by space_monk (Chaplain)
on Dec 28, 2012 at 15:55 UTC ( #1010715=note: print w/ replies, xml ) Need Help??


in reply to -> Is Optional ?

use strict; use warnings;
As the previous poster said, if you haven't got these in your code, you are incredibly talented or incredibly stupid. As the original code is missing a brace in the variable declaration, I think we can guess which ..... :-)
A Monk aims to give answers to those who have none, and to learn from those who know more.


Comment on Re: -> Is Optional ?
Download Code
Re^2: -> Is Optional ?
by kennethk (Monsignor) on Dec 28, 2012 at 16:50 UTC

    Your advice is a little off-point; while the posted code does contain a syntax error, this is a compilation error. Neither the addition of strict nor warnings would give any additional insight into the nature of the issue. Once you fix the curly issue, the code passes both tests just fine. I love these pragma dearly, but will never cite them in a response unless they actually help in the particular situation. Expecting people to include them above every code snippet, or expecting every code snippet to be a full script, is unnecessary orthodoxy.

    You may also wish to peruse ree's profile to gather information about his familiarity with the language.


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

      Yes, I do apologise; I was aiming for amusement value more than anything else in my comment, but on reading it, it was probably a bit too aggressive.
      A Monk aims to give answers to those who have none, and to learn from those who know more.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-12-25 01:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (159 votes), past polls