Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Tweaking the upload script for Ascii

by dws (Chancellor)
on Jan 07, 2001 at 01:30 UTC ( [id://50282]=note: print w/replies, xml ) Need Help??


in reply to Re: CGI.pm file upload freaking me out
in thread CGI.pm file upload freaking me out

My upload script does pretty much the same thing, with one tweak to handle newline conversion when uploading text from a Wintel box. (My ISP has CGI.pm 1.45, and I haven't had noticed any problems uploading.)
my $stripCRs = param('filetype') eq 'text'; ... while ( <$upload> ) { s/\r// if $stripCRs; print UPLOAD $_; }
Getting a pair of radio buttons on the upload form for 'text' and 'binary' is left as an exercise.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://50282]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-12-09 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (53 votes). Check out past polls.