Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use strict;
- use warnings;
- my ($i, $j, $fh, @full_file);
- open $fh, ">:raw", 'tomato_rstats_generated.raw' || die "Cannot open file: $!";
- while (<>) {
- chomp;
- push @full_file, $_;
- }
- $j = 0;
- syswrite $fh, pack("q", $full_file[$j++]);
- $i = -1;
- while (++$i < 62) {
- syswrite $fh, pack("q", $full_file[$j++]);
- syswrite $fh, pack("q", $full_file[$j++]);
- syswrite $fh, pack("q", $full_file[$j++]);
- }
- syswrite $fh, pack("q", $full_file[$j++]);
- $i = -1;
- while (++$i < 25) {
- syswrite $fh, pack("q", $full_file[$j++]);
- syswrite $fh, pack("q", $full_file[$j++]);
- syswrite $fh, pack("q", $full_file[$j++]);
- }
- syswrite $fh, pack("q", $full_file[$j]);
- close $fh;
- exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement