Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Wierd bugs I would have never expected

by Anonymous Monk
on Dec 17, 2010 at 05:48 UTC ( [id://877590]=note: print w/replies, xml ) Need Help??


in reply to Wierd bugs I would have never expected

The cause? a stray comma: print $fh, $sData instead of print $fh $sData.
I catch myself making the same mistake, and I've begun to habitually use the form print {$filehandle} $payload; to notify both me and Perl what I really mean. I'm amazed at how quickly "print" followed by curly braces feels like a new sigil; and it really decreases the amount of time I spend examining such statements for intent, not to mention examining them for errors.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-23 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found