[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl bugs?



On Fri, 25 Jun 1999 23:08:10 -0400 (EDT), Simply Hao wrote:

>C.N.> The problem with this approach is it changes $/
>TIMTAODEE.  This is what I do:
>
>    my $separator = $/;
>    undef $/;
>    domylittlething;
>    $/ = $separator;

You can let Perl take care of the nitty gritty for you. Here's how:

    {
        local $/;
        domylittlething;
    }

Not only has it the same, effect, but Perl does it in the same way too!
That is: keep a copy of the old value of the variable, clear it, use the
new value (=undef) globally, i.e. also in any sub you might call, and
restore the old value at the end of the block.

	Bart.

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org