Reading string 00 from a file
My program writes string to a text file and reads them back in. I do it like this: print OUT $str\n; and then $str = IN; chomp($str); The problem is one of my strings is 00. It gets written out fine, but gets read in as 0. How can I stop this from happening? Thx -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reading string 00 from a file
On Mon, 2 Jun 2003, Sockmonkey wrote: My program writes string to a text file and reads them back in. I do it like this: print OUT $str\n; and then $str = IN; chomp($str); The problem is one of my strings is 00. It gets written out fine, but gets read in as 0. How can I stop this from happening? Perl has no problem reading a string like this. Are you sure you don't add it with 0 or do something else numeric in between? It works for me.tm Regards, Shlomi Fish Thx -- Shlomi Fish[EMAIL PROTECTED] Home Page: http://t2.technion.ac.il/~shlomif/ An apple a day will keep a doctor away. Two apples a day will keep two doctors away. Falk Fish -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Reading string 00 from a file
The problem is one of my strings is 00. It gets written out fine, but gets read in as 0. How can I stop this from happening? Perl has no problem reading a string like this. Are you sure you don't add it with 0 or do something else numeric in between? It works for me.tm Ah, you are right, thanks for the help. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]