[Kc] Perl Noob
emmanuel.mejias at gmail.com
Wed Sep 19 08:06:18 PDT 2007
On 9/19/07, djgoku <djgoku at gmail.com> wrote:
> On 9/19/07, Eric Wilhelm <scratchcomputing at gmail.com> wrote:
> > # from djgoku
> > # on Wednesday 19 September 2007 00:22:
> > >warnings are pretty early on seems to start on page 24 with 'perl -w
> > > script.pl'
> > As of (roughly) v5.6.2, -w is different though. See perlrun and then
> > perllexwarn. With '-w', you're enabling warnings globally -- on all of
> > the modules being loaded. This is sometimes nice to check, but (e.g.
> > in tests) not if the modules weren't tested with warnings enabled.
> I was meaning both 'use (strict and warnings)' from inside the script.
> Like the code fragments you posted.
> kc mailing list
> kc at pm.org
Thanks for the feedback guys! Just to answer some questions out there, I am
familiar with the -w switch as well as strict. The class that I am taking is
through Oreilly Media and they use the *Learning Perl* book from Oreilly
except that the instructor has not covered warnings or strict yet. Where as
in the *Perl by Example* book that I was using prior to the class mentioned
In this exercise the instructor was asking that I use the pre-defined
environment variable hash that is discussed in this lesson, which is print
%ENV; so that is why I created the script as a hash originally. I'm just
confused as to why it only prints out 3 and skips every other one.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kc