Hi, The following should work:
my $number = '0000000000000111';
my ($index) = ( $number =~ /\d+(\d{3})/ );
$index would contain the last three digits: '111'.
To learn about regular expressions in Perl, you can go through `perldoc
perlre` and `perldoc perlretut`. The Perldoc website
(http://perldoc.perl.org/) can be of help as well.
Regards,
Alan Haggai Alavi.
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
