in reply to Zip a variable?

Archive::Zip has a method named AddString that would do what you want.

-imran