in reply to Re: global $_ behavior
in thread global $_ behavior
$_ is not block scoped; it's just an ordinary global variable that happens to be the default target for various operations.Thank you for this clear statement. I have been trapped by the globalness of $_ myself some times - it just feels quite natural for the beginner to assume that implicit assignment to $_ should also scope $_ implicitly to the assigning block.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: global $_ behavior
by TimToady (Parson) on Dec 02, 2005 at 16:17 UTC |