Advertisement
extrn

Untitled

Oct 26th, 2015
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.32 KB | None | 0 0
  1. use IO::File;
  2. use strict;
  3.  
  4. for my $file (@ARGV) {
  5.     warn("$file: $!"), next unless my $in = new IO::File($file, "<:raw");
  6.  
  7.     my ($data, $var, $idx);
  8.     $data .= $var while $in->read($var, 1024);
  9.  
  10.     new IO::File(sprintf('%s_struct%02d.txt', $file, ++$idx), ">:raw")->write($_) for $data =~ /(RTON.*?DONE)/gs;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement