Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use IO::File;
- use strict;
- for my $file (@ARGV) {
- warn("$file: $!"), next unless my $in = new IO::File($file, "<:raw");
- my ($data, $var, $idx);
- $data .= $var while $in->read($var, 1024);
- new IO::File(sprintf('%s_struct%02d.txt', $file, ++$idx), ">:raw")->write($_) for $data =~ /(RTON.*?DONE)/gs;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement