John W. Krahn wrote: > [EMAIL PROTECTED] wrote: >> Hi, > > Hello, > >> How do I extract the last digit of a number? example I only want the digit 9 >> from the number 19. >> >> my $number = 19; > > my $last_digit = chop $number;
Yes, although it's important to note that that method removes the character from $number as well, leaving it equal to '1'. Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/