in reply to Can't use string as a HASH ref while strict refs
An incidental point. You should pick a consistent indentation style with an indent in the range 2-4 characters and stick with it. It significantly improves ease of comprehension. Steve McConnell's excellent book Code Complete has a lot more on this and other issues, I highly recommend it (even though it is not about Perl).sub new { my $self = bless {}, shift; $self->{dbh} = shift; # etc return $self; }
|
|---|