in reply to Re^4: Regex help/ Lua parse
in thread Regex help/ Lua parse
Compare your original version (with all regexes reduced to regex to alleviate noise)
sub buildTables { while (<>) { if (/regex/) { $theme_table{$1} = $2 } if (/regex/) { $taglist_table{$1} = $2 } if (/regex/) { $menu_table{$1} = $2 } } #print Dumper \%theme_table; #print Dumper \%taglist_table; #print Dumper \%menu_table; }
with this alternative version
sub buildTables { while (<>) { if (/regex/) { $theme_table{$1} = $2 } if (/regex/) { $taglist_table{$1} = $2 } if (/regex/) { $menu_table{$1} = $2 } } }
Which looks clearer to you? Is the closing brace of the while loop more or less obvious to you now? How about providing me with some examples of code that looks like yours.
-- Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Regex help/ Lua parse
by marquezc329 (Scribe) on Oct 27, 2012 at 18:52 UTC | |
by kcott (Archbishop) on Oct 28, 2012 at 07:42 UTC |