>> On 26 Nov 2002 09:57:44, Dylan Boudreau <[EMAIL PROTECTED]> said:
> Is use warnings; the same as #!/usr/bin/perl -w
Good question. They're similar, but 'use warnings':
- only works under Perl 5.6+
- works _lexically_, rather than globally
- this means that you can do this:
package main;
code_that_emits($warnings);
package two;
use warnings;
code_that_emits($warnings); # warning is given here, but not above
- allows you to choose what you see warnings on
- this also works in reverse, so you could:
no warnings "uninitialized";
.. and you wouldn't see initialization warnings in that scope.
Hope this helps. perldoc perllexwarn for some more..
- Chris.
--
$a="printf.net"; Chris Ball | chris@void.$a | www.$a | finger: chris@$a
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]