Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New to the CF scene
    Join Date
    Jul 2009
    Location
    Sao Paulo
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to execute a .pl program

    Hi,

    I don´t know nothing about Perl, but I found an useful program on the Web.
    How I execute this file for working on the Web?

    Regards

    Four

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    First, you need to install Perl on your system.

    What OS are you on?

    What is this script supposed to do?

    Can you post it so we can take a look at it?

  • #3
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The last thing that you want to do is to go executing some code on your system when you don't even know what it actually does.

    Sure, the description may have said one thing, but unless you have examined the code and know for sure that is what it does, I would be wary.

    As was mentioned, I agree that you should post the script here along with answering the other questions that were posed.

    Regards,

    Jeff

  • #4
    Senior Coder
    Join Date
    Mar 2006
    Posts
    1,274
    Thanks
    2
    Thanked 39 Times in 38 Posts
    Quote Originally Posted by numberwhun View Post
    The last thing that you want to do is to go executing some code on your system when you don't even know what it actually does.

    Sure, the description may have said one thing, but unless you have examined the code and know for sure that is what it does, I would be wary.

    As was mentioned, I agree that you should post the script here along with answering the other questions that were posed.

    Regards,

    Jeff
    Jeff?
    Yes it is Jeff!
    Hi Jeff

  • #5
    New Coder
    Join Date
    Jul 2009
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a .pl script can only be executed from the shell.. the command is

    perl programname.pl

    you can also rename the file to .cgi put it in your cgi-bin directory..and call it from the browser using the correct path.


    Jake the Snake

  • #6
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Quote Originally Posted by hackYourBrain View Post
    a .pl script can only be executed from the shell.. the command is

    perl programname.pl

    you can also rename the file to .cgi put it in your cgi-bin directory..and call it from the browser using the correct path.


    Jake the Snake
    Actually, that's not exactly correct, part of it depends on the platform.

    First, if the system is configured correctly, you don't need to launch the interpreter directly and pass it the script; you just need to call the script. On Windows, you need to configure a .pl and/or .cgi (or any unused ext) file type that points to the interpreter. If you're on a *nix system, you need to make sure the shebang line is set correctly and you never need to have any file extension on the script (that's a Windows thing).

    And cgi scripts don't need to have a .cgi extension, they could have any extension or not extension at all, as long as the system is configured correctly.

  • #7
    New Coder
    Join Date
    Jul 2009
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if anyone can make a simple questin complicated its you fish.. just tell him how to run then script. if you dont know what platform.. give him windows and linux and donee..

    Bob

  • #8
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    uh?? at least he didn't contradict himself within the one post.

    The OP is a beginner so, it is likely easier to upload the script to the server, set its permissions and call it in the browser.

    I agree that it is better to check exactly what the script does before running it on a server.

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #9
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Quote Originally Posted by hackYourBrain View Post
    if anyone can make a simple questin complicated its you fish.. just tell him how to run then script. if you dont know what platform.. give him windows and linux and donee..

    Bob
    If it was a simple question, then why did you give the wrong or misleading answer?

    There are a lot of misconceptions being passed around and rather than perpetuating those misconceptions (i.e., wrong/bad information), I prefer to give the correct info. So, my comment was aimed more at you hoping that you'd gain a little better understanding.

  • #10
    New Coder
    Join Date
    Jul 2009
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok ok fish.. lets get down to business.. can you please help me with my script on my thread.. I got some new info

    FreeJack

  • #11
    New Coder
    Join Date
    Jul 2009
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok never mind Im using another change the code a bit and its working now.. will post later thanks dudes

    starchild


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •