How do i run perl on windows 98

Reply

Join Date: May 2005
Posts: 13
Reputation: 001 is an unknown quantity at this point 
Solved Threads: 0
001 001 is offline Offline
Newbie Poster

How do i run perl on windows 98

 
0
  #1
May 12th, 2005
Hello,

I am new to perl, and am using perl on windows 98, i have tried writting a program, but the problem i experiencing is how to run the program.

1 i am using active perl 5 which came with an installer
2.i use note pad for the program and saved with the extension .pl

What do i do to run this program. Please help.


001
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do i run perl on windows 98

 
0
  #2
May 12th, 2005
You could post the code, if it's a program with the code. One thing that I like to do is use a dos prompt and try to run the file.... you MIGHT have to load the perl Executable and pass the file as a parameter, something like:

  1. c:\perl\bin\perl.exe myfile.pl

I have it running on my XP box, and I can just double click it, or type the name of the .pl file, as if it were an exe, com or bat. However, the first line of the perl file should be the path to your perl.exe... so:

  1. #!c:\perl\bin\perl.exe

It might be different on your system, I'm not sure, but if none of those solutions work, post your code, and we'll check it out.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 13
Reputation: 001 is an unknown quantity at this point 
Solved Threads: 0
001 001 is offline Offline
Newbie Poster

Re: How do i run perl on windows 98

 
0
  #3
May 14th, 2005
c:\perl\bin\perl.exe myfile.pl

where do i write that, on the run command of windows or the ppm of perl. On the ppm command, it does not recognize it while it says "file not found on the run command of windows".

c:\perl\bin\perl.exe is where mine is.

Actually, when i wrote the program in notepad, i save it on my desktop. It has the perl icon, but the problem is, when i double-click the icon for the program, the perl DOS screen pops-up with the output and disappears within a second such that you cannot see the output.
Any suggestions please.

001
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do i run perl on windows 98

 
0
  #4
May 14th, 2005
Well, You could click on start, go to run, type in cmd, and then use the dos interface to run the perl program. You put the #!c:\perl\bin\perl.exe as the very first line in your perl file. I might be confused, but it sounds like you are writing a perl module, and not an actual perl script, because most perl modules end in .pm, or I'm guessing too .ppm. However, if you run the script from the command line, you will see any output that it spits out at you.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 13
Reputation: 001 is an unknown quantity at this point 
Solved Threads: 0
001 001 is offline Offline
Newbie Poster

Re: How do i run perl on windows 98

 
0
  #5
May 21st, 2005
you will see any output that it spits out at you.


I was just wondering if it is not possible to make the output remain on the screen instead of it just spitting it out, making it difficult to see the output.

001
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 3,826
Reputation: Catweazle is a jewel in the rough Catweazle is a jewel in the rough Catweazle is a jewel in the rough Catweazle is a jewel in the rough 
Solved Threads: 144
Team Colleague
Catweazle Catweazle is offline Offline
Grandad

Re: How do i run perl on windows 98

 
0
  #6
May 21st, 2005
This Introductions section is for members to introduce themselves, not for technical questions to be asked and answered. As we have a forum section specifically for Perl I'll move the topic to it.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do i run perl on windows 98

 
0
  #7
May 21st, 2005
Thanx Catweazle, I completely missed that one! :-|

001:

By using the dos prompt, the information that gets display stays on the screen. That's the whole point behind using the dos prompt. The information displayed will stay on the screen. In windows, as soon as you run your perl file, and it finishes, it closes the spawned dos-window that runs the perl file. If you are not very proficient at using DOS, another solution that can be used for testing purposes only is to add a:

  1. $tmpvar = <STDIN>;

Before the program terminates. However, this requires you to hit enter, before the program will quit (if you put it before an exit or die), but it's easy to forget about it being in there... and it isn't really a good method of debugging. The best solution, is to run perl from the command line, passing your program as the parameter.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 13
Reputation: 001 is an unknown quantity at this point 
Solved Threads: 0
001 001 is offline Offline
Newbie Poster

Re: How do i run perl on windows 98

 
0
  #8
Jun 2nd, 2005
Thanks Comatose,

It worked , but I still experience problems with the output when there are errors in the program. It justs spits out the output and its difficult to read. What do i do.

001
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: How do i run perl on windows 98

 
0
  #9
Jun 2nd, 2005
Well, An Alternative Method is to use a filename for all your output, so, for example, in one program that I made, I needed all the Error Messages To Go To A Log File, So I stuck This at the top of my program:
  1. open(STDERR, ">>log");

Then any error message that I needed to read, would be in the same folder as my script, in a file called "log". I think you can do the same for STDOUT, and have all output belonging to the screen redirected to a file also. Let me know how it turns out.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 13
Reputation: 001 is an unknown quantity at this point 
Solved Threads: 0
001 001 is offline Offline
Newbie Poster

Re: How do i run perl on windows 98

 
0
  #10
Jul 4th, 2005
i tried it, but there was no error message written in the file.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Perl Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC