in reply to differences between eq "" and !

... #### prints TEST2 passed
oh? really?

Replies are listed 'Best First'.
Re^2: differences between eq "" and !
by TimToady (Parson) on Dec 14, 2006 at 17:14 UTC
    Obviously one of those cases where the code was mistranscribed. The context indicates the second test should have a ! in it. Interestingly, if we make that conjectural emendation, Perl 6 says:
    TEST1 passed
    TEST2 passed
    because in Perl 6 arrays in scalar context wait until they see whether it's going to be numeric or string context to decide whether to produce a number or a string. One could view the Perl 6 effort largely as an effort to upgrade to a better FAQ. Or at least a different one... :-)