develooper Front page | perl.perl5.porters | Postings from July 2003

perl with cygwin 1.5 doesn't fly.

Thread Next
From:
Gerrit P. Haase
Date:
July 19, 2003 15:15
Subject:
perl with cygwin 1.5 doesn't fly.
Message ID:
195127617293.20030720002022@familiehaase.de
Hallo,

I'm getting strange errors when I compile Perl 5.8 with Cygwin 1.5,
well, miniperl.exe compiles, but then the first simple tests break:

1. This as script executed with miniperl.exe:
%module = ( cygwin  => 'Cygwin' );
$module = $module{$^O} || 'Unix';
print "$module\n";

gives what is expected:
$ ./miniperl ./minitest.pl
Cygwin


2. If I change the script now to be:
my %module = ( cygwin  => 'Cygwin' );
$module = $module{$^O} || 'Unix';
print "$module\n";

I get:
$ ./miniperl ./minitest.pl
Unix


3. And if a second 'my' is added:
my %module = ( cygwin  => 'Cygwin' );
my $module = $module{$^O} || 'Unix';
print "$module\n";

I get:
$ ./miniperl ./minitest.pl



What is wrong with 'my' on Cygwin 1.5?


Gerrit
-- 
=^..^=


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About