in reply to Extracting name value pairs from Environment Variables

Have you checked what's in the INPUT hash table?

Try to add Data::Dumper to see what's held in INPUT.
use Data::Dumper; ... print "Content-Type: text/html\n\n"; print "<HTML><BODY><Pre>\n" print Dumper(\%INPUT); # insert this after the foreach loop print "</Pre></BODY></HTML>\n" exit(0); ...
And see what's held in INPUT. The reason why $address remain undefined is because the hash keys you are looking for might not exist in the hash table.

Replies are listed 'Best First'.
Re: Re: Extracting name value pairs from Environment Variables
by jonnyfolk (Vicar) on Sep 26, 2003 at 10:42 UTC

    You are absolutely right, and I thank you for showing me the use of Data::Dumper - I have now added that to my armoury...

    Once I'd seen that the values were not held in INPUT I looked more closely at the embedded HTML code and found that I had made a mistake in that. When I fixed it $address magically appeared. Thanks once again for your help.