$args=""; while ($x=shift){$args.=" $x";} $cmdstring=qq/perl -e "system \\\"perldoc $args\\\"" > tmp/; system $cmdstring; open F,"