#!perl
$$=pop;$.=$ARGV[$|--],$_.=$.x substr$_.$.,$*++,1while!/.{$$}/;print$&,$/
|
#!perl
$l=pop;$.=$ARGV[$|--],$_.=$.x=substr$_.$.,$o++,1while!/.{$l}/;print$&,$/
|
#!perl
$l=pop;$.=$ARGV[$|--],$_.=$.x substr$_.$.,$o++,1while!(/.{$l}/&&print$&,$/)
|
#!perl
$l=pop;$.=$ARGV[$|--],$_.=$.x substr$_.$.,$o++,1 while$o<$l;print/(.{$l})/,$/
|
#!perl -l
$l=pop;($x,$y)=@ARGV;while(length$_<$l){$q=($|--?$y:$x);$_.=$q x substr$_.$q,$o++,1}print substr$_,0,$l
|