Exactly. Instead of making things hard for yourself, break the problem down to its component parts and solve it the easy way. :-)
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
| [reply] |
but that wont be able to deal with authors who have the same initials will it?
i.e.
# Smith, Jack
$hash{'Smith J'} = "Smith, Jack";
# Smith, John
$hash{'Smith J'} = "Smith, John";
Jack gets lost... | [reply] [d/l] |
A very good point which also illustrates a problem with your current scheme. How do you determine, from "Smith J", if it's supposed to be "Smith, Jack" or "Smith, John"?
A possible solution would be to have each abbreviation go to an arrayref of all possible authors that match that abbreviation. Then, if there's only one, happy day. If there's more than one, the program punts back to the user.
Being right, does not endow the right to be rude; politeness costs nothing. Being unknowing, is not the same as being stupid. Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence. Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
| [reply] |