Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

absolute beginner in perl

by kviki_kiki (Initiate)
on Aug 03, 2015 at 06:22 UTC ( [id://1137216]=perlquestion: print w/replies, xml ) Need Help??

kviki_kiki has asked for the wisdom of the Perl Monks concerning the following question:

Hi guys!

I am not a programmer, but here and there I have to do some programming in HTML. My next task is to do some modifications in a perl script which generates a HTML code. I have a problem starting with programing, because I have no idea how to make the script run and let me see the resulting HTML script

I am working in Windows and have instaled Padre, but when I run the script it does not produce anything. I know it is a working script because it is already in use on a server.

Thanks in advance!

Replies are listed 'Best First'.
Re: absolute beginner in perl
by Corion (Patriarch) on Aug 03, 2015 at 07:07 UTC

    Have you talked to the people who gave you the task? They should know about your environment and be able to show you how to run the program.

    In short, the following steps should allow you to run the program, but they assume that you are familiar with Windows and directories/filenames:

    1. Start cmd.exe , for example by pressing Windows+R and then typing cmd.exe
    2. Change to the directory where you have saved the work copy of the script you are trying to modify, for example by typing cd /d C:\Users\kviki_kiki\Desktop\that_directory
    3. type perl -w the_script.pl

    If the script you are trying to modify is a CGI script, then you will need to look at CGI and read the text about debugging CGI scripts offline. Alternatively, you could also set up a webserver on your machine and run the script through the webserver.

Re: absolute beginner in perl
by Discipulus (Canon) on Aug 03, 2015 at 07:10 UTC
    ..it is already in use on a server

    If you have a CGI script normally you need a server in order to see the output in a browser. You can also run it from command line producing the html output: see Testing out a CGI script using the command line for more on this subject.

    Running CGIs on a windows web server (aka IIS) is normally a font of big headaches, and may lead to different use in respect of the original server. The best will be recreate the same environment of the original server using a virtual machine.

    Consider also that CGI is an almost dead tecnology and if you are not a programmer maybe not worth to learn it.

    HtH
    L*
    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: absolute beginner in perl
by Anonymous Monk on Aug 03, 2015 at 06:57 UTC
Re: absolute beginner in perl
by szabgab (Priest) on Aug 04, 2015 at 04:48 UTC
    Have you tried "Use external window for execution" from the FAQ of Padre?
Re: absolute beginner in perl
by kviki_kiki (Initiate) on Aug 03, 2015 at 12:52 UTC

    I tryed to contact the person who gave me the script but he is on vacation and will not be back for the next 14 days. I do have the acess to the server. As much as I understand I have to put the script onto the server in the directory cgi-bin for it to run. There is another script that runs this one every 6 hours.

    I thaught I might put the script there, under another name and chage the output file location so it would not disrupt the original script job. However I do not know how to make it run, because it will be run only under the original name (since there is another script that makes it start).

    So basically, how do I make it run? I use WinSCP to connect to the server.

    Thanks again!

      You will need to find out the mechanism that makes the other script run, and then adapt that mechanism to make your script run as well.

      As you mention cgi-bin, maybe the script is just available at the same URL as the "original" script, except under the new name. Have you tried opening that URL?

      This is mostly a configuration issue that your organisation should be able to solve itself without external input. There is very little help that we can provide from the outside because most of your setup is highly specific to your organisation.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1137216]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-19 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found