running .pl files

Discussion in 'Programming' started by FreakyLime, Mar 17, 2008.

  1. #1
    I've got a .pl file and i don't know how to open it. I know it's perl, so I downloaded ActivePerl and that program just didn't work. I downloaded UltraEdit but that just reads the like source of it and doesnt run it.

    help? I really need it :(

    And yes, i am a noob :D
     
    FreakyLime, Mar 17, 2008 IP
  2. rob215

    rob215 Well-Known Member

    Messages:
    170
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #2
    What OS are you trying to run this on ?
     
    rob215, Mar 17, 2008 IP
  3. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #3
    you have to call perl to "run". if perl isnt in your path, you have to give the full path. C:\perl\perl.exe script.pl
    And if this would work only if you are currently in the directory where the script is located. All of that is from a command prompt.
     
    shallowink, Mar 17, 2008 IP
  4. milesbparty

    milesbparty Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you're trying to run it on a UNIX or Linux box, you can put a #! at the top of the script to specify the interpreter:

    #!/usr/bin/perl (or wherever your perl is installed)

    ...Rest of script...

    Then just run it:

    ./script.pl
     
    milesbparty, Mar 17, 2008 IP
  5. nandanamnidheesh

    nandanamnidheesh Active Member

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #5
    anyone pls tell me where to upload this .pl files in server ?
     
    nandanamnidheesh, Mar 18, 2008 IP