Just wanted to note that you shouldn't use /o. it does nothing in the examples you showed, so I suspect you don't know what exactly its effects are; in that case it can get you in big trouble. If you are using it because you read that it is about efficiency, read up about the qr// "operator" whose introduction in Perl 5.005 (almost) obsoleted /o.