Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

cbrandtbuffalo (4462)

  (email not shown publicly)

Perl programmer at the University at Buffalo.
Friday September 03, 2004
12:01 PM

Perl error

[ #20716 ]

One of the stranger Perl errors I've gotten:

Can't use string ("sredro_qereedoc_lavorppa_falsred") as a HASH ref while "strict refs" in use...

I can assure you that string was not in my program. Although after thinking for a bit, I think I know where it came from.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • That error happens when you do:

    my $ref = "some string";
    $ref->{foo} = "bar";

    So you need to figure out which hash-ref got set with that string instead of a reference to a hash.


  • If that wierd string is not in your code, perhaps the strings "approval_code" and "req_orders" are?
    • If I had a cigar, I'd give you one!

      I was actually trying to be clever with:

      my @tables = keys %{reverse %{$Ereq::page_params{$page}}};

      Thought I could get the unique values that way, but mashing it all together caused problems.
      • How about :
        my @values =
        keys %{ { reverse %{ Ereq::page_params{$page} } } };

        I think the problem is that your calling reverse in scalar context