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. :)