@list = sort({ $a <=> $b } split(/ /, scalar(<>))); while(<>){ print; if($. - 1 == $list[0]){ print; shift@list; } }
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page