"flotsan" schreef: > it is told the following two statements are > different: > > 1) if ($_ = <STDIN>) { print; } # suboptimal: doesn't test defined > 2) if (defined($_ = <STDIN>)) { print; } # best > > But as I see it, these two do the same thing
perl -le ' print defined($_) ? "\"$_\"" : "<undefined>" , "\tis " , $_ ? "true" : "false" for undef, "", 0, "0", 0E0, "0E0", 0.0, "0.0", 1 ' -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>