Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Installing Perl on Windows XP

by Ethen (Acolyte)
on Dec 19, 2007 at 10:39 UTC ( #657845=perlquestion: print w/ replies, xml ) Need Help??
Ethen has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I am new to Perl. I have tried installing Perl on my machine that is running on windows XP. I downloaded ActivePerl for Windows XP (WIndows MSI package) from ActiveState. Then I installed Perl Express (Editor). Both the downloads were successfull. Now when I try to write a small script and Run it, it shows the output of only that script in which I am not usng the "Diamond operator <>".......e.g

print "Enter one number: "; $a = <>; print "Enter another number: "; $b = <>; $c = $a + $b; print "$c";

Now When I run this......the output comes as.....

"Enter one number: "

When I try to enter some number, it do nothing........... Please assist......

Edit: g0n - code tags and formatting

Comment on Installing Perl on Windows XP
Select or Download Code
Re: Installing Perl on Windows XP
by inman (Curate) on Dec 19, 2007 at 11:57 UTC
    Try running this from a command line rather than the editor. The diamond operator is shorthand for standard input which your editor may treat differently. Your script is fine although you should get into the habit of adding "use strict;" to enforce various checking routines.
      Ok...now I have written my script in notepad and saved it as "proj.pl". Now how to run it in command prompt? Please bear with me for my small queries as I am new to this.....but ur answers are really giving me a gud picture of it. Thanks Ethen

        For a normal ActiveState install you should be able to run your Perl application by simply typing the filename on the command line and pressing enter. If that doesn't do it for you then you could try:

        c:\perl\bin\perl.exe proj.pl

        which runs the Perl interpreter from the default location used by the ActiveState install.


        Perl is environmentally friendly - it saves trees
        Welcome to the Monastery Ethen

        As GrandFather has already suggested
        "you should be able to run your Perl application by simply typing the filename on the command line"

        You may find it useful when first learning to create a shortcut to the copy cmd.exe into the Perl bin.

        Then all that is needed is to type the file name "proj.pl" at the command prompt.
Re: Installing Perl on Windows XP
by ww (Bishop) on Dec 19, 2007 at 12:58 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-10-25 13:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (143 votes), past polls