There is a difference. Consider the following:
son-and-law I can't promise anything (and never will). People should carpool--and in some cases they do--since it saves gas.
m/^and$/ will miss the 'and' in these cases, even though it is there. I don't know whether the OP wants that or not, as he didn't really specify edge cases. If such edge cases should be disallowed, my code would need a minor modification so as to not attempt to print anything if @locations is empty.
Dave
In reply to Re^3: tracking words in lines
by davido
in thread tracking words in lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |