Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my %testhash = map { m{(([^/]+)\.[^/]+)$}; $2, $1 } @teststr;
    
    print "$_ => $testhash{$_}\n" for sort keys %testhash;
    
  2. or download this
    file1 => file1.txt
    file2 => file2.txt
    file3 => file3.txt
    file4 => file4.txt