Ton Hospel wrote:

....snip...

> I would be interested if someone on windows can run this and report the 
> result, also mentioning your perl versions and output of perl -V
> ----------------------------------------------
> #!/usr/bin/perl -w
> use strict;
> 
> my $prog = "crtest.pl";
> my $out  = "crtest.out";
> open(my $fh, ">", $prog) || die "Could not create $prog: $!";
> print $fh <<"EOF";
> #!/usr/bin/perl -w
> open(my \$fh, ">", "$out") || die "Could not create $out: \$!";
> binmode \$fh;
> print \$fh "\cM\cM\n";
> close \$fh;
> EOF
> close $fh;
> 
> my $rc = system("$^X", $prog);
> die "Unexpected returncode $rc from $prog\n" if $rc;
> 
> open(my $result, "<", $out) || die "Could not open $out: $!";
> binmode $result;
> print unpack("H*", $_), "\n" while <$result>;
> close $result;
> ----------------------------------------------
> 
> It should print 0d0a if perl reads source in textmode and
> 0d0d0a if it reads source in binmode.
> 
> 

I very rarly run on MS, but here is the results...

Yields 0d0d0a (binmode)

With ActivePerl-5.6.1.631-MSWin32-x86:
Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
   Platform:
     osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
     uname=''
     config_args='undef'
     hint=recommended, useposix=true, d_sigaction=undef
     usethreads=undef use5005threads=undef useithreads=define 
usemultiplicity=def
ine
     useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
   Compiler:
     cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE 
-DNO_STRICT -
DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS 
-DPERL_MSVCRT_READ
FIX',
     optimize='-O1 -MD -DNDEBUG',
     cppflags='-DWIN32'
     ccversion='', gccversion='', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize
=4
     alignbytes=8, usemymalloc=n, prototype=define
   Linker and Libraries:
     ld='link', ldflags ='-nologo -nodefaultlib -release 
-libpath:"D:\local\perl
\lib\CORE"  -machine:x86'
     libpth="D:\local\perl\lib\CORE"
     libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib 
  comdlg32
..lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib 
uuid.lib wsoc
k32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib msvcrt.lib
     perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib  comd
lg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib 
uuid.lib
wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib 
msvcrt.lib
     libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
   Dynamic Linking:
     dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release 
-libpath:"D:
\local\perl\lib\CORE"  -machine:x86'


Characteristics of this binary (from libperl):
   Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT 
PERL_IMP
LICIT_SYS
   Locally applied patches:
         ActivePerl Build 631
   Built under MSWin32
   Compiled at Jan  2 2002 17:16:22
   @INC:
     D:/local/perl/lib
     D:/local/perl/site/lib
     .




-- 
Brian Rectanus
[EMAIL PROTECTED]

Reply via email to