On Wed, Sep 01, 2004 at 08:34:32PM +0100, McGlinchy, Alistair wrote:
> Puzzle: Write a one-liner longer than (say) 3 bytes that can improve
> on 0.77 distinct warnings per byte of code. The program should be -c
> valid, output nothing without -w and sound the alarm as much as
> possible with -w.

4 bytes, 5 warnings for 1.25 warnings / byte. 
13 bytes, 13 warnings for 1.00 warnings / byte.



S

P

O

I

L

E

R



S

P

A

C

E





% perl -we 'a<$a'     
Unquoted string "a" may clash with future reserved word at -e line 1.
Useless use of numeric lt (<) in void context at -e line 1.
Name "main::a" used only once: possible typo at -e line 1.
Use of uninitialized value in numeric lt (<) at -e line 1.
Argument "a" isn't numeric in numeric lt (<) at -e line 1.

% perl -we 'a^?$*?c<[EMAIL PROTECTED]' 
Unquoted string "a" may clash with future reserved word at -e line 1.
Use of /c modifier is meaningless without /g at -e line 1.
Use of $* is deprecated at -e line 1.
Possible precedence problem on bitwise ^ operator at -e line 1.
Useless use of bitwise xor (^) in void context at -e line 1.
Name "main::b" used only once: possible typo at -e line 1.
Use of uninitialized value in regexp compilation at -e line 1.
Use of uninitialized value in pattern match (m//) at -e line 1.
Use of uninitialized value in scalar dereference at -e line 1.
Use of uninitialized value in array dereference at -e line 1.
Use of uninitialized value in 1's complement (~) at -e line 1.
Argument "" isn't numeric in numeric lt (<) at -e line 1.
Argument "a" isn't numeric in bitwise xor (^) at -e line 1.

-- 
Juho Snellman

Reply via email to