in reply to Re^2: my Scope Pop Quiz
in thread my Scope Pop Quiz

An undefined value is represented by an empty string when printed

yes, but an undefined value should also print a warning under -w when one attempts to print it, and I'm not getting any warnings when I specify -w. Very odd.

Replies are listed 'Best First'.
Re^4: my Scope Pop Quiz
by Tanktalus (Canon) on Apr 09, 2005 at 14:12 UTC
    $ perl -we 'use strict; my $rv = 42 for (1); print $rv,$/' Use of uninitialized value in print at -e line 1.
    Seems to be printing a warning for me. The original code didn't include "use warnings" in it, so I added some and the warning expected did appear.
      Not on my ActivePerl v5.6.1. Is that what you're using? I tried both use warnings; and -w, like I said in the first post. Very odd, eh?