467,882 Members | 1,241 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,882 developers. It's quick & easy.

New Language Simple Problem...I hope.

So this is my first time in the Perl forums, so greetings to all. I have recently decided to learn Perl since I have heard so many good things. The only problem is that I can not get my code to work. I am using Mac OS 10

Here is the code (taken line for line from the book Learning Perl)

print "Hello, world!\n";

I saved this file as hello.pl

I then went to the terminal and navigated to the appropriate directory and used the following lines:

chase:Perl_Learning_Perl chase$ chmod +x hello.pl
chase:Perl_Learning_Perl chase$ ./hello.pl

and the error I received was:

./hello.pl: line 1: {rtf1ansiansicpg1252cocoartf949cocoasubrtf330: command not found
./hello.pl: line 2: syntax error near unexpected token `}'
./hello.pl: line 2: `{\fonttbl\f0\fnil\fcharset0 AndaleMono;}'

Any help would be great, Thanks.
Jun 11 '08 #1
  • viewed: 920
1 Reply
I got it. The text editor I was using was formatting the text. I used the vi editor instead. it works. thanks.
Jun 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

27 posts views Thread by Jon Slaughter | last post: by
134 posts views Thread by evolnet.regular | last post: by
11 posts views Thread by Bryan | last post: by
669 posts views Thread by Xah Lee | last post: by
2 posts views Thread by scar5308 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.