[Chicago-talk] Sharing my pain

Andy_Bach at wiwb.uscourts.gov Andy_Bach at wiwb.uscourts.gov
Fri Oct 13 15:01:59 PDT 2006

> But having said that, it was the *only* way to get a "local" var to work 
"use strict" was turned on, before the "foreach my $foo" syntax was 
in, I think, 5.004.  Maybe even 5.005.

Hmm, maybe earlier, just happen to have a 5.004 around:
#  perl_5.004 -w /tmp/fo.pl
sp: 1
sp: 2
sp: 3
sp: hi

#  cat /tmp/fo.pl
use strict;
#use warnings;
my @tmp = qw(1 2 3);
my $sp = 'hi';
foreach my $sp (@tmp) {
       print "sp: $sp\n";
print "sp: $sp\n";

no complaints.

I've got an older ver around here somewhere but ....


Andy Bach, Sys. Mangler
Internet: andy_bach at wiwb.uscourts.gov 
VOICE: (608) 261-5738  FAX 264-5932

"The whole point of reserving these namespaces is not to prevent users 
misusing them, but to ensure that when we eventually get around to using a 

particular block name, and those same users start screaming about it, we 
mournfully point to the passage in the original spec and silently shake 
heads. ;-)"

Damian Conway, P6 list

More information about the Chicago-talk mailing list