in reply to How to extract the first elemnet from an integer type value ???
In Perl, you can just use a number in a scalar as a string.Perl will convert it for you, from number to string, if necessary. So, all you have to do is extract the first character from the number treated as a string. That's what substr, unpack, the regex /^(.)/ all do.
|
|---|