http://qs321.pair.com?node_id=31460

At first I thought this would be an addition to the PerlMonks quotes node, but then I realized there was too much context. So here it is, the chatterbox conversation that demonstrates one of the virtues of a Perl Monk... a sense of humor:


OzzyOsbourne What happens if I set an array to a scalar?
jcwren Usually, you'll get the count of elements in the array, if you mean $scalar = @array
gaspodethewonderdog I believe you get the size of the array in the scalar
Fastolfe your computer explodes
Fastolfe I think he means @array = $scalar
OzzyOsbourne Crud. that's what I meant
jcwren Oh, right. Yes, you computer explodes
Fastolfe which would be equiv to @array = ($scalar)
myocom It's best to do that on someone else's computer.
Fastolfe oh ok, well your computer will be fine in that case
Fastolfe but for god's sake don't reverse it.. that's why we do 'perl -cw script.pl' to check it before we run it
Fastolfe and of course 'use strict' would catch it and let you know that your computer would explode at compile-time
myocom Though, just for the sake of providing an actual answer, you get an array with one element

Replies are listed 'Best First'.
RE: PerlMonks Humor
by OzzyOsbourne (Chaplain) on Sep 08, 2000 at 17:15 UTC
    I was involved in this, and I missed the whole thing. I actually did mean $scalar=@array, though. I was answering jcwren, and it looks like I was answering fastolfe. I was too busy working with one eye on the script and the other on the chatterbox.
      Good thing, too, or else your computer would've exploded. ;-)