Back to task

414 symbols perl
Tue May 3 03:06:10 2016 megahallon
#!/usr/bin/perl
@i=map{chomp;substr$_,6}<>;sub s{length$&}sub z{$n=0;while($i[$w*2+1]=~/(\d+)(:(\d+))?/g){$p=-$1-1;$l=-($3//$1)-$p;substr$f[$w],$p,$l,++$n x$l;$w?(substr($i[2],$p,$l,substr$r,$q,$l),$q+=$l):($r.=substr$i[0],$p,$l)}$w++}@f=map{' 'x length$_}@i[0,2];z;z;($p,$w)=map{s/(\d)\1*/$1.' 'x(&s-1)/ger}@f;($g,$h)=map{s#(\d)\1*#&s-1?'/'.'-'x(&s-2).'\\':'^'#ger}@f;$_="From:!$p!$g!$i[0]!!=$r!!To:!$w!$h!$i[2]";s/ *!/\n/g;print


Leave a comment

Parsed as Markdown

Login to leave a comment