http://www.perlmonks.org?node_id=1007529


in reply to Re^3: How to split an integer??
in thread How to split an integer??

But my qn is i have a variable say $a= 23 , now i need to add it as 2+3 which should give me ans 5 ... hw to do this ???

23 s stored as a single byte hence i cant split. But in words we can split character by character of a word in an array

my @a = qw (data); foreach $aa(@a){ print $aa."\n"; }

the above code will not work the sane for integers