in reply to Perl Worst Practices

Hi Hue-Bond,

I'm getting the following error and coredump:

liverpole@mynode % perl ./pwp.pl -mt '100th post!' Subroutine CORE::length redefined at (eval 14) line 1, <> chunk 1. Use of uninitialized value in length at ./pwp.pl line 30, <> chunk 1. splice() offset past end of array at ./pwp.pl line 33, <> chunk 1. Argument "*main::$/" isn't numeric in <HANDLE> at (eval 4385) line 2. Argument "*main::$/" isn't numeric in <HANDLE> at (eval 4385) line 2, +<TERMCAP> chunk 1. failed termcap lookup on xterm at ./pwp.pl line 72 Segmentation fault (core dumped)
I am running version 5.8.0 of Perl on RedHat Linux release 9.

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: Perl Worst Practices
by Hue-Bond (Priest) on Jun 20, 2006 at 18:42 UTC
    failed termcap lookup on xterm at ./pwp.pl line 72

    I think this is the cause for it, although I don't understand how is it possible that the terminal "xterm" isn't defined in the termcap database. Maybe you and wazoox could try running it in a text console, assuming the terminal "linux" won't give trouble!

    It also amuses me that the error appears at different lines on each system :)

    $ TERM=foobar ./pwp.pl -ta Subroutine CORE::length redefined at (eval 14) line 1, <> chunk 1. Can't find a valid termcap file at ./own-11-obfu-11.pl line 76

    Update: Oops, some <tt> tags had slipped into the quoted text.

    --
    David Serrano