So, I might get burned for asking this, but it has been on my mind and I want to really understand.
I tend to avoid using -w for one reason, it complains about a habit I have. I like to do this:
Is this really *that* bad? If so why? And how would you rewrite the same block? Just omit the my's or use different variable names?my $query = "SELECT something FROM somewhere"; my $sth = $dbh->prepare($query); my $rv = $sth->execute; my $first_result = $sth->fetchrow_hashref; my $query = "SELECT somethingelse FROM somewhereelse"; my $sth = $dbh->prepare($query); my $rv = $sth->execute; my $second_result = $sth->fetchrow_hashref; ... then do something with $first_result and $second_result
Also, if I "reuse" $query, $sth, $rv several times (as in the above example) what is actually happening in memory?
Thanks for your insight and helping me be a better Perl programmer :)
In reply to Perl Warnings... by Rodster001
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |