Help for this page
# 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) . ' };';