#Finished setup of two arrays 5761 x 2801 #After - using system("date");: #exited with value ($? >> 8) = 0 # #signal number ($? & 127) = 0 # #dumped core ($? & 128) = 0 Use of uninitialized value $cmd in print at ./xpt3.pl line 67. #After - using backticks: readline() on closed filehandle CMD at ./xpt3.pl line 71. Use of uninitialized value $result in concatenation (.) or string at ./xpt3.pl line 72. #After - using open: #End #### #Finished setup of two arrays 5761 x 2001 #After - using system("date");: Wed Feb 17 13:13:24 GMT 2010 #exited with value ($? >> 8) = 0 # Wed Feb 17 13:13:24 GMT 2010 #signal number ($? & 127) = 0 # Wed Feb 17 13:13:24 GMT 2010 #dumped core ($? & 128) = 0 #After - using backticks: Wed Feb 17 13:13:24 GMT 2010 #After - using open: Wed Feb 17 13:13:24 GMT 2010 #End #### print "#Finished setup of two arrays $i x $j\n"; #Using system() print '#After - using system("date");: '; system("date"); if ( $? == -1 ) { print " #command failed: $!\n"; } else { print " #exited with value (\$? >> 8) = ",($? >> 8),"\n"; } print "# "; system("date"); if ( $? == -1 ) { print " #command failed: $!\n"; } else { print " #signal number (\$? & 127) = ",($? & 127),"\n"; } print "# "; system("date"); if ( $? == -1 ) { print " #command failed: $!\n"; } else { print " #dumped core (\$? & 128) = ",($? & 128),"\n"; } #Using backticks $cmd = `date 2>&1`; print "#After - using backticks: ",$cmd; #Using open() open(CMD, "date 2>&1 |"); $result = ; print "#After - using open: $result\n"; close(CMD); print "\n#End\n"; exit;