Subject: Re: HELP - Installing/Using Cygwin for Perl
From: Yitzchak Scott-Thoennes <[email-masked]>
To: [email-masked]
Date: Tue, 20 Jul 2004 15:29:09 -0700

On Tue, Jul 20, 2004 at 02:50:10PM -0700, Ramneek Singh <[email-masked]> wrote:
> Hi,
> 
> I am absolutely new to perl and cygwin, so apologize if the question
> appears trivial to you. I have been asked to write a perl script which
> will work on unix and can be ported
> To windows also. (I have searched through the archives).
> 
> 1) I am not clear from the website if I need to install perl on
> windows2000 first and then install a cygwin package for perl. Please
> clarify.

The cygwin perl package is the entire core perl distribution, plus a
few extra modules.  You don't need a different perl.

That said, you may wish to use the same version of perl as is used on
the unix system you are developing for, for closer to bug-for-bug and
feature-for-feature compatibility.

> 2)I will be using Perl 5.6.1. So do I need to download cygwin perl
> package which mentions
> Perl 5.6.1 ?? (Not sure if version numbers are comparable here).

Yes, the perl-5.6.1-2 is perl 5.6.1.  The -2 refers to the second
cygwin release of perl 5.6.1.

> 3)I went through the list of cygwin packages. I am not sure what all I
> need to install.
> For my requirements , I need to open and read from existing files ;
> write to files;
> Use the redirection operator " > " to do something like `java Myjavaprog
> abc > tempFile`.
> In addition to this I need to do pattern matching to compare the output
> of the above 
> Command with the expected output (which I plan to store in an existing
> file).

No other packages are required (assuming you have the java you mean to
use already).

> 4) Also, in order to port my perl script from Unix to Windows the steps
> that I understand I have to do is : I write a perl script on UNIX 
>  and put then copy that code into a file from the cygwin console window
> ?

Not sure what you mean.  You have to copy the file from one system to
another, unless it's on a disk accessible to both systems.
 
> 5) Is there any sample code available (websites or otherwise) to do the
> steps mentioned
> In (3) that you may be aware of using cygwin?

I don't see anything particular to cygwin in that list.  Once you've
installed perl, you will have the perldoc command available to see all
the documentation.  Start with "perldoc perl" and "perldoc perlintro".

Once you are up and running enough to be trying things out,
perlmonks.org is a good site to get help with perl.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/