Nice work, but may I suggest that
> Display the contents of variables using print or warn
> warn "$var\n";
is changed to
warn "<$var>";
?
Two reasons:
A beginner might get lost where the error originates.
A beginner should be made aware if his variable ends on a newline.
C:\>perl $var = "abc\n"; # trailing newline warn "$var\n"; warn "<$var>"; warn "$var"; __END__ abc <abc > at - line 4. abc
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
I just realized that your point 3 covers chomp and detecting whitespace, but I'm still not sure why you're disabling the line info in warn.
In reply to Re: Basic debugging checklist
by LanX
in thread Basic debugging checklist
by toolic
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |