develooper Front page | perl.perl5.porters | Postings from November 1999

Re: [ID 19991114.001] dangerous behavior from local

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
November 16, 1999 00:27
Subject:
Re: [ID 19991114.001] dangerous behavior from local
Message ID:
199911160827.IAA16986@tiuk.ti.com
Tom Phoenix <rootbeer@redcat.com> writes:
>On Sun, 14 Nov 1999, Andrew Pimlott wrote:
>
>> A coworker accidentally did:
>> 
>> {
>>     local($/ = undef);
>>     ...
>> }
>> 
>> This did not localize $/ .  I don't know what it did do.
>
>It looks to me as if it did localize $/ -- but only _after_ storing undef
>into it. Oops!

That is exactly what it says ;-)

>
>> There was no warning.  Could I get a warning out of it?
>
>Or, better yet, could perl simply Do The Right Thing?

I think it is doing the right thing.

-- 
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About