Something I posted on clpmod recently was further refined by David Dyck and appears to be a bug. Observed in 5.005_03 on Solaris and 5.5.650 on Linux; also observed by Malcolm Dew-Jones on 5.005_03 on Win32. Quoth perlfunc: code evaluated with do FILENAME cannot see lexicals in the enclosing scope; It appears that it *can* see lexicals in the enclosing scope if it is called via a subroutine. (I discovered this when I typed in the pseudo-definition of require as a sub from perlfunc.) % cat foo my $x = "main"; do 'bar'; print "\$x set in $x\n"; blech(); print "\$x set in $x\n"; sub blech { $x = "blech"; do 'bar'; } % cat bar $x = "bar"; print "In bar\n"; % perl -w -Mstrict foo In bar $x set in main In bar $x set in bar -- Peter Scott Pacific Systems Design TechnologiesThread Previous | Thread Next