Perl exec vs. system 

Joined:
04/09/2007
Posts:
565

December 04, 2009 05:29:11
From Perldoc:

The exec function executes a system command and never returns - use system instead of exec if you want it to return. It fails and returns false only if the command does not exist and it is executed directly instead of via your system's command shell.

Since it's a common mistake to use exec instead of system, Perl warns you (if -w is set - but you always do that) if there is a following statement which isn't die, warn, or exit .
[ Comment  | Tags ]
 
Easy email testing with http://www.ximailstop.com