in reply to Undefined value as array reference

I don't get the error on 5.8.4-linux. Output with unmodified code:

$ perl change.pl E=((?:1111111111)*)((?:111111)*)((?:11111)*)((?:1)*) Trying to change 12 with 10 6 5 1... ((?:1111111111)*)((?:111111)*)((?:11111)*)((?:1)*) on 111111111111 Code doesn't get run after once. 12: 3 is better than 0 Matched! C=3 12: Trying to change 14 with 10 6 5 1... ((?:1111111111)*)((?:111111)*)((?:11111)*)((?:1)*) on 11111111111111 Code doesn't get run after once. Matched! No matching combination found 14: Trying to change 36 with 10 6 5 1... ((?:1111111111)*)((?:111111)*)((?:11111)*)((?:1)*) on 1111111111111111 +11111111111111111111 Code doesn't get run after once. Matched! No matching combination found 36: $
Perhaps you're running the wrong copy? (I do that a lot)

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: Undefined value as array reference
by dragonchild (Archbishop) on Mar 11, 2005 at 02:35 UTC
    I got the error on perl, v5.8.5 built for cygwin-thread-multi-64int

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      I got the error on perl, v5.8.3 built for i586-linux-thread-multi
Re^2: Undefined value as array reference
by renz (Scribe) on Mar 11, 2005 at 20:10 UTC

    I got the error on 5.8.4 for mswin32-x86-multi-thread (activestate binary build 810). If time permits, I'll try later on my freebsd partition.

    Dragonchild's rewritten greedy_change() works without producing that error, however I do get one "Use of uninitialized value in concatenation (.) or string at test.pl line 30" warning.

    Update: 5.8.6 mswin32-x86-multi-thread (AS bin build 811) also affected.

    /renz.
    "Call on God, but row away from the rocks."
    --Hunter S. Thompson.