fork(5) download
  1. $s=<>;
  2. sub f{9-$i-$_[0]?$":pop}
  3. for$i(0..8){
  4. $h=1;
  5. $_=$s;
  6. s!(\.*)(\d?)!
  7. $D=($w=length$1)+$h-($2||1);
  8. join'',(map{
  9. ($x=$_-int$D/2)<0
  10. ?f--$h,'\\'
  11. :$x
  12. ?f++$h,'/'
  13. :$D%2
  14. ?f--$h,v
  15. :f$h,'/'
  16. }0..$w-1),$2
  17. ?f$h=$2,'^'
  18. :''
  19. !ge;
  20. print if/\S/
  21. }
Success #stdin #stdout 0s 3608KB
stdin
..3..4...6...5....1
stdout
         ^         
        / \  ^     
     ^ /   \/ \    
  ^ / v        \   
 / v            \  
/                \^