in reply to Pair-wise list access - without temp hash
This avoids the temporary, but I'm not sure that it is any better for doing so:
use strict; use Data::Dumper; my $Incoming = 'uno="one" Blah blah dos="two" * More Noise* tres="thr +ee"'; my %att= (PREEXISTING=>"val1", ANOTHER=>"Val2"); $att{ uc $_->[ 0 ] } = $_->[ 1 ] for map[ m[(\w+)="([^"]+)"] ], $Incoming =~ m[\W*(\w+="[^"]+")]ig; print Dumper \%att;
|
|---|