Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of nicholas (3034)

Thursday February 19, 2004
11:48 AM

goto considered fun

[ #17496 ]

Over the weekend I wrote some perl. It was fun. I don't seem to do much of this - maybe I should do it more often.

Anyway, in my perl I used lots of gotos. It's the first time I've used goto in anger in perl. I've added goto to the C source more than once, but never in perl.

Anyway, thanks to goto I now have this nice, clear code structure where I make regular subroutine calls and returns (visualise this as up and down) and I use goto to jump sideways between different subroutines at the same level. Fun. I'm curious if this technique could be useful for Befunge to Perl translators.

Of course, some people claim that goto & isn't a real goto, but I don't listen to them. Unfortunately the subroutine exits using last didn't survive from the prototype into the CPAN version, but they were fun while they lasted.

All this nasty evil hackery was based on some very nice code by Ton Hospel.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.