in reply to RE: RE: Re: Help for awk/regex/newbie
in thread Help for awk/regex/newbie
Never use $1 unless it's within the context of a conditional based on the success of the match.
Otherwise, you get the previous match. In this case, an empty line would give you a duplicate "first" word from the previous entry!
-- Randal L. Schwartz, Perl hacker
|
|---|