Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Counting variable initialization

by eric256 (Parson)
on Mar 29, 2005 at 19:34 UTC ( [id://443237]=note: print w/replies, xml ) Need Help??


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

Thats odd. That isn't the deparse I get at all. Before:

use strict; my @l = qw/10 20 30/; my $i += $_ foreach @l; my $t; $t += $_ foreach @l; print '$t = ' . $t . "\n"; print '$i = ' . $i . "\n";
After:
use strict 'refs'; my(@l) = ('10', '20', '30'); ; my $i += $_ foreach (@l); my $t; ; $t += $_ foreach (@l); print '$t = ' . $t . "\n"; print '$i = ' . $i . "\n";
Output for both scripts:
$t = 60 $i =


___________
Eric Hodges

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-16 19:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found