Janek Schleicher wrote:
> 
> Frank Wiles wrote at Wed, 12 Mar 2003 10:14:16 -0600:
> 
> >     If you're wanting to find the last digit in a scalar, you'll want to
> >     modify this to be:
> >
> >     ($match) = $num =~ /(\d)$/;
> >
> >     or if there is always there characters you can also do this:
> >
> >     ($match) = $num =~ /\d\d(\d)/;
> 
> or
> 
> my $last_digit = substr $num, -1;

or

my $last_digit = chop $num;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to