my @bytes; while ($address =~ /(\d+)/g) { push @bytes,$1 } #### my @bytes = $address =~ /(\d+)/g; #### unpack('N', pack('C*', $address =~ /(\d+)/g))