I'd like to wonder if there's a provision in Perl to give out warning messages about unused variables. C has this. Lint has this for C in more detail. But, it seems Perl doesn't. It could go a ways for helping clean up code.
--- Sample Code Start ---
#!/usr/local/bin/perl -W
use strict;
my $var_a;
print("Hello, world\n");
--- Sample Code End ---
No warning messages are created for this, despite $var_a being unused and irrelevant.
If there is a provision in Perl to do this, please email me. I would be happy to write a module to do this, but I think it probably would be quite difficult and involve lots of Perl internals that probably would change with Perl 6 anyway. Damian & Larry, are you listening? (grin).
Thanks to anyone who responds here or has a hint... Cordially, Kevin
-----------------------------------------------------
Kevin J. Rice
CPAN PAUSE ID: KEVINRICE / Chicagoland, IL, USA
Homepage(with email on it): JustAnyone.com
-----------------------------------------------------
In reply to Need Unused Variable Warning Msgs by justanyone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |