Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: (Golf) Segfault Perl

by clintp (Curate)
on Apr 03, 2002 at 22:31 UTC ( #156469=note: print w/ replies, xml ) Need Help??


in reply to (Golf) Segfault Perl

I don't personally golf, but am curious: does this also preclude signaling? kill 11,$$ isn't too creative or fun.


Comment on Re: (Golf) Segfault Perl
Download Code
Re: Re: (Golf) Segfault Perl
by VSarkiss (Monsignor) on Apr 03, 2002 at 22:44 UTC

    Well, for one thing, that won't segfault on Win32. Not on my Win2K box with Activestate's build 628 of 5.6.1, anyway.

(MeowChow) Re2: (Golf) Segfault Perl
by MeowChow (Vicar) on Apr 03, 2002 at 22:59 UTC
    Hmm... good syscall :) I entirely forgot about that, but since it doesn't crash Windows, you do get a two stroke penalty. I think Juerd's will be difficult to beat.
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print
Re: Re: (Golf) Segfault Perl
by theorbtwo (Prior) on May 31, 2002 at 01:40 UTC

    Won't work where SIGSEGV isn't 11. (You could do tricks with %SIG, but that would up the stroke-count.)


    We are using here a powerful strategy of synthesis: wishful thinking. -- The Wizard Book

Re^2: (Golf) Segfault Perl
by ambrus (Abbot) on Jun 11, 2005 at 15:34 UTC

    kill 11,0 is shorter.

    You could cut down one more character by making it kill 7,0 (a bus error), but that signal number is not as portable to other architectures as 11 (segfault).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://156469]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2014-08-31 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls