[ABE.pm] Here's a weird one
Faber J. Fedor
faber at linuxnj.com
Thu Feb 22 16:57:43 PST 2007
On 22/02/07 19:44 -0500, Ricardo SIGNES wrote:
> You probably mean:
>
> my $table = $q->param('table');
> $table = $something_else unless defined $table;
DUH! Did I not make it clear that the double "my" was an error? It was
NOT what I intended.
> By the way, I couldn't help but notice that this is an eyesore:
>
> $table = 'fm_'.$bm.'_'.$variable.'_'.$weighting.'_weighting'
>
> Why not:
>
> $table = "fm\_$bm\_$variable\_$weighting\_weighting"
>
> ? :)
Convention.
> > I have been running this code for weeks with this bug. The compiler
> > never saw it. And I just found four more instances of the same bug! All
> > four can be seen above.
> >
> > This code compiles and runs from the command line without errors or warnings.
>
> You are getting no warnings because you have not turned on warnings. You
> should ALWAYS start your code with "use strict; use warnings;"
The first use statement in all my perl code is "use strict". It seems
this time I forgot the '-w' on the shebang line.
--
Regards,
Faber Fedor
President
Linux New Jersey, Inc.
908-320-0357
800-706-0701
http://www.linuxnj.com
More information about the ABE-pm
mailing list