Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: How to kill perl?

by mikeock (Hermit)
on Nov 04, 2005 at 21:39 UTC ( [id://505878] : note . print w/replies, xml ) Need Help??


in reply to How to kill perl?

Wow, There are some really interesting ways to acomplish this! Any one have any others?

Replies are listed 'Best First'.
Re^2: How to kill perl?
by robin (Chaplain) on Nov 04, 2005 at 23:30 UTC
    Any one have any others?

    I just fixed a whole bunch of sort-related ones, which is what got me thinking about this. If your perl is less more than a week old, these should kill it:

    perl -e'sub f{undef &f} ()=sort f 1,2' perl -e'sub f{goto sub{1}} ()=sort f 1,2' perl -e'@a=(1..10);@a=sort{@a=(1);0}@a'

      perl -e'@a=(1..10);@a=sort{@a=(1);0}@a'

      That works fine for me on 5.8.0 buts segfaults on 5.8.7.

      -sauoq
      "My two cents aren't worth a dime.";
      
        Since 5.8.4, @foo = sort @foo is optimised to be an in-place sort of @foo, which is what makes it die so messily.