use v6;at the top, and running it through Rakduo. Much to my surprise, a lot fewer things were complained about than I expected. (So far, I'm only about one-third through the first stage of the port.)
It did complain about
my $in_file = shift;to store the next value from
foreach $arg (@*ARGS), and about using dot from string concatenation. But it did not complain about
if ($arg =~ /^\-sd/),
for ($i = $1; $i <= $2; $i++), or
open IN_FILE, $in_file or die. I wouldn't have expected any of those to get through the parser? (I'm assuming they'll fail when the code finally is ported enough to reach proper execution.)
I'm also trying to figure out how to automatically test this script. I guess I can easily enough throw a few files at it and check to make sure the results are correct. Does it make sense to try to unit test something this small? (As it is, the Perl 5 version has no subs at all!) And what is the accepted way of doing such testing in Perl 6?