How do I save uploaded files in a Perl FastCGI program?

2010-03-26 Thread Ivan Bogdanov
My upload function looks like: sub Upload_File{ my ($file, $mime) = @_; my $file_data = param('filename'); my $buffer = undef; UnTaint($file); if ($mime =~ /text/) { sysopen(VAULT, "$path/$file", O_RDWR | O_EXCL | O_CREAT | O_TEXT) or die "couldn't cre

Help with transliteration

2007-11-26 Thread Ivan Bogdanov
Hi, I have some problems with transliteration from Cyrillic text into Latin. I my mind, i have two ways to solve the problem: 1) using a tr/// operator, but it not the best way i think, because in Russian it might be one symbol and in transit it would be two symbols. 2) using two arrays, something