fork download
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Data::Dumper;
  5. my $string = q{Test string has tes value like abc="123",bcd="345" and xyz="523"};
  6. my %hash = $string =~ /(\w+)=\"(\d*)"/g;
  7. foreach (keys %hash){
  8. print "$_ = $hash{$_}\n";
  9. }
Success #stdin #stdout 0s 7304KB
stdin
Standard input is empty
stdout
bcd = 345
abc = 123
xyz = 523