Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!hplabs!hpcc05!hpcc01!okamoto From: okamoto@hpcc01.HP.COM (Jeff Okamoto) Newsgroups: comp.lang.perl Subject: Questions about exec and scripts called from cron Message-ID: <1180002@hpcc01.HP.COM> Date: 27 Sep 90 23:08:37 GMT Organization: Tendou Dojo Lines: 25 Two more puzzling questions for patchlevel 18: 1. Why does this construct not do what I think it should? exec "/non-existent-file" || die "Can't exec: $!\n"; 2. Why does this construct not work when this script is called from cron? #!/usr/local/bin/perl eval "exec /usr/local/bin/perl -S $0 $*" if $running_under_some_shell; The output here is a message from cron, saying: sh: : execute permission denied (or something like that). -- \ oo The New Number Who, \____|\mm Jeff Okamoto //_//\ \_\ HP Corporate Computing & Services /K-9/ \/_/ okamoto@ranma.corp.hp.com /___/_____\ ----------- (415) 857-6236