POST with attachment issues

Alexis Marrero <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
This is to report a change that I had to do in the LWP code to avoid  
"Can't open file...."
Notice line 144.

Originally:
    142                  require Symbol;
    143                  my $fh = Symbol::gensym();
    144                  open($fh, $file) or Carp::croak("Can't open  
file $file: $!");
    145                  binmode($fh);

After changes:

    142                  require Symbol;
    143                  my $fh = Symbol::gensym();
    144                  open($fh, '<', $file) or Carp::croak("Can't  
open file $file: $!");
    145                  binmode($fh);

Opening files with chars in filename like [\r<>\t], among others,  
with 2 arguments raises the exception. With three arguments issues  
are gone. More information on Perl Cookbook 7.2

/amn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.