in reply to Form File Field

First, write

print "<input type=\"file\" name=\"pic\" value=\"$fields[2]\">";
as
print qq(<input type="file" name="pic" value="$fields[2]">);
But don't do that, use CGI.pm. Also, to process a file already on the server, <input type='text'...> is much more suitable. <input type='file'...> is used for file uploads.

--Bob Niederman, http://bob-n.com

All code given here is UNTESTED unless otherwise stated.