SPUG: Slice of an arrary within a hash?
Joel
largest at largest.org
Fri May 5 18:56:00 CDT 2000
> ced at carios2.ca.boeing.com wrote
>
> #!/usr/bin/perl -w
> ^^^^^^
> ^^^^^^
> # enable warnings above. See -w
> # in action below:
<$0.02>
-w is a great tool, but I don't put it in the shebang line of my perl
scripts. This is because it turns on warnings for *all* Perl involved in
the script, which includes all use'd modules and all modules the use'd
modules use, and so on. Also, it will sometimes warn me about things that
I know are okay.
You can turn off the warnings temporarily by local'izing the $^W variable
around code you know might generate a warning. But at work there are some
older modules that are crufty and generate lots of (allowable) warnings.
So I get tired of reading a page of warnings I already know about every
time I run the script. (yes I realize someone should go fix the old
modules :-)
My solution? When I'm stumped on a debug or want to verify my code before
checking into production, I run
perl -cw myscript
which shows me the warnings.
</$0.02>
Joel
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/
SUBSCRIBE/UNSUBSCRIBE: Replace "action" below by subscribe or unsubscribe
Email to majordomo at pm.org: "action" spug-list your_address
More information about the spug-list
mailing list