in reply to Re: regular expression - grabbing everything problem
in thread regular expression - grabbing everything problem

For your first example, 1 is always true, which will work fine if there is only one file in @ARGV, however you should probably use eof instead.

Replies are listed 'Best First'.
Re^3: regular expression - grabbing everything problem
by davido (Cardinal) on Aug 09, 2011 at 00:53 UTC

    That's a great suggestion. I intended for it being always true, which seemed fine for simplicity's sake. But if someone is using @ARGV or the empty diamond operator, eof is the answer. Excellent. Updating now. Thanks!


    Dave