R. Joseph Newton wrote: > > Richard Heintze wrote: > > > > I think what you want is this: > > > > > > no warnings qw(uninitialized); > > > > > > > Would I put this immediately after "use warnings;"? > > I would recommend against it, unless you are intending to > keep all your programs very small. Any change to basic > browser/interpreter functionality, or to essetial built-in > operators, constructs, system variables, etc., should really > be localized. You can do this very painlessly: > > my $k = $q->param('xyz'); > { > no warnings 'uninitialized'; > print qq[ \$k = $k ]; > } > > Note that I left the assignment line out of the anonymous > block. This is in case you want to use this value or lack > of same later in your script, as any variable declared > within the block disappears from view after it finishes.
Hi Joseph. I agree wholeheartedly. Perl is already very flexible in the DWIM department: it will allow both text concatenation and arithmetic increment on an undefined value. I have always been grateful for the, 'Are you sure you mean this?' that 'use warnings' gives. (I just wish that 'no uninitialised' was also valid). Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]