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:
umper;
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/