Re: pack

2002-02-21 Thread Will W
: _Programming perl, third ed_, pg 666 (so I guess its sort of black magic). The above bit also shows that $. does work in this mode. --Will Carl Jolley wrote on Thursday, February 21, 2002 1:35 PM Subject: Re: pack On Thu, 21 Feb 2002, Will W wrote: Sisyphus wrote on Wednesday, February 20

Re: pack

2002-02-21 Thread Sisyphus
- Original Message - From: Will W [EMAIL PROTECTED] Everyone's fascination with sysread() got me to poking around in the camel and cookbook a bit-- and I still can't see the advantage here of doing a low-level system call over using read(), which is generally buffered for optimal

Re: pack

2002-02-21 Thread $Bill Luebkert
Sisyphus wrote: - Original Message - From: Will W [EMAIL PROTECTED] Everyone's fascination with sysread() got me to poking around in the camel and cookbook a bit-- and I still can't see the advantage here of doing a low-level system call over using read(), which is generally buffered

RE: pack

2002-02-20 Thread Morse, Richard E.
Hah! I know what the problem is! ASCII character 10 happens to be either \n -- so when you print this number to the file, you get a newline character for one of the bytes, so your while(READ) loop finds three lines in the file instead of two. I think that in order to read this number back out

RE: pack

2002-02-20 Thread Joe Schell
-Original Message- Behalf Of Morse, Richard E. Hah! I know what the problem is! ASCII character 10 happens to be either \n -- so when you print this number to the file, you get a newline character for one of the bytes, so your while(READ) loop finds three lines in the file

Re: pack

2002-02-20 Thread Torsten Förtsch
On Thu, 21 Feb 2002 01:11:01 +1100 Sisyphus [EMAIL PROTECTED] wrote: Hi, Ok - so I'm running the code below and it's working as I want - unless either of the 2 values being written to the file is 10. (ie unless $num = 8 or 10). If the value is 10, then I get a couple of warnings about