in reply to Re^2: dereferencing question
in thread dereferencing question
The only time I use single character variable names like $k is when the scope is going to be something really small like five to ten lines. For example,
And yes, I could minimize that to just using $_ instead of $k, but I try to never use that special variable, because it requires extra effort for the reader.foreach my $k ( keys %DBhandles ) { $DBhandles{ $k }{ sth }->finish; $DBhandles{ $k }{ dbh }->disconnect; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: dereferencing question
by cavac (Prior) on Jan 23, 2025 at 09:01 UTC |