Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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.

Replies are listed 'Best First'.
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.
                   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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://156469]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2018-06-25 09:39 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.