in reply to Re^3: How exactly does no work?
in thread How exactly does no work?
Okay, let’s just cut to the chase here. use is somewhat of an “overloaded” construct in Perl. It can be employed to reference an outside module (use foo;), or as a pragma to request certain compile-time behavior (use strict;).
When I typed in what you entered as a “one-liner,” I got various compilation errors (as I should have). There are several things quite wrong with the code ... undeclared variables, parentheses, and so forth. On my system it will not compile at all. If I add my ($b, $d); I get no output at all because of course everything is now undef. So I am just going to set that (non-)example completely aside.
no warnings; like its brother use warnings;, is a compile-time directive. It instructs Perl to behave in different ways when compiling your source-code into its internal form for execution. One form countermands the other. I do not profess to know the whys and wherefores of these things because the one thing that I do know is how to use them correctly, which IMHO is:
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How exactly does no work?
by chromatic (Archbishop) on Feb 17, 2012 at 01:08 UTC |