Installing Perl in Vista!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • autodidact
    New Member
    • Sep 2007
    • 24

    Installing Perl in Vista!

    Hello, Guys I'm TOTALLY new at programming (in fact i HATE it) but i heard so much good things about Perl (that its also EASY) i decided to start with it.

    But I'm having trouble installing it on Windows Vista, i used the website below and i thought i installed Perl using the MSI installer below.

    But to no avail i can't even get the simplest (Hello World example) of programs to run via the Command Prompt. Even though I'm able to use the perldoc command via the Command Prompt and get the expected results.


    http://www.activestate .com/store/download.aspx?p rdGUID=81fbce82-6bd5-49bc-a915-08d58c2648ca

    Btw I'm using the online book Beginning Perl by Simon Cozens as a guide

    I'd love for someone/anyone to help me out.

    Thanks!!!!!!
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    First, Welcome to TSDN!!! Second, excellent choice deciding on Perl.

    As for your issue, I don't have any experience with Vista (thankfully) but I would think that Active State would have ported it over already. If you can run perldoc, then there should not be any reason your script(s) won't run.

    Do this, post your code here ( enclosing it in code tags) and also please post how you are trying to execute your script.

    As for the text you are studying, I have that book and it is very good, but I much prefer "Learning Perl, 4th Edition" as it is a great beginners book for Perl and highly coveted by the community. Others will mention the camel book, but it is mostly a function reference (which you get get through perldoc anyway) and I think that Learning Perl does a much better job of explaining certain things. Although, please don't discount the Camel book as it is still a very handy reference as well.

    Regards,

    Jeff

    Comment

    • KevinADC
      Recognized Expert Specialist
      • Jan 2007
      • 4092

      #3
      I've not tried installing perl on a Vista box yet but I would assume the standard Windows version of activestate perl would be the one to try. Activestate makes no mention of Vista on the perl download/system requirements page. But on windows to invoke a perl program from the command prompt you must use the path to perl or chdir to the perl executable:

      c:\perl\bin\per l.exe nameofscript.pl

      if you add perl to the command prompt you can invoke perl by name only:

      perl nameofscript.pl

      if you do further configurations of windows, which I have never done, you can get perl scripts to run just by typing the name and extension of the perl file at the command prompt:

      nameofscript.pl


      Windows does not use the shebang line which is typically the very first line of a perl program:

      #!c:\perl\bin\p erl.exe

      You can put anything there and windows will ignore it. You must use one of the methods above to run your perl programs from the command prompt.

      Comment

      • autodidact
        New Member
        • Sep 2007
        • 24

        #4
        Thank you numberwhun and KevinADC i truly appreciated your response. I got back home in the evening today i proceeded to giving it a shot again,and it works now.

        I read your recommendations and i was just about replying when i decided i should check through the book i mentioned, thats when i realized i omitted the whole file naming thing. (my filename was hello1.plx.txt rather than hello1.plx.) so i made the correction and it works now. This is one of the major reasons why i don't have the patience for programming; stupid human errors.

        In fact i was so sleepy and i said before i go to bed I'll give an update on my status after i could convince myself i had tried everything. Now that i got it working my sleepy eyes are no longer sleepy, i guess this is the highs and lows of being a programmer! even though i cannot call myself that yet.

        But thanks again for your responses, it was truly appreciated.

        :)

        Comment

        Working...