in reply to Split an array -> store contents into a scalar up till a certain character
my ( $scalar_1, $scalar_2, $scalar_3, $scalar_4 ) = split /\./, '25.25 +5.2.0';
If however the individual components of the string 25.255.2.0 are already stored in separate array elements, then the following should suffice:
my ( $scalar_1, $scalar_2, $scalar_3, $scalar_4 ) = @array;
perl -e 'print+unpack("N",pack("B32","00000000000000000000000111010100")),"\n"'
|
|---|