Ah, yes, one of the most frustrating bugs in the world:
: if ($REFln[1] = "SN") {
This *assigns* the value "SN" to $REFln[1]. What you want to do is
*test* it. String comparisons in Perl are done with "eq" (and numeric
comparisons with "=="). So you want this:
if ($REFln eq "SN") {
You can avoid this by always writing comparisons with the constant
(if there is one) on the left-hand side:
if ("SN" eq $REFln)
but I rarely see people actually do that.
--
Tim Kimball · ACDSD / MAST ¦
Space Telescope Science Institute ¦ We are here on Earth to do good to others.
3700 San Martin Drive ¦ What the others are here for, I don't know.
Baltimore MD 21218 USA ¦ -- W.H. Auden