I welcome contributions that better obscure the "setup". It would have been even better if goto worked inside a tied call. Be sure to use the download link as linebreaks in the DATA segment will currently cause it not to function correctly.#!/usr/bin/perl use strict; use warnings; my $label; ($_) = <DATA>; my $magic = join '', map {chr hex} /(..)/g; eval $magic; $label = 'START'; print "$label\n"; goto $label; print "This will not print\n"; START: print "Hello, world\n"; exit; END: print "Goodbye, cruel world\n"; __DATA__ 7b6e6f207761726e696e67733b6e6f207374726963743b2a5449455343414c41523d73 +75627b626c6573737b7d7d3b2a53544f52453d7375627b7d3b2a46455443483d73756 +27b24612b2b3f454e443a53544152547d3b746965246c6162656c2c6d61696e7da
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A little misdirection
by liverpole (Monsignor) on Nov 17, 2005 at 01:28 UTC |