in reply to Unsure why this isn't working?

You need to use a TEXT editor rather than a word processor to edit your text. Use notepad and save as text, not RTF or some other format. Word processors put in all kinds of extra information to control fonts, page layout & such.

If you're in a command-line window and you type out your program, you'll see that it's got quite a bit more than those two lines of code.

...roboticus

Replies are listed 'Best First'.
Re^2: Unsure why this isn't working?
by dasgar (Priest) on Aug 04, 2010 at 22:19 UTC

    Also, if the file was created/edited in Windows and then copied to the *nix system, you'll run into weird issues to differences in formats (such as \r vs. \r\n). I'm speaking from personal experience on this one. :D

    If that's what you did, you'll need to run the dos2unix utility to convert the file to the *nix formatting.