in reply to Regexing a hash line thing

This is what I did:
# build an array of chunks that look like parms my (@parms) = $source =~ m/=\s+(?:new\s+)?FooBar(?:->new\s*?)?\((.*?)\ +);/gcs; # Processs the array and build a hash from the chunks. eval "\$Data = {" . join('', @parms) . ' };';
Works great! And what it does is take the source for a my $obj = new FooBar( 'key' => 'that' ); and put the parms in %Data.

Thanks for making me think about using split!! :)

--nutshell