With regard to reading material, there's a fair amount you could learn from Ovid's CGI Course - Resurrected and Updated! about good practice. He discusses taint and other security issues. It's worth noting that people generally don't use CGI directly any more. Specifically, the docs for CGI itself saysub UPLOAD { $wfile = $cgi->param("toping"); open(my $wfin, '<', $wfile) or die "Error opening $wfile: $!"; $wfname = 'toping'; open (my $datin,">", "/home/deruytja/webserver/rifucgi/temp_ul/$wf +name") or die 'Error processing file INPUT: ',$!; binmode $wfin; binmode $datin; while (read $wfin, my($data), 1024) { print $datin $data } #Upload Teil des Scripts }
The rationale for this decision is that CGI.pm is no longer considered good practice for developing web applications, including quick prototyping and small web scripts. There are far better, cleaner, quicker, easier, safer, more scalable, more extensible, more modern alternatives available at this point in time.Modules like Template::Toolkit (which is rolled into frameworks like Mojolicious, Dancer2 and Catalyst) allow for clean separation between your logic and layout, and can defaultly handle the character escaping.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re^3: Problems calling a second perl script from the first
by kennethk
in thread Problems calling a second perl script from the first
by deruytja
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |