oldyork90 wrote:
True or false. (Trying to figure out why this would be done with no
assignment).

Without an explicit assignment the variable has the value 'undef'.

In the following construct, the current value of $/ is
protected by localizing it to the scope of the block.

local() allows the value of the variable to remain the same *outside* the block.

In this block, the current value of $/ is not changed.

Inside the block local() modifies the value of $/.

{
    local $/;
    # do some things here.  The value of $/ is not modified in any of
the code here.
}

perldoc -q "What.s the difference between .* local.. and my.."



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to