in reply to delete above matching line?

Hi,

The following is a rough spec for what I understand to be your issue.

While processing through the file, if this line doesn't match, print the previous line and store this line as the previous line.

However if this line matches don't print the previous line and set the previous line string to "".

By the way, Do you want to keep the closing braces?

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

Replies are listed 'Best First'.
Re^2: delete above matching line?
by oldmanwillow (Novice) on Jul 01, 2010 at 16:36 UTC
    Yep, that's pretty much it. The closing braces should be deleted.