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

Cygwin and Perl configuration

by 99names (Initiate)
on Feb 02, 2005 at 13:25 UTC ( [id://427241]=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I am relatively new to the use of perl and cygwin. I've installed perl that is to say I've unzipped all the packages and ran 'installer.bat' from www.cpan.org. Then I ran the installation for cygwin from mirrors.rcn.net as well. I've got cygwin running on my computer but I don't know how to configure it to run with PERL that i've unzipped. I really could use some help in configuring both PERL and Cygwin to run on the Win2k OS. I need some serious help here as I have to write a huge application using perl and I need a head start. I can use all the help I can get.

Replies are listed 'Best First'.
Re: Cygwin and Perl configuration
by Corion (Patriarch) on Feb 02, 2005 at 13:28 UTC

    Personally, I would not use the Cygwin version of Perl, as Cygwin is not really Windows-friendly. But with Cygwin, you already have a Perl included, so if other factors require you to use Cygwin (like other programs you need), you should use the Perl that is included with Cygwin.

    I would recommend that you visit http://www.activestate.com and download and inststall their version of Perl, which is Windows-friendly, installs as regular program and includes nice HTML documentation as well as many important modules that are not easy to come by for a beginner.

      I've already done that...installed active state perl as well but the problem is i just can't configure it to run the perl scripts appropriately...everytime i try to execute the code: c:\perl file.pl I get this message: "perl is not a recognized command....." what do I do in order to write a program in PERL that would parse through my file system under Win2k OS and gather all text files orderly named I can write the regular expression for it but I just don't know how to configure Active State PERL to be used on my OS. I have read and tried everything that O'reilly and even ActiveState documentation instruct. But it just doesn't seem to work. Please do advise me on it as I really need to do this. Btw, the cygwin that I installed does NOT have a perl module in it...i've looked everywhere for it in the Cygwin directory...i just can't find it or even execute it.

        My guess is that the Perl executable perl.exe does live under c:\Program Files\ActiveState\Perl.exe and not under C:\Perl.exe. So please do a search for the file perl.exe, and then use the full path to perl.exe instead of c:\perl.exe, or maybe just leave the path out:

        First try if Perl.exe was installed somewhere into the system path:

        perl -lwe "print 'Perl works'"

        If that gives perl is not a recognized command ..., find the location of Perl.exe (let's assume it is in c:\Program Files\ActivePerl\Bin\Perl.exe) and then try the following:

        "c:\Program Files\ActivePerl\Bin\Perl.exe" -lwe "print 'Perl works'"

        The quotes are important here!

        If none of the two suggestions work, there is something really wrong with your installation of ActiveState Perl, and I can only suggest you uninstall and then reinstall it, this time taking all default selections.

        If Perl is not installed with your Cygwin you need to install the Cygwin Perl package via the Cygwin setup program. Start the Cygwin setup program, select Perl there, and install it. After that, you should be able to launch Perl with these steps:

        1. Open the Cygwin console window via the Start menu
        2. type in: perl -lwe 'Perl works'

        If that fails under Cygwin, your installation of Cygwin or your installation of Cygwin Perl did fail somewhere.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-23 11:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found