in reply to (Golf) Cryptographer's Tool #2
107 chars w/o the linebreaks and indentation.sub e{$a=$_;eval"\$a=~y/\Q$_\E/\0-~/";$a} sub c{ ($_,$m,$n,$a,$d)=@_; map{$x=e; $_,[grep{e eq$x}@$d] }/\b[^ ]{$m,$n}\b/g }
which makes it 115 chars.map{$x=e;$_,[grep{e eq$x}@{$_[4]}]} " $_[0] "=~/ ([^ ]{$_[1],$_[2]})(?= )/g
Well it would be the same length:  `grep/.../,' parses, but  `grep/.../s,' doesn't seem to.map{$x=e;$_,[grep{e eq$x}@{$_[4]}]} grep{/^.{$_[2],$_[3]}$/s}$_[0]=~/[^ ]+/g
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: (Golf) Cryptographer's Tool #2
by tadman (Prior) on Jun 27, 2001 at 03:27 UTC | |
by chipmunk (Parson) on Jun 27, 2001 at 06:12 UTC |