Perl for WinNT 
Author Message
 Perl for WinNT

Here's the scoop!

The last PERL script I wrote was more than a year ago and ran on the Novell
Enterprise Server.

Now I need to program a PERL script to run on a UNIX server.

The problem however is that I must create, test and debug it at home.

Unfortunately, at home, I only found a copy of WinNT4, and I also have a
copy of Novell Netware 4. - And I have unfortunately never touched UNIX.

I was hoping to develop my script with NT4 or Novell 4 and then make a few
changes when it came time to transfer it to UNIX. Invoking PERL is different
for all these OS but I'm hoping that since my script will be relatively
simple it will transfer smoothly to UNIX.

At first I installed Novell at home but I think I may be too rusty in
finding and installing the Enterprise Web Server - if that's even still in
use.

So then I removed Novell and installed WindowsNT4. The problem however, is
that I have never seen a PERL script for windows. PERL scripts for UNIX
usually begin with:   #!/usr/local/bin/perl   , for Novell it was:
require("cgilib.pl");   but what about NT4?

I am wondering if someone could reply to the newsgroup here with a
relatively short PERL script written for winNT4, if that even still exists!
Or perhaps there is a web site with lots of WinNT PERL examples or whatever!

Thank you for all and any information.
Please don't reply to email.

G.Doucet



Sun, 16 May 2004 14:55:15 GMT  
 Perl for WinNT

Quote:

> Here's the scoop!

> The last PERL script I wrote was more than a year ago and ran on the Novell
> Enterprise Server.

> Now I need to program a PERL script to run on a UNIX server.

> The problem however is that I must create, test and debug it at home.

> Unfortunately, at home, I only found a copy of WinNT4, and I also have a
> copy of Novell Netware 4. - And I have unfortunately never touched UNIX.

> I was hoping to develop my script with NT4 or Novell 4 and then make a few
> changes when it came time to transfer it to UNIX. Invoking PERL is different
> for all these OS but I'm hoping that since my script will be relatively
> simple it will transfer smoothly to UNIX.

> At first I installed Novell at home but I think I may be too rusty in
> finding and installing the Enterprise Web Server - if that's even still in
> use.

> So then I removed Novell and installed WindowsNT4. The problem however, is
> that I have never seen a PERL script for windows. PERL scripts for UNIX
> usually begin with:   #!/usr/local/bin/perl   , for Novell it was:
> require("cgilib.pl");   but what about NT4?

> I am wondering if someone could reply to the newsgroup here with a
> relatively short PERL script written for winNT4, if that even still exists!
> Or perhaps there is a web site with lots of WinNT PERL examples or whatever!

> Thank you for all and any information.
> Please don't reply to email.

> G.Doucet

#!c:/apps/perl5/bin/perl -w

print "\nHello World!\n";
<STDIN>

-----

Thanks,
Dale

Dale Bohl
SGI Worldwide Systems Administration

(715)-726-8406
http://wwwcf.americas.sgi.com/~dbohl/



Sun, 16 May 2004 15:56:00 GMT  
 Perl for WinNT
Hi G.

...

You might start with downloading ActivePerl from ActiveState.com.
It comes with all the Perl docu (for example about using Perl
on Windows).



Sun, 16 May 2004 15:57:06 GMT  
 Perl for WinNT
On Wed, 28 Nov 2001 13:55:15 GMT, "G.Doucet"

Quote:

>Now I need to program a PERL script to run on a UNIX server.

They can be exactly the same most of the time.
Perl (not PERL) is as platform independent as Java
once aspired to be and failed.

Quote:
>The problem however is that I must create, test and debug it at home.

No problem.  Get perl from www.activestate.com or
www.indigostar.com.  The latter includes an apache
webserver which is handy for CGI purposes.

Quote:
> PERL scripts for UNIX
>usually begin with:   #!/usr/local/bin/perl   ,    but what about NT4?

The name of a Perl program on PC should end with .pl or .plx
if you want Windows to associate them with the perl
interpreter and execute automatically.
#!/usr/local/bin/perl  (called the shebang or hashbag
line) in Unix tells the shell what
program to use to execte and thus has the same
function as the extension in Windows.
Windows does not need it, but it is a good place to
stick command line switches like -w and -T.

Quote:
>for Novell it was: require("cgilib.pl");

That is however, something completely different.
cgilib.pl was an old library for running CGI programs,
(any platform) that is now obsolete.  Nowadays
people use CGI.pm which comes standard with all
decent Perl installations.

Quote:
>I am wondering if someone could reply to the newsgroup here with a
>relatively short PERL script written for winNT4, if that even still exists!

What exists?  Perl? Yes.  WinNT4?  Yes.  
Both are going strong.

Here's one:

print "Hello World\n";

Here's another:

#!perl -wT
use CGI;
use strict;
my $form = new CGI;
my $name = $form->param('NAME');
print $form->header;
print "Your name is $name<br>\n";

Save it as test.cgi in the cgi-bin directory of your
webserver, give it 755 permissions and run it in a browser
with http://yourwebserver/cgi-bin/test.cgi?NAME=foo

It should print "Your name is foo" if you have set
up your webserver correctly.

Quote:
>Or perhaps there is a web site with lots of WinNT PERL examples or whatever!

They are the same for all platforms, so try these:

www.perldoc.com
web.stonehenge.com/merlyn
www.perl.com
theoryx5.uwinnipeg.ca/CPAN/cpan-search.html

Regards,
Helgi Briem



Sun, 16 May 2004 16:01:55 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. threads in perl under winnt

2. Calling C code from PERL under WinNT

3. Perl+ODBC+WinNT+IIS

4. Truoble installing/configuring the mySQL driver for ActiveState Perl on WinNT

5. SNMP Traps with Perl on WinNT

6. Inigo Perl on WinNT...

7. encrypting with perl on winnt

8. perl on WinNT sever install trouble shooting

9. Howto use an .exe with Perl under WinNT?

10. Perl for WINNT

11. Getopt::Std with perl 5.00402 (WinNT) problem

12. reading registry in Perl on WinNT

 

 
Powered by phpBB® Forum Software