home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
lzo100.zip
/
lzo-1.00
/
util
/
shortf.pl
< prev
next >
Wrap
Perl Script
|
1996-10-22
|
702b
|
32 lines
#! /usr/bin/perl
##
## vi:ts=4
##
##---------------------------------------------------------------------------##
##
## Author:
## Markus F.X.J. Oberhumer markus.oberhumer@jk.uni-linz.ac.at
##
## Description:
## Create short files for compression test
##
## Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
##
##---------------------------------------------------------------------------##
$c = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$c = "\x00\x01\x02";
$c = "\x00";
$x = $c x 1024;
for $i (0 .. 50) {
$name = sprintf("f%04d.fil",$i);
open(OUTFILE,">$name") || die "$0: cannot open '$name': $!";
binmode(OUTFILE);
print OUTFILE substr($x,0,$i);
close(OUTFILE);
}
exit(0);