Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Just a guess, but are you using this script on a Windows box? Some browsers insert "\r" as the newline for uploaded data and this subsequently messes up homegrown parsing routines. The way I've gotten around this is to filter for "\r" when saving the data. Here's a sub from a script I'm working on. I'm still working out the taint checking and have a ways to go, but perhaps this will help you out despite still being in its infancy:
sub write_file() { my $filehandle = shift; my $type = uploadInfo($filehandle)->{'Content-Type'}; die "text files only at this point" unless ($type eq 'text/plain' or +$type eq 'text/html'); print "file: $filehandle of type $type\n\n <PRE>"; open (FH, ">d:/inetpub/wwwroot/repnet/docs/$filehandle") or die "cannot create file: $!"; while (<$filehandle>) { $_ =~ s/\r//g; print; print FH; } print "</PRE>"; close(FH); }
---- I am what I read

In reply to Re: why do CGI's mess everything up??? by earthboundmisfit
in thread why do CGI's mess everything up??? by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2022-10-07 00:22 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (29 votes). Check out past polls.