Help for this page

Select Code to Download


  1. or download this
    my %results = map {
       my ($x, $y) = split(/=/, $_, 2);
    ...
       }
       ($x, $y)
    } split(/,/, $string);
    
  2. or download this
    my %results = map {
       /^([^=]*)(?:(=)(#)?(.*))?/s;
       ($1, ($3 ? fn($4) : ($2 ? $4 : fn($1))))
    } split(/,/, $string);