<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 19-Oct-06, at 1:14 AM, Bill Raty wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">You have warnings enabled 'the -w switch on shebang'.<BR><BR>With warnings enabled perl will output a message whenever it detects an undefined value in a join or string interpolation.  To demonstrate:<BR><BR>  use warnings; <BR>  use strict;<BR><BR>  my $empty = undef;<BR>  print "Perl will warn about this $empty string.\n";<BR><BR>I rarely use warnings in production code.  It is better to locally scope warnings in code sections where you are certain you must always have data that is not null. <BR><BR> </BLOCKQUOTE><BR></DIV><DIV>I usually work the other way around, using warnings everywhere, and then using no warnings as tightly scoped as possible to mark where I know uninitialized variables and perl's treatment of them are OK</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>use strict;</DIV><DIV>use warnings;</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>my $empty = undef;</DIV><DIV>{</DIV><DIV>    no warnings 'uninitialized';</DIV><DIV>    print "Perl will not warn about this $empty string.\n";</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>(Let's not notice that $empty is initialized in this code, so the warning is misleading.)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The same goes for using "no strict 'refs';"  around code where I might be using strings to manipulate the symbol table.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The lexical relaxation reminds me later that I was doing something "odd" in this chunk of code.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Mike</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Mike Stok &lt;<A href="mailto:mike@stok.co.uk">mike@stok.co.uk</A>&gt;</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.stok.ca/~mike/">http://www.stok.ca/~mike/</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The "`Stok' disclaimers" apply.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN></SPAN></SPAN> </DIV><BR></BODY></HTML>