Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!wizvax!willow!shawn From: shawn@willow.MV.COM (Shawn M. Rogers) Newsgroups: comp.lang.perl Subject: Starting a perl script Message-ID: <224@willow.MV.COM> Date: 21 Mar 91 03:06:04 GMT Organization: Shawn Rogers - Methuen, MA Lines: 39 Hi, I've got a pretty simple question that is driving me crazy... I'm running SCO XENIX 2.3.2 and am using perl 3.44. My shell does not use the "#!" that is used in many shell scripts at the beginning. According to the nutshell handbook on perl, a way around this is by replacing the "#!" line with the following: eval '/usr/bin/perl -S $0 ${1+"$@"}' if 0; [perl script here....] This works to some degree... The perl script runs, but then when it finishes executing, I get an error. Here is an exaple: *** SCRIPT **** eval '/usr/bin/perl -S $0 ${1+"$@"}' if 0; print "Howdy, world!\n"; *** OUTPUT *** Howdy, world! howdy: syntax error at line 4: `end of file' unexpected Can anybody tell me why I'm getting this error when the script runs? Is there a way around it? Please email your response unless you think it would be of general interest....and, thank you for your help in advance! Shawn -- Shawn M. Rogers shawn@willow.MV.COM 176 East Street #205A ..{decvax | harvard}!zinn!wgc386!slum!willow!shawn Methuen, MA 01844 ...uunet!samsung!wizvax!willow!shawn