in reply to Re^2: Parsing Problems
in thread Parsing Problems

Two things stand out here:

An idea is to print the string you're evaling, and of course checking whether eval produced an error in $@:

my $code = qq~modes::~ . $ARGV[2] . qq~::flex(/$line);~; warn $code; eval $code; warn "Eval failed: '$@'" if $@;

Replies are listed 'Best First'.
Re^4: Parsing Problems
by ftherese (Novice) on May 13, 2019 at 18:30 UTC
    Okay! Now we're getting somewhere. In the old environment, no error is reported. In the new environment: Undefined subroutine &modes::three::a called at (eval 32) line 1. ...

    Also, I mistyped because I'm on my phone it is \$line.