in reply to Solved : decimal to hex in an array
if ($indx % 2 == 0) # ^
Also, the initialization of the array is wrong, it creates just one element. Change it to
my @a = qw(1 10 5 345 2 12);
or
my @a = (1, 10, 5, 345, 2, 12);
or
my @a = split ' ', '1 10 5 345 2 12';
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: decimal to hex in an array
by t-rex (Scribe) on Feb 21, 2017 at 11:00 UTC |