Re: RFC 64 (v2) New pragma 'scope' to change Perl's default scoping

2000-08-29 Thread Tom Christiansen
$x and $y are in the same scope. This is good, but also bad. For one thing, you can hang yourself real easily if you come from a C background and expect this to keep stuff private: $x = 10; sub square { ($x) = @_; $x *= $x; } $ans = square($x); print "$x squared is

Re: RFC 64 (v2) New pragma 'scope' to change Perl's default scoping

2000-08-29 Thread Nathan Wiger
Tom Christiansen wrote: Perhaps you simply know inept C programmers. Is there any other kind? ;-) *Kidding*! In C, something that isn't declared auto or static is going to be global. Seeing no scoping declarations, the C programmer who knows C will come to the same conclusion as the