in reply to Re^2: 3-byte representation
in thread 3-byte representation
it produces one file with a variable length, but always greater than 30000 characters (for exemple 30045) ! So I suppose something is wrong in the pack line coding...#!/usr/bin/perl print "Content-type: text/html\n\n"; srand(); $fil="ch"; open(OUT, '>>'.$fil); for($i=1;$i<10001;$i++){ $j=int(rand(20000))+440000; $k=substr(pack('l>',$j),1); print OUT $k; } close(OUT); print "DONE !";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: 3-byte representation
by BrowserUk (Patriarch) on Oct 13, 2011 at 12:36 UTC | |
by gerleu (Novice) on Oct 13, 2011 at 14:21 UTC | |
by BrowserUk (Patriarch) on Oct 13, 2011 at 15:40 UTC | |
by gerleu (Novice) on Oct 13, 2011 at 16:36 UTC | |
by BrowserUk (Patriarch) on Oct 13, 2011 at 16:42 UTC | |
|