Did you try the code I posted ?
In reply to Re^3: LWP::Useragent - File Upload by poj in thread LWP::Useragent - File Upload by leefp