in reply to Re^5: Can not use JSON module
in thread Can not use JSON module

Hi,

Thanks.

I tried the given original code by you(keeping the Data dumper). I have changed the "shebang line" and then executed it. I got following error as below

Use of uninitialized value in regexp compilation at jjson.pl line 93. Use of uninitialized value in regexp compilation at jjson.pl line 93. Eval-group not allowed at runtime, use re 'eval' in regex m/ (?&VALUE) (?{ $_ = $^R->[1] }) (?(DEFINE) (?<OBJECT> (?{ [$^R, {}] }) { (?: (?&KV) # [[$^R, {}], $k, $v] .../ at jjson.pl line 93.

I executed as ./jjson.pl. Also as perl jjson.pl. Both from command prompt.

I tried to search error, But did not find anything helpful.

Please help.

Replies are listed 'Best First'.
Re^7: Can not use JSON module
by hippo (Archbishop) on Jun 05, 2017 at 12:23 UTC
    I tried to search error, But did not find anything helpful. Please help.

    The solution is right there in the error message you quoted. Simply add

    use re 'eval';

    somewhere in scope (eg. right after use warnings;). See perlre for details on what this affects.

      See also re.


      Give a man a fish:  <%-{-{-{-<