Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Error on comment line

by ferreira (Chaplain)
on Jan 31, 2007 at 09:45 UTC ( #597513=note: print w/ replies, xml ) Need Help??


in reply to Error on comment line

Maybe this comment is not a comment indeed. It may be inside a larger quote construct that does interpolation, like

my $a = " # this is a comment, but not really (with $interpolation) $a = 3 "; print $a
or
printf <<PERL, "not"; for (@html) { pretty_print($_) } # a comment is %s always a $comment # subtler because of here-docs PERL

Any of these would trigger similar warnings, due to the unitialized contents in $interpolation, $a and $comment.


Comment on Re: Error on comment line
Select or Download Code
Re^2: Error on comment line
by ikegami (Pope) on Jan 31, 2007 at 16:19 UTC
    Being a runtime warning, the line number in the message would be the line number of the start of the statement. In the first snippet, the warning would appear to originate from my $a = ", not the "comment" line.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (17)
As of 2014-12-18 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (59 votes), past polls