Hello.
I know nothing about cgi and perl, but i got this uploading script and i need help with two changes if they are possible to make.
1. How can i make "enter" or "new line" after printing this?
print ff $in;
2. It will save all uploaded txtfiles as "SAVE.txt", would like it beter if it was saved as the 5 first letters inside the uploaded txtfile "@inx".
Many big thanks,Code:#!/usr/bin/perl use CGI; $CGI::POST_MAX = 2048; print "content-type: text/html\n\n"; binmode(STDIN); @inx = <STDIN>; splice(@inx,0,4); splice(@inx,$#inx,1); $in = join("",@inx); $in = substr($in,0,length($in) - 2);; open (ff,"<SAVE.txt"); @list = <ff>; open(ff,">SAVE.txt"); binmode(ff); print ff $in; print ff (@list); close(ff); print "DONE, Uploaded Size: ".length($in)." bytes";
naitsabes




Reply With Quote