can you define "not working"? What exactly does it print out? Can you show a code snippet? At worst as a workaround you can do print '<FORM ACTION="foo.cgi" METHOD="post" ENCTYPE="multipart/form-data">', right (and maybe doing that will let it work enough to reveal a different problem)?