Is there a port of Perl for Win* platforms?

Discussion in 'Perl Misc' started by Ilya Zakharevich, Dec 12, 2008.

  1. 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...
     
    Ilya Zakharevich, Dec 12, 2008
    #1
    1. Advertising

  2. Ilya Zakharevich <> wrote in news:ghsecf$1vij$1
    @agate.berkeley.edu:

    > 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 <>
    (remove .invalid and reverse each component for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://www.rehabitation.com/clpmisc/
     
    A. Sinan Unur, Dec 12, 2008
    #2
    1. Advertising

  3. Ilya Zakharevich

    Tim Greer Guest

    Ilya Zakharevich wrote:

    > 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?
    --
    Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
    Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
    and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
    Industry's most experienced staff! -- Web Hosting With Muscle!
     
    Tim Greer, Dec 12, 2008
    #3
  4. Ilya Zakharevich <> wrote:
    >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
     
    Jürgen Exner, Dec 12, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ARaman
    Replies:
    1
    Views:
    408
    Mike Wahler
    Oct 23, 2003
  2. Chris Lyon
    Replies:
    0
    Views:
    355
    Chris Lyon
    Oct 7, 2003
  3. Krist
    Replies:
    6
    Views:
    804
    Arne Vajhøj
    May 7, 2010
  4. Xaver Biton

    perl and serail port an win maschine

    Xaver Biton, Jun 3, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    126
    Eric Bohlman
    Jun 7, 2004
  5. sm
    Replies:
    3
    Views:
    126
    Sisyphus
    Mar 14, 2006
Loading...

Share This Page