Is there a port of Perl for Win* platforms?

I

Ilya Zakharevich

Is there a port of Perl for Win* platforms? The minimal functionality
required is to read @ARGV, open() files for read and write, and get a
directory listing.

Thanks,
Ilya

P.S. I carry ActiveState port on a memory stick (age = couple of
years), but it is not able to do any of these...
 
A

A. Sinan Unur

Is there a port of Perl for Win* platforms? The minimal functionality
required is to read @ARGV, open() files for read and write, and get a
directory listing.
....

P.S. I carry ActiveState port on a memory stick (age = couple of
years), but it is not able to do any of these...

I mostly use the AS port and have done so since I started learning Perl.
Every AS Perl version I have used has been able to do what you say you
want:

#!/usr/bin/perl

use strict;
use warnings;

use Data::Dumper;

print Dumper \@ARGV;

for my $f (@ARGV) {
open my $h, '>', $f
or die "Cannot open '$f': $!";
print $h "$f\n";
close $h
or die "Cannot close '$f': $!";
}

for my $f (@ARGV) {
open my $h, '<', $f
or die "Cannot open '$f': $!";
print scalar <$h>;
close $h
or die "Cannot close '$f': $!";
}

opendir my $d, '.'
or die "Cannot open current directory: $!";

print map { "$_\n" } sort readdir $d;

closedir $d;

__END__

C:\DOCUME~1\asu1\LOCALS~1\Temp\t> t 1 2 3 4 5
$VAR1 = [
'1',
'2',
'3',
'4',
'5'
];
1
2
3
4
5
..
...
1
2
3
4
5
t.pl

C:\DOCUME~1\asu1\LOCALS~1\Temp\t> perl -v

This is perl, v5.10.0 built for MSWin32-x86-multi-thread
(with 5 registered patches, see perl -V for more detail)

Copyright 1987-2007, Larry Wall

Binary build 1004 [287188] provided by ActiveState
http://www.ActiveState.com
Built Sep 3 2008 13:16:37

C:\DOCUME~1\asu1\LOCALS~1\Temp\t> ver

Microsoft Windows XP [Version 5.1.2600]


--
A. Sinan Unur <[email protected]>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
 
T

Tim Greer

Ilya said:
Is there a port of Perl for Win* platforms? The minimal functionality
required is to read @ARGV, open() files for read and write, and get a
directory listing.

Thanks,
Ilya

P.S. I carry ActiveState port on a memory stick (age = couple of
years), but it is not able to do any of these...

I've not used a Win system for many years, but I used to develop on
WinNT, Linux and FreeBSD systems for Perl scripts and used ActiveState
Perl on the WinNT box, and my scripts very often needed to do these
things and I don't recall every having such experiences. If there are
any errors or warnings, perhaps it's due to the system itself?
 
J

Jürgen Exner

Ilya Zakharevich said:
Is there a port of Perl for Win* platforms?

I have never heard of Win*.
However, if you are referring to Microsoft WIndows then yes, there are a
few. The most popular is probably Active State Perl, which is free and
can be downloaded from their web site.
The minimal functionality
required is to read @ARGV, open() files for read and write, and get a
directory listing.

AS Perl is fully functional, supports a large variaty of modules and -as
long as they are pure Perl- even more can be installed directly from
CPAN, too.
P.S. I carry ActiveState port on a memory stick (age = couple of
years), but it is not able to do any of these...

Any version of AS that I am aware of, even ancient onces, will do those
tasks without any problems. Your issues must have some other reason.

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top