in reply to Unsure why this isn't working?

You got a good answer from roboticus but there is more to think about. If you take the first line of problem output-

Backslash found where operator expected at hello.pl line 1, near "rtf1\"

and put it through google: rtf1 you'll get this kind of thing back: RTF - Rich Text Format (tutorial). Which is an oblique answer: the file is not in plain format and raw code (generally) must be.

There are *many* hurdles to teaching yourself to program. You just stumbled over one of the first. The thing that sometimes takes much too long to learn is that there are just as many tools and helpers as there are obstacles. If you foster developing investigation skills from the beginning, you'll be on easy street a year or two ahead of what most of us self-taught code monkeys paid. :)

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

    Which is an oblique answer: the file is not in plain format and raw code (generally) must be.

    When I wrote control software for nuclear reactors, we had to write each program twice. Once in assembler, once using a combination of variable definition tables, prose and Pascal-ish code in Word. The idea was to use as different a mental model as possible.

    The Word doc would serve as the final spec and documentation, but it would also be parsed and compiled so that we could run our test suite against it (in order to compare the results it gave with those from the assembler program).

      That's a *great* story and a really interesting/cool approach. Also, I'm glad it was you writing nuclear reactor software and not me. Better for everyone, I think.

      Is that why there was that "low level" radioactive material leak in a Canadian reactor? ;)
      Seriously..don't you end up with two essentially different programs that test and execute differently?
      Java has a disclaimer not to be used for controlling reactors or missiles..funny stuff
      the hardest line to type correctly is: stty erase ^H

        don't you end up with two essentially different programs that test and execute differently?

        You end up with two programs that are functionally equivalent. If their output diverge, there's a bug in at least one of them. Or in the program that compiles the Word document, as it happened a couple of times.

        Is that why there was that "low level" radioactive material leak in a Canadian reactor? ;)

        This? It sounds so minor! It would probably be worth it for the excitement of getting something other than zero on the periodic urine tests used to detect alpha and beta doses. Badges detect gamma.