Just do: perl -w /path/to/script.pl
The problem is that the warnings of Use of uninitialized value in string at... and Use of uninitialized value in concatenation (.) or string at... are quite overwhelming with uninitialised variables. The reported location is often many kilobytes of distance away from the actual error.
$ cat test-w
#! /usr/bin/perl
use strict;
use warnings;
my %hash = (
fred => {
qw( odd number of elem ents ),
},
);
$ perl -wc test-w
test-w syntax OK
$ perl -we "require qq{test-w}"
Odd number of elements in anonymous hash at test-w line 6.
Is there a way to turn those uninitialised warnings off on the command line?
In reply to Re^2: Determining presence of odd number of hash elements, other syntax problems
by nicku
in thread Determining presence of odd number of hash elements, other syntax problems
by nicku
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |