# find all the entities in the current file if (/entity\s+(\w+)\s+is/i) { $1{'name'} = $1; $1{'fname'} = $vhd_file; push @entities, \%1; }