Buddha Buck <[EMAIL PROTECTED]> writes:
> > > What about C<hide> ?
> >
> > Here's yet another one - how about "here"?
> >
> > {
> > here $/ = "\n"; # what it is in here
> >
> > }
> >
> > Not really any confusion on this - $/ is "\n" 'in here', but maybe
> > something else outside.
> >
> > Unlike "hide" or others, this doesn't connote it's necessarily any
> > different from somewhere else - just that it's this value inside the
> > current block (which is what we're after, I think).
>
> But it isn't "here" that's the problem. If we just wanted to change
> the value "here", we could use my(). The problem is that local()
> changes the value for somewhere else as well as here. Other names
> suggested (like "shadow", or "mask") convey that idea better than
> "here".
It doesn't have the value "\n" I<here>, it has the value "\n" I<now>!
{
now $/ = "\n";
call_complicated_sub; # Now $/ is still "\n"...
}
# Now it's back to what it was before
--
Ariel Scolnicov |"GCAAGAATTGAACTGTAG" | [EMAIL PROTECTED]
Compugen Ltd. |Tel: +972-2-6795059 (Jerusalem) \ We recycle all our Hz
72 Pinhas Rosen St. |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555 http://3w.compugen.co.il/~ariels