List Info

Thread: Re: state vars: init with handle?




Re: state vars: init with handle?
user name
2007-09-19 11:23:05
On 9/19/07, Rafael Garcia-Suarez <rgarciasuarezgmail.com> wrote:
> On 19/09/2007, Abigail <abigailabigail.be> wrote:
> > On Wed, Sep 19, 2007 at 02:31:53PM +0200, Rafael
Garcia-Suarez wrote:
> > >
> > > Well, given that open() is one of the very
few built-ins that modify
> > > its argument (with sysopen() -- any
others?),
> >
> > substr, push, pop, shift, unshift, splice, vec,
chomp, chop, undef, tie,
> > bless.
>
> From this list, I see only tie() which has an interest.
The other most
> of the time operate on a variable that has already been
used. But
> C<tie state $foo> makes some sense.
>

(my $x=$y)=~s/blah/fnorble/g;

so doesnt it make sense to be able to do

(state $x=$y)=~s/blah/fnorble/g;

or will that already work?

yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )