----- Original Message -----
From: "$Bill Luebkert" <[EMAIL PROTECTED]>
.
.
>
> This is more of what I had in mind as a test which proves my point
> that a proper true returning call would work :
>
> foreach (-1, 1, 0, undef, 'die') {
> if (eval { foo ($_) } ) {
> print "foo didn't fail on '$_'\n";
> } else {
> print "foo failed on '", defined $_ ? $_ : '<undef>',
> "': [EMAIL PROTECTED]";
> }
> }
> sub foo { return shift unless defined $_[0] and $_[0] eq 'die'; die 'I
Died'; }
>
For me that prints:
foo didn't fail on '-1'
foo didn't fail on '1'
foo failed on '0':
foo failed on '<undef>':
foo failed on 'die': I Died at try.pl line 10.
That's exactly what I expected it to produce ... so I guess we must be in
agreement :-)
Cheers,
Rob
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs