Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Tie::Hash::RegexKeys 1.2

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Fabrice DULAUNOY | More programs
    Perl Artistic License / FREE
    August 22nd, 2007, 02:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Tie::Hash::RegexKeys description

    Tie::Hash::RegexKeys will match hash keys using Regular Expressions.

    Tie::Hash::RegexKeys will match hash keys using Regular Expressions.

    SYNOPSIS

    use Tie::Hash::RegexKeys;
    use Data::Dumper;

    my %h;

    tie %h, 'Tie::Hash::RegexKeys';

    my $a = '.1.2.3.4.5.6.2';
    my $b = '.1.2.3.4.5.7';
    my $c = '.1.2.3.4.5.6.1';
    my $d = '.1.2.3.4.5.6.1.6';

    $h{$a}="key1";
    $h{$b}="key2";
    $h{$c}="subkey1";
    $h{$d}="subkey2";

    my $pat = '^.1.2.3.4.5.6.*';
    my @res = tied(%h)->FETCH_KEYS(qr/$pat/);
    print Dumper(@res);

    Return this:

    $VAR1 = '.1.2.3.4.5.6.1';
    $VAR2 = '.1.2.3.4.5.6.1.6';
    $VAR3 = '.1.2.3.4.5.6.2'

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    hash keys | Regular Expressions | Perl module | hash | regex | expressions

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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