in reply to need help with Tie::Judy

Although the documentation for Tie::Judy seems quite lacking (ie. there is none), the SYNOPSIS appears enough to get someone at least started. Have you looked there?

Perhaps give it a try, and if you have problems, come back here with specific questions.

Replies are listed 'Best First'.
Re^2: need help with Tie::Judy
by expo1967 (Sexton) on Dec 05, 2020 at 20:11 UTC
    Yes I have looked at the documentation for Tie::Judy and the example code is not complete. I need a complete functioning example.
      > I need a complete functioning example.

      try this

      use Tie::Judy; tie %fruit_color, 'Tie::Judy';
      A hash represents a set of key/value pairs:
      my %fruit_color = ("apple", "red", "banana", "yellow");
      You can use whitespace and the '=>' operator to lay them out more nicely:
      my %fruit_color = ( apple => "red", banana => "yellow", );
      To get at hash elements:
      $fruit_color{"apple"}; # gives "red"
      You can get at lists of keys and values with keys() and values().
      my @fruits = keys %fruit_color; my @colors = values %fruit_color;

      see also Re: need help with Tie::Judy

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        I'm trying to understand what is happen with the sample code LanX has provided...

        The command tie %fruit_color, 'Tie::Judy'; ties the associative array* %fruit_color to the class. From this point on, when %fruit_color is used, instead of the default Perl behaviour, the implementation is handled by Tie::Judy which implements alternative methods to the default methods used by Perl. In this case it does the same thing in a different way.

        Is that something like correct?

        * I deliberately didn't refer to %fruit_color here as a hash because in this case it is a Judy Array which is not a hash but another example of the same type of storage.