Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Counting variable initialization

by ikegami (Patriarch)
on Mar 29, 2005 at 18:41 UTC ( [id://443227]=note: print w/replies, xml ) Need Help??


in reply to Re: Counting variable initialization
in thread Counting variable initialization

Deparse is wrong in this case, on two counts: 1) print($t) is not strict safe in the deparsed version, but it is in the original, and 2) print($t) prints the package variable in the deparsed version, but not in the original.

To answer the OP, my is considered a function for syntax purposes, so my ... foreach ...; means (my ...) foreach ...;, which makes no sense.

Replies are listed 'Best First'.
Re^3: Counting variable initialization
by tlm (Prior) on Mar 29, 2005 at 18:52 UTC

    I wondered about the fact that strict seemed to be violated. I defer to your interpretation, but it is a bummer to know that Deparse can be wrong, because I use it quite a bit. Sorry to the OP for the wrong info.

    the lowliest monk

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found