larard has asked for the wisdom of the Perl Monks concerning the following question:
I had meant to use $$_{foo}, but was suprised that despite using strict and warnings, perl had seemingly autodeclared %_.$_{foo}; #$_ containts a hashref.
Which printsuse strict; use warnings; use DBI; use Data::Dumper; #connect and execute stored procedure #... push @results, $_{user_id} while ($_ = $sth->fetchrow_hashref()); print Dumper(\@results);
$VAR1 = [ undef, undef, undef ];
What is %_ for? If there is no current use, would anyone care to suggest what %_ might be used for?
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Does %_ have a function or is it just for fun?
by ikegami (Patriarch) on Jul 16, 2007 at 17:48 UTC | |
by derby (Abbot) on Jul 16, 2007 at 20:21 UTC | |
|
Re: Does %_ have a function or is it just for fun?
by injunjoel (Priest) on Jul 16, 2007 at 17:55 UTC | |
|
Re: Does %_ have a function or is it just for fun?
by FunkyMonk (Bishop) on Jul 16, 2007 at 21:23 UTC | |
|
Re: Does %_ have a function or is it just for fun?
by ForgotPasswordAgain (Vicar) on Jul 16, 2007 at 17:37 UTC | |
by ikegami (Patriarch) on Jul 16, 2007 at 17:54 UTC | |
|
Re: Does %_ have a function or is it just for fun?
by naikonta (Curate) on Jul 17, 2007 at 06:51 UTC | |
|
Re: Does %_ have a function or is it just for fun?
by impossiblerobot (Deacon) on Jul 18, 2007 at 12:42 UTC |