#!/usr/bin/perl use strict; use warnings; # Ivan Novick # exec.pl # demonstrate the exec function # replaces the existing process with a new process running "date" command exec ('date') or print STDERR "couldn't exec date: $!\n"; # the existing process will not continue after the successfull exec call print "This message is only printed in the case of exec failure\n";