Perl says, "Bareword found where operator expected," and it's pointing to the regex on this line:
my $decimal = (join '', map sprintf('%0*d', $size, $_), reverse @number)
=~ s/0+(?=.)//r;
I don't know why I'm getting this error, and don't know how to fix it, because honestly, I don't even understand what this line does.
I tried to remove this line entirely from the code and just "print join('-', @number);" but all I see is a list of very big numbers... and I don't even understand how the algorithm is supposed to work. In other words, I am completely lost at this one.