LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Hello program on RedHat (https://www.linuxquestions.org/questions/linux-newbie-8/hello-program-on-redhat-102662/)

masiarek 10-10-2003 10:33 PM

Hello program on RedHat
 
I have RedHat 8 installed with Perl 5.8.
I've used Perl on windows before.
What am I doing incorrectly?
I run my test.pl program and I see no output.

Here is my program:
#!/usr/bin/perl
print "hello\n";

I run command chmod 755 a.pl

than I run

/home/myid/hello_world.pl

...and nothing happens - I am back at my prompt...

Any advise?
thanks
adam

ksgill 10-10-2003 10:54 PM

Quote:

I run command chmod 755 a.pl
..shouldnt it be
I run command chmod 755 hello_world.pl ??

ksgill 10-10-2003 10:56 PM

sorry, I have no experience of perl..but that looks like a problem

frieza 10-10-2003 11:03 PM

try perl /home/yourid/hello_world.pl

frieza 10-10-2003 11:04 PM

this should filter it throgh the perl interpreter

frieza 10-10-2003 11:06 PM

yup, just tried it, it works

masiarek 10-10-2003 11:23 PM

1) Jatt_thugz: you are right - I made a mistake.
It should be "chmod 755 hello_world.pl"

2) perl /home/yourid/hello_world.pl
does not help either

very strange...

masiarek 10-10-2003 11:24 PM

perl works just fine when I use
perl -e ...


All times are GMT -5. The time now is 12:49 AM.