#!/Perl -w
use strict;
# -----------------------------------------
my $numbers ="04|09|15|16|21|23|25|29|38|40|41|42|54|55|56|62|64|65|67|68|73|80";
my $numbers2="02|04|11|15|16|23|44|54|62|73";
# -----------------------------------------
my %hash_lookup; $hash_lookup{$_} = "x" foreach (split(/\|/,$numbers));
my %hash_lookup2; $hash_lookup2{$_} = "x" foreach (split(/\|/,$numbers2));
# -----------------------------------------
my $count_to_eighty = 0;
foreach my $key (1..80){ $count_to_eighty++; $key = "0".$key if ($key <= 9); # put a 0 in front of single nums
my $from_numbers = (defined $hash_lookup{$key}) ? "$key-$key" : "$key";
my $from_numbers2 = (defined $hash_lookup2{$key}) ? "$key" : "";
print "$from_numbers-$from_numbers2 \n"; }
This script just counts from 01 to 80 and matches $numbers to it then matches $numbers2 to $numbers.. Output looks like..
01- # just count 02-02 # count and $numbers 03- #count 04-04-04 #count $numbers and $numbers2 05- # and so on.. 06- 07- 08- 09-09- 10- 11-11 12- 13- 14- 15-15-15 16-16-16 17- 18- .. .... 80
Any help greatly appreciated Thanks in advance. Steve
_________________________________________________________________
Get MSN 8 and enjoy automatic e-mail virus protection. http://join.msn.com/?page=features/virus
_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs