develooper Front page | perl.perl6.language | Postings from April 2005

Re: Truely temporary variables

Thread Previous | Thread Next
From:
Ashley Winters
Date:
April 17, 2005 17:55
Subject:
Re: Truely temporary variables
Message ID:
cda42dbb0504171755266dcf07@mail.gmail.com
On 4/15/05, Brent 'Dax' Royal-Gordon <brentdax@gmail.com> wrote:
> Aaron Sherman <ajs@ajs.com> wrote:
> > What I'd really like to say is:
> >
> >         throwawaytmpvar $sql = q{...};
> >         throwawaytmpvar $sql = q{...};
> 
> Anything wrong with:
> 
>    my $sql = q{...};
>    temp $sql = q{...};
>    temp $sql = q{...};
> 
> (Assuming C<temp> is made to work on lexicals, of course.)

How about 'the'? I don't want to I<possess> the variable, I just want to use it.

the $sql = q{...};
the $sth = $dbh.prepare($sql);

It could be the same as my(), but without the posessiveness (warning)

Ashley Winters

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