Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^3: Parsing Problems

by haj (Priest)
on May 13, 2019 at 18:07 UTC ( #1233720=note: print w/replies, xml ) Need Help??

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

Two things stand out here:

  • $ARGV[2] might contain un-decoded UTF-8 characters in "modern" terminals. File systems with UTF-8 characters behave differently, depending on the platform (Windows/Unix).
  • (/$line) looks weird. That needs really special values for $line to produce valid Perl!

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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1233720]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2022-05-20 05:30 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (72 votes). Check out past polls.