Jorge Palma wrote:

> Sorry, 
> here is the part where a write to the file.
> 
> The problem is it write ok, but in text mode and not in binary mode.
> 
> Thanks
> 
> # --- open and read all text file and put it in array
>     open(FileIn,"$dirBase\\PSData_21.txt"), or die;
>          @lines=<FileIn>;
>      close (FileIn);
> 
> # --- open outfile in binary mode
>         open (FileOut, ">>$dirBase\\PSData_mwd_21");
>         binmode (FileOut);
>         ...
> 
>         print FileOut "$stid $rlat $rlon $tim $nlev $nflag\n" ;
>         ...

You're still wasting our time.  We need a *COMPLETE* *WORKING*
script that shows the failure and a description of what you're
getting vs what you expect to get (hexdumps would be the proper
way to do the last part).  You shouldn't use an input file if
you can just do it with program data and you need to show what
the output is and why it's wrong.

As has already been stated, binmode only keeps Windows from adding
the \r in front of each \n on output and from stripping the \r on
input, so if you were expecting any other behavior, you won't get it.

-- 
  ,-/-  __      _  _         $Bill Luebkert    Mailto:[EMAIL PROTECTED]
 (_/   /  )    // //       DBE Collectibles    Mailto:[EMAIL PROTECTED]
  / ) /--<  o // //      Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_</_</_    http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to