September 22, 1999 Strong Typing Slide #33

Type Checking in Perl: Gaaaack

        while (<>) {
          $total += $_;
        }
        @a = (1, 3.1416, "A painted lotus flower");
        @a = localtime();
        $s = localtime();
        print ;
        if (@a) { ... }
        $s = @a;
        $a[100000] = 'big!';
        $h{nosuchkey} = 'It means "to chop"';

Probably none of these would work right.

Conclusion:

You can't make a hot fudge sundae with mashed potatoes instead of ice cream, either.


Next Copyright © 1999 M-J. Dominus