in reply to Parsing a string for sorting

Are you looking for a way to get the first three digits off of a value? Something like this would work:
my $numeric_string = '0010030511'; my $first_three_digits; $first_three_digits = $1 if $numeric_string =~ s/^(\d{3})//;
You could also convert the string to an array:
my @numeric_string = split//, '0010030511'; my $first_three_digits = join '', splice @numeric_string, 0, 3;
Update: Foolish me. I forgot the power of substr oh well. TIMTOWTDI.