At 01:40 PM 6/15/01 -0700, Mark Ross wrote:
>At 02:58 PM 6/15/01 -0400, Tim Musson wrote:
> >Hey all,
> >
> >I have been using
> >#!/perl -w
> >
>
>What about using "use warnings" rather than the "-w"?
>
>It seems that I read in Programming Perl to use "use warnings" but it all
>seems foggy now.
>
>Are the two the same thing?
More or less. 'use warnings' gives you fine control over what warnings are
enabled and allows you to turn them into fatal errors selectively. You can
also create your own warning classes. 'use warnings' came along with 5.6,
so if you want something to work with earlier perls, stick with '-w'. And
if you intend to get all the warnings anyway, '-w' has the same effect and
is less typing.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com