in reply to Re: $_ haters anonymou
in thread $_ haters anonymou
Isn't that odd? Try this the other way.$_ = "Where did I come from?\n"; package Private; print $_;
What is going on here? Quite simple. There is a small list of "special" symbols which are always in package main by default no matter what package you are in. *_ is one. *INC is another.package Irrelevant; $_ = "Bye, bye"; print $Irrelevant::_;
But what this really means is that you really share $_ with anything you call, making it easy to have a bad module wipe out $_ unexpectedly.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: $_ haters anonymou
by repson (Chaplain) on Dec 11, 2000 at 15:54 UTC | |
by tilly (Archbishop) on Dec 11, 2000 at 16:04 UTC | |
by dchetlin (Friar) on Dec 11, 2000 at 16:17 UTC | |
Re: $_ haters anonymou
by Dominus (Parson) on Dec 14, 2000 at 09:19 UTC | |
by redcloud (Parson) on Dec 14, 2000 at 20:22 UTC | |
by Dominus (Parson) on Dec 14, 2000 at 22:27 UTC | |
by cLive ;-) (Prior) on Jan 25, 2002 at 04:16 UTC | |
by Dominus (Parson) on Jan 25, 2002 at 19:05 UTC |