Okay :)
my $num = 100; my $digit = int ($num / ('1' . ('0' x (@{[ $num =~ /(.)/g ]} - 1))));
I don't know.. is this reverse golf?
--In reply to Re^4: How to extract the first elemnet from an integer type value ???
by Leviathan
in thread How to extract the first elemnet from an integer type value ???
by sanjay nayak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |