in reply to Dividing a string into multiple substrings of different length

is there a simpler way of doing this, like splitting it into an array with a regular expression?
Actually yes, this is possible with a regular expression.
my ($board_total, etc...) = map $B10->to_base($_), $DC =~ /(....)(..)(..)(.....)(..)/;
perlop: If the "/g" option is not used, "m//" in list context returns a list consisting of the subexpressions matched by the parentheses in the pattern, that is, ($1, $2, $3...)
  • Comment on Re: Dividing a string into multiple substrings of different length
  • Download Code