X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Fstress%2Fdata%2Fsplit.pl;h=29887d927a7380596b32d50a3b132e575b81592f;hb=bc63bc2102be026b8f3f7d6bba88161df64c57c4;hp=3d0f4c7568d5f83cdc7daf675ee7358ecd9e5923;hpb=7448008aa977fe42a83738fbbc63ce11d8ab86f9;p=libcds.git diff --git a/test/stress/data/split.pl b/test/stress/data/split.pl index 3d0f4c75..29887d92 100644 --- a/test/stress/data/split.pl +++ b/test/stress/data/split.pl @@ -2,7 +2,10 @@ my %words ; -open( my $f, "text.txt" ) ; +my $input_file = shift; +my $output_file = shift; + +open( my $f, $input_file ) or die "Cannot open input file $input_file"; binmode $f ; my $text = '' ; @@ -26,14 +29,14 @@ for (my $j = 1; $j < 30; ++$j ) { } } -open (my $dst, ">dictionary.txt") ; +open (my $dst, ">$output_file") or die "Cannot open output file $output_file"; binmode $dst ; my $nCount = 0 ; $nCount++ foreach (keys %words) ; print $dst $nCount, "\n" ; -print "Generate test dictionary...\n" ; +print "Generate test dictionary $output_file ...\n" ; print $dst $_, "\n" foreach (keys %words) ; close $dst ;