I was giving some coworkers a brief introduction to Perl this morning, and quickly the conversation turned into plans about how to annoy one's neighbor using the awesome super-colossal powers of Perl. As monks, we have to suppress our rage, and we would never actually unleash these upon humanity, but I'm curious as to what evil *really* lurks in the hearts of my monastic brothers. This isn't a golf per se, but it's done in the spirit of "I can annoy you in 30 characters!"

So to kick it off, I can annoy you in 17 characters!

print"\a"while(1)

(I guess one could also do `rm -rf /`, which would be pretty annoying as well.)

"We're experiencing some Godzilla-related turbulence..."

Replies are listed 'Best First'.
Re: (Golf... sorta) Annoy your neighbors!
by stefp (Vicar) on Oct 12, 2001 at 21:00 UTC
    We got so far, eating screen space, process table, call stack and cpu. For completude, let us waste heap space:
    $/.=$/while 1

    -- stefp

Re: (Golf... sorta) Annoy your neighbors!
by echo (Pilgrim) on Oct 12, 2001 at 19:46 UTC
    15 characters:

    fork while fork

      I always find it funny that people write "fork while fork", when "fork while 1" should, in theory at least, take a system down faster. Although two forks look more menacing than one, this is not really the case ;)
         MeowChow                                   
                     s aamecha.s a..a\u$&owag.print
Re: (Golf... sorta) Annoy your neighbors!
by broquaint (Abbot) on Oct 12, 2001 at 20:01 UTC
    sub x {&x}x #2345678912
    No fork bomb, but deep recursion is no good thing. A rather more amusing but less perlish annoyance is
    `cat /dev/urandom > /dev/audio`
    Teehee.
    HTH

    broquaint

    NB: HTH - Hope That Hurts ;op

    Update: heck, brackets are just another pair of characters to make you under par in golf
    Update 2: sorry trantor, I didn't see your post 'til mine had gone through, honest!

      A bit shorter:

      #2345678901 sub x{&x}&x

      Update: no problem broquaint, you've just made me notice that I can chop another character :-)

      #234567890 sub x{&x}x

      -- TMTOWTDI

Re: (Golf... sorta) Annoy your neighbors!
by Albannach (Monsignor) on Oct 12, 2001 at 19:57 UTC
    8 characters. Not as annoying but it does suck up CPU and it is at least shorter:

    1while 1

    --
    I'd like to be able to assign to an luser

      6 characters. A shorter way to suck up CPU:
      {redo}
(MeowChow) Re: (Golf... sorta) Annoy your neighbors!
by MeowChow (Vicar) on Oct 12, 2001 at 23:04 UTC
    I don't recommend that you actually try this:
      
    perl -e 'unlink$ENV{_}'
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
Re: (Golf... sorta) Annoy your neighbors!
by rob_au (Abbot) on Oct 13, 2001 at 06:54 UTC
    Some of the replies in this thread reminded me of a previous thread titled one-liner hogs initiated by jptxs - While not golf, some of the code in the replies of that thread could well be applied to this discussion, in particular, this one from tye.

    *grin*

     

    Ooohhh, Rob no beer function well without!

Re: (Golf... sorta) Annoy your neighbors!
by Chady (Priest) on Oct 13, 2001 at 12:04 UTC

    not sure what this does technically, but it sure killed a P IV

    @n=('a'..'zzzzzz');

    He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

    Chady | http://chady.net/
Re: (Golf... sorta) Annoy your neighbors!
by jynx (Priest) on Oct 13, 2001 at 04:15 UTC

    i'm always a fan of wasting disk space personally so here's the shortest way i can see of doing that:
    {open N,">/$=";print N"x"x$=++;close N;redo}
    or we could also check out how many open files we can have with a small modification:
    {open N,">/$=";$=++;redo}
    These can probably be shortened as well...

    jynx