in reply to Re: updating file
in thread updating file
and you try to add one of the colors red, blue, or green, your script won't add it.red-orange bluegreen
The regexp should probably be anchored and chomp used:
or eq could be used instead:chomp($color); $seen++ if $color =~ /^$newcolor$/;
chomp($color); $seen++ if $color eq $newcolor;
|
|---|