in reply to Regexp syntax nuance question, storing $1 (code)

timtowtdi :)

Assuming you've chomped the lines before sending...

sub zapwrap { return ("$_[0]$_[1]" =~ /^#(#+|=+)$/) || undef; }
cLive ;-)