LPM: Scope of $_

Frank Price fprice at mis.net
Tue Jan 11 21:25:08 CST 2000


On Tue, 11 Jan 2000, Rich Bowen wrote:

#"AARON B. DOSSETT" wrote:
#> 
#> You're disappointed, and rightly so.  There's only one $_ and a change made
#> to it anywhere is reflected everywhere else.
#
#But $main::_ is not the same variable as $rtf2html::_ is it? I know that
#using $_ all over the place can break things, but I figure that when you
#were in another name space, as in calling a function in another module,
#that you'd be (reasonably) safe. No?

Man, y'all are quick!  For the magic Perl vars (the one which don't
start with a letter :-) it doesn't matter what namespace you're in:
they really are true globals.

-Frank.
____							  ____
Frank Price					fprice at mis.net
  Linux: the choice of a GNU generation -|- Why not go mad?




More information about the Lexington-pm mailing list