http://www.perlmonks.org?node_id=1018367


in reply to Re: Using grep in a scalar context
in thread Using grep in a scalar context

So I went back to the start after posting this and essentially came up with your first option, I'm glad you recommended it as well because I was worried that it was childish/too roundabout. Thanks so much everyone. :)