Sadly,
This japh isn't as robust as my original plans, but it does fit on the four lines that is recommended. The full version takes data from a file and performs checks on that, which is much more interesting. Oh well. here it is:
enjoy,#!/usr/bin/perl -w use strict; $;='|';@_=(0,0);@;=map[split/,/],split/;/,"',106,0,0,1;1,',0,1,0;0,0 ,',1,1;0,97,112,',0;1,0,104,0,'";{$;[$_[0]][$_[1]]=~/[1-9]/?($;{$_[ $;eq'|']}++&&last,$;=$;eq'-'?'|':'-',$_{$;[$_[0]][$_[1]]}++,($_[$;eq '|']+=1)%=@;):(($_[$;eq'|']+=1)%=@;);redo}print chr for reverse keys%_
jynx
update: one of these days i'm going to finish something before i post it. *sigh*, maybe. oh well, here's an updated version, a bit more interesting i think...
nuf evah...#!/usr/bin/perl use strict; @;=map[split/,/],split/;/,<DATA>;--$|;{$;[$_[0]][$_[1]]=~ /[1-9]/?($;{$_[$|--]}++&&last,$_{$;[$_[0]][$_[1]]}++):8,( $_[$|]+=1)%=@;;redo}print chr for reverse 10,keys%_ __END__ ',106,0,0,88;4,',0,7,0;0,0,',12,94;0,97,112,',0;5,0,104,0,'
update2: d'oh! This seems to have been broken on perl 5.8. i tested multiple platforms with perl 5.6 and it seemed to work correctly (otherwise i wouldn't have posted it at all). Hmm, if i get time i'll reply to this post with an updated version that works... *sigh*, one of these days...
Back to
Obfuscated Code