my $pid = fork(); if ($pid) { wait($pid); # Plus appropriate checking } elsif(defined($pid)) { open(STDOUT,">$temp$file") or die "Cannot open $temp$file: $!\n"; exec(qw("/3rdparty/perl/bin/sunos5/lwp-request -p http://proxy-syr.global.lmco.com),"$hostname$url","-C","$user:$password"); die "Cannot exec: $!\n"; } else { die "Cannot fork: $!\n"; } system(qw(chmod 777),"$temp$file"); system(qw(acroread -toPostScript),"$temp$file"); system(qw(lp -d ep5_hpp01), $temp, glob("*.ps"));