Mystik Gotan wrote:
> No. Use warnings is a module, the -w flag is just some extra for error
> trapping (which sometimes really is useful!). But it's alright using both
> (along with strict, ofcourse). So -w is a built in 'function' and
> warnings.pm is just a module.
>
> (BTW, using the -T flag
>> 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:
pack
t; <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: use warnings; and #!/usr/bin/perl -w
Date: Tue, 26 Nov 2002 09:57:44 -0400
Is
use warnings;
the same as
#!/usr/bin/perl -w
Dylan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addition
No.
use warnings is file scoped. -w is 'executable' scoped. In other words any modules
that you 'use' will inherit the -w but not the 'use'.
At least that is my understanding from the Camel. And appears to be the case from what
I have seen in action.
http://danconia.org
--
Is
use warnings;
the same as
#!/usr/bin/perl -w
Dylan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]