egunnar has asked for the wisdom of the Perl Monks concerning the following question:

hello. i am a perl beginner. i am trying to write a short program to convert ebcdic to normal text. a ebcdic cpan module is already correctly installed on this linux machine( I know because other programs use it). The file /usr/local/lib/perl5/site_perl/5.8.4/i686-linux/Convert/IBM390.pm exists. Is there something extra I have to do to "get" the .so files? here is the error message I get.
Can't load '/usr/local/lib/perl5/site_perl/5.8.4/i686-linux/auto/Convert/IBM390/IBM390.so' for module Convert::IBM390: /usr/local/lib/perl5/site_perl/5.8.4/i686-linux/auto/Convert/IBM390/IBM390.so: undefined symbol: PL_sv_undef at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229. at ./ebcdic_to_ascii.pl line 10 Compilation failed in require at ./ebcdic_to_ascii.pl line 10. BEGIN failed--compilation aborted at ./ebcdic_to_ascii.pl line 10.
#!/usr/bin/perl -w #require 'mylib.pl'; print "\n\n", "\@INC is :\n"; for (@INC){print "$_\n";}; BEGIN{ unshift @INC, "/usr/local/lib/perl5/site_perl/5.8.4/i686-linux"; unshift @INC, "/usr/local/lib/perl5/site_perl/5.8.4/i686-linux/auto"; } use strict; use Convert::IBM390 qw(); #use Convert::IBM390 qw(:all); #my @in =<>; #print eb2asc(@in);

thanks,
erik

Replies are listed 'Best First'.
Re: including .so files
by Zaxo (Archbishop) on May 20, 2005 at 20:57 UTC

    The error looks like an improper installation, but if it works for other people you may just need some different environment magic. Ask somebody there who has it working for them.

    It may be easier than that. Check $ perl -MEncode -e'@list = Encode->encodings("EBCDIC"));print "@list $/"' to see if ebcdic is supported on your platform. It should be.

    You should then be able to write this with a PerlIO encoding layer,

    binmode $inhandle, ':encoding(EBCDIC)'; while (<$inhandle>) { print $outhandle $_; }
    which uses only parts from the perl distribution. Untested, no ebcdic here.

    After Compline,
    Zaxo

Re: including .so files
by VSarkiss (Monsignor) on May 20, 2005 at 21:40 UTC
Re: including .so files
by zentara (Cardinal) on May 21, 2005 at 11:26 UTC
    Try changing your shebang line to

    #!/usr/local/bin/perl

    from #!/usr/bin/perl


    I'm not really a human, but I play one on earth. flash japh