I've never used Python, but have used a lot of Perl; its not as scary as you think.
(I did a lot of C before Perl, and Perl is definitely quicker to code, as each line is equivalent to many lines of C and you don't have to worry about sizes of vars for instance.)
In essence what I'm saying is you need to move up to a more powerful/integrated lang like Perl or Python, rather than trying to do that kind of stuff by calling various tools from bash.
The basic rules of Perl var types are
1. any single value var is known as a scalar and the name must begin with '$' eg $var1 = 1, $var2 = 0.02, $var3 = 'n', $var4 = "asdd"
2. array names begin with '@' eg @arr1 = ( "a", 1, 0.02, 'n')
3. hashes begin with '%'
%hash = (
key1 => 'value1',
key2 => 'value2',
key3 => 'value3',
I recommend you spend a decent amount of time on each candidate lang (ie research/read and do coding) and then go with what suits you