in reply to Re^4: Translating ANSI C to Perl
in thread Translating ANSI C to Perl

The bug is in your C code. fgets() stops after reading 13 characters and puts a NULL character into position 14, in order to ensure that your string is always properly NULL terminated. Your perl code reads all 14 characters from the file.


TGI says moo

Replies are listed 'Best First'.
Re^6: Translating ANSI C to Perl
by otaviof (Acolyte) on Dec 05, 2006 at 02:34 UTC
    I really don't know about that ... thank's
    In my perl code, I'm just considerating just 12 first chars.