LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-18-2003, 08:48 AM   #1
rhuser
Member
 
Registered: Jan 2003
Posts: 55

Rep: Reputation: 15
problems opening perl files


I am getting problems with trying to open a perl file:

the file is first.pl
--------------------
% my $planet = "World";
Hello, <% $planet %>!
--------------------

when i try to run i get the content of the file. although after i saved the file i told the system that the file is excecutable
chmod +x first.pl

http://134.36.16.12/perl/first.pl

The httpd.conf file includeds the following
Load Modules perl_module modules/mod_perl.so

PerlModule /usr/lib/httpd/modules

Anyone has any ideas, one final thing when i write perl -v i get perl 5.8.0.
 
Old 02-18-2003, 09:47 AM   #2
sggrubb
LQ Newbie
 
Registered: Feb 2003
Posts: 2

Rep: Reputation: 0
Have you included a perl header at the top

try including
-->
#! /usr/bin/perl
<--
At the top of your perl file
Note change /usr/bin/perl to where ever you installed perl
To find this out type
-->
type perl
<--
in your shell
 
Old 02-18-2003, 09:53 AM   #3
0micron
LQ Newbie
 
Registered: Feb 2003
Posts: 3

Rep: Reputation: 0
problems opening perl files

You must be kidding me.
First of all, How does your computer know this is a perl file? magic?
The first line of your code should be #!/path/to/your/perl/interpreter/bin/perl

$planet= "World";
print("Hello, $planet!")

You are lucky people on this forum are nice. Post a question like this on any other forum and your bum will be flamed to putrefaction. Read your manual!!!!!!! and stop cluttering the forum with type of questions. This is a 'newbies' forum not a 'moron' forum.
 
Old 02-18-2003, 10:03 AM   #4
rhuser
Member
 
Registered: Jan 2003
Posts: 55

Original Poster
Rep: Reputation: 15
after adding the path i get

#! /usr/bin/perl
% my $planet = "World";
Hello, <% $planet %>!

i am new to this, and i have read the manuals. but when i try the tutorials, which this is an example from i get this, i try to bug the file, but i cant get anything.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with opening stdc++ files linuxmandrake Debian 6 10-06-2005 02:15 PM
Opening .db files m123 Linux - Newbie 3 09-29-2005 04:51 PM
Opening files Diederick Programming 5 06-27-2005 08:11 PM
opening files... hoffman Linux - Newbie 10 11-13-2003 12:24 PM
problems opening perl files rhuser Linux - Software 2 02-18-2003 02:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration