in reply to Help with Hello World Program (was: I lower my head in awe and shame... mainly shame.)

well, one problem is that you should be using a backlash instead of a slash in the print statement:
print "Hello World\n";
although it should still print something, you just won't have a newline at the end (it will appear in front of your shell prompt).
  • Comment on Re: I lower my head in awe and shame... mainly shame.

Replies are listed 'Best First'.
Re: Re: I lower my head in awe and shame... mainly shame.
by Anonymous Monk on Jun 11, 2002 at 18:00 UTC
    Ummm... the backslash was it. OK, my career in debugging is over {Head lowered to ankles in shame, and appreciation of non-flames is quite high} Thanks for tolerance, Paul
      Hmmm... now in scanning the other answers, I guess I AM wondering why it didn't print: "Hello World/n" {error and all}, or prepend my prompt with something. It's not ABSOLUTELY vital I know the answer to this, but now just curious... trying to rebuild debugging career and all. Thx, paul P.S. You probably WERE NEVER THIS dumb!
        It wouldn't have generated an error*, but you may be Suffering from Buffering?. To find out, change your code to the following:
        #!/usr/bin/perl $|++; print "Hello World/n";

        --Jim

        Update1: Added the "/" to the shebang. Note that executing this program will look something like the following since your newline is mangled:

        prompt> helloworld.pl Hello World/nprompt>

        Update2: * provided you ran your program from the root (/) directory, the relative path would've worked if the rest (usr/bin/perl) was correct.