... #the child process else { unless (@ARGV) { # read a line from stdin, if no args given on command line my $line = ; chomp $line; push @ARGV, split(' ', $line); } print $socket "$_\n" for @ARGV; } ...