Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

PerlMonks Humor

by Adam (Vicar)
on Sep 07, 2000 at 23:52 UTC ( [id://31460]=perlmeditation: print w/replies, xml ) Need Help??

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' 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. ;-)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://31460]
Approved by root
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-22 22:39 GMT
Find Nodes?
    Voting Booth?

    No recent polls found