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.
In reply to Re: How to extract the first elemnet from an integer type value ???
by bart
in thread How to extract the first elemnet from an integer type value ???
by sanjay nayak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |