Perl Programming/Keywords/exec
< Perl Programming | Keywords
The exec keywordEdit
exec executes a system command and quits the Perl program. To return back, system should be used. The only way exec returns, if the command does not exist and it is executed directly instead of via your system's command shell. In this case, it fails and returns false.
SyntaxEdit
eval EXPRESSION
eval PROGRAM LIST
ExamplesEdit
exec ('foo') or print STDERR "couldn't exec foo: $!";