in reply to typo? variable misteriously becoming undef

You're falling into the
else { $card{'co'} = $la[0]; shift @la; }
case, which clears @la by shifting out the single element that's it's holding (i.e., "OH"). To verify this, dump %card.

I suspect you mean to be using "elsif" instead of a squence of single "if" statements followed by an "if/else". As you have things set up, you'll hit that else case for any $response other than 1.

Replies are listed 'Best First'.
Re: Re: typo? variable misteriously becoming undef
by scain (Curate) on Nov 14, 2002 at 20:14 UTC
    Holy {explitive deleted}!

    I knew it was something stupid. I can't believe I did that, and now I've shown everyone how far you can regress when you don't code for a few months (and you use cut and paste too much).

    Thanks,
    Scott