in reply to Re: Converting quoted strings to numbers in array
in thread Converting quoted strings to numbers in array

I'm not sure if using a ternary operator inside map is considered un idiomatic, but it seems to work.

I'd say it's idiomatic, and can even be shortened since $_ is used as the default argument for many functions (including oct) and for regexes that aren't bound to something via =~:

use Data::Dump; my @arr = qw/ 10 20 0b1101 0xF 023 /; dd @arr; my @converted = map {/^0/ ? oct : $_} @arr; dd @converted; __END__ (10, 20, "0b1101", "0xF", "023") (10, 20, 13, 15, 19)