LoneWolf wrote:
> Here's what I have, and I am sure there is a better way to do this...
>
> The problem I am getting is checking to see if one field matches the city,
> and if it does keeping it the same, however if it does not it needs to have
> a "1-" added to the front of that field...
I think
>
> In the below test you could create an array once of the cities that
> match, then just grep for the value in that city list with something like,
>
> if (grep $fields[4] == $_, @cities) {
> $tmptxt = $fields[10];
> }
> else {
> $tmptxt = '1-' . $fields[10];
> }
>
> No more copying and pas
Looping is your friend :-)...
> Here's what I have, and I am sure there is a better way to do this...
>
> The problem I am getting is checking to see if one field matches the city,
> and if it does keeping it the same, however if it does not it needs to
have
> a "1-" added to the front of that
Here's what I have, and I am sure there is a better way to do this...
The problem I am getting is checking to see if one field matches the city,
and if it does keeping it the same, however if it does not it needs to have
a "1-" added to the front of that field...
<-- CODE -->
#!/usr/bin/perl -w