in reply to If statements while in PRINT

How about something such as this ...

print '<meta name="', $key, '" content="', $formdata{$key}, '">' if length $formdata{$key};

This would easily allow you to iterate through the entire contents of the hash using a foreach loop with a keys %formdata construct.

 

perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'