Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    
    my %hash2 = split /,/ => "$strA,$strB";
    print Dumper \%hash2;
    
  2. or download this
    my ($strA, $strB) = ("$str1,", "$str2,");
    my %hash = map { map substr($_, 0, -1),
    ...
                   } 1 .. $strA =~ tr/,//;
    
    print Dumper \%hash;