Try following code
open(FILE, "$file"); $line; { local $/; $line = <FILE>; } @lines = split(/\015?\012/, $line); $count=(); foreach $line (@lines){ $count+=length($line); } print "\n$count";
Now you should obtain the same values on both systems. I think that the problem is with line endings. Is the crlf counted as one character?
In reply to Re: char count windows vs linux
by ph0enix
in thread char count windows vs linux
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |