Honored monks
The following script quick and dirty though it may be was working for months until the CGI.pm module(s) got upgraded. It now throws this error

"ebcdic2ascii" is not exported by the CGI::Util module
"ascii2ebcdic" is not exported by the CGI::Util module
Can't continue after import errors at pressUpload.pl line 8
BEGIN failed--compilation aborted at pressUpload.pl line 8.

I added an explicit import line in a blind attempt to get this back up and running (see use CGI::Util line in script below). but this did not change the error which is being thrown by the line use CGI; or use CGI qw/:all /;. Which one I use has made no difference. If, for fun, I comment out use CGI; then the same error is thrown by the use CGI::Util line. I have Googled the error and found this but haven't been able to figure out what is happening.

Any help will be greatly appreciated.

TIA
jg
#!/usr/local/bin/perl -w use strict; use CGI::Carp qw/fatalsToBrowser /; use lib ('/home/xxxxx/public_html/mods'); use CGI qw/:all /; # this line added to try to deal with error use CGI::Util qw(rearrange make_attributes unescape escape expires ebc +dic2ascii ascii2ebcdic); my $q = CGI->new(); use CGI::Upload; my $upload = CGI::Upload->new; use DBI; my $user_pass = $q->param('pass'); my $name = $q->param('name'); my $corrected_filename = $name; $corrected_filename =~ s/ /_/g; $corrected_filename =~ s/[^a-zA-Z0-9_-]//g; my $file_extension = $upload->file_type('temp_filename'); $corrected_filename .= ".$file_extension"; my $target_directory = "/home/ehrhardt/public_html/releases/"; if ($user_pass eq 'xxxxx') { file_up(); } else { print $q->header, start_html, h2('Bad Password=', $user_pass); exit; } sub file_up { local $| = 1; my ($bytesread,$buffer,$file); my $fh = $upload->file_handle('temp_filename'); open(OUTF, '>' . $target_directory . $corrected_filename); while ($bytesread = read($fh, $buffer, 1024)) { print(OUTF $buffer); } close(OUTF); if (!$file && $q->cgi_error) { print($q->header(-status=>$q->cgi_error)); exit 0; } update_db(); my $redir = "http://www.xxxxx.com/admin/done.htm"; print $q->redirect("$redir"); } sub update_db { my $dbh = DBI->connect("DBI:mysql:PressReleases:localhost","xxxx", +"xxxxx",{'RaiseError' => 1}); my $sth = $dbh->prepare("INSERT INTO Releases (Row, Name, FileURL, + Description, Uploaded, Archived) VALUES (?, ?, ?, ?, ?, ?)"); my $fileURL = "http://65.57.xxx.x/~xxxx/xxxxx/$corrected_filename" +; my $description = $q->param('description'); $description =~ s/\'/\\\'/g; $sth->execute('', $name, $fileURL, $description, undef, ''); }
_____________________________________________________
"The man who grasps principles can successfully select his own methods.
The man who tries methods, ignoring principles, is sure to have trouble.
~ Ralph Waldo Emerson

In reply to Upgrade to CGI.pm 3.01 results in problems with CGI::Util by jerrygarciuh

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.