print "XDB19\n"; exit( 3 ); #### open( LOG, "perl ex.pl|" ); # open the program while ( ) { print "$_"; } # print output from prog close( LOG ); # wont work without close $errcode = ( $? / 256 ); # there is a number stored # in the $? variable, and # it happens to be the exit # code * 256 ...so divide, # and conquer print "***$errcode***\n"; #print it ( stands out doesnt it )