merc58
Technical User
- Aug 18, 2008
- 4
I have an array @field = ("A H","2 H","8 S","K S",...,"Q S");
I print the top 5 elements thus -
for $k (0..4) {
print $field[$k];
print "\n";
then for each of the first 5 element, do a pattern match.
If the first element is "K S", match "S" with SAM, for "A H"
match "H" with HENRY .. and so on always match the second character and print output : example "A H" = HENRY, "Q S" = SAM ...
I print the top 5 elements thus -
for $k (0..4) {
print $field[$k];
print "\n";
then for each of the first 5 element, do a pattern match.
If the first element is "K S", match "S" with SAM, for "A H"
match "H" with HENRY .. and so on always match the second character and print output : example "A H" = HENRY, "Q S" = SAM ...