Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Tie::Hash::Stack 0.09

    Download button

    No screenshots available
    Downloads: 352  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Michael K. Neylon | More programs
    Perl Artistic License / FREE
    February 16th, 2007, 02:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Tie::Hash::Stack description

    Tie::Hash::Stack is a Perl module which maintains an array of hashes like a stack.

    Tie::Hash::Stack is a Perl module which maintains an array of hashes like a stack.

    SYNOPSIS

    use Tie::Hash::Stack qw(pop_hash push_hash merge_hash);

    my %hash;
    tie( %hash, "Tie::Hash::Stack" ); # Ties the hash

    $hash{ 1 } = "one";
    $hash{ 2 } = "two";
    $hash{ 3 } = "three";

    push_hash %hash; # Pushes a new hash on the stack

    $hash{ 2 } = "II"; # $hash{ 2 } now 'II'
    $hash{ 4 } = "IV";

    push_hash %hash;

    $hash{ 3 } = "9/3"; # $hash{ 3 } now '9/3'
    $hash{ 5 } = "10/2";

    pop_hash %hash; # $hash{ 3 } now 'three';

    delete $hash{ 2 }; # $hash{ 2 } now undef'ed;

    my %merged = merge_hash %hash; # ( 1=>one, 3=>three, 4=>IV )

    Tie::Hash::Stack allows one to tie a hash to a data structure that is composed of an ordered (FILO) sequence of hashes; hash values are always set on the newest hash of the stack, and are retrieved from the hash that contains the requested that is newest on the stack. The stack can be manipulated to add or remove these hashes. This type of structure is good when one is collecting data in stages with the possibility of having to "back up" to previous stages.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    maintains array | stack hashes | Perl module | Tie::Hash::Stack | maintains | array

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM