in reply to Delete last line of file with regex

Do you really need to detect the eof from inside the regex?
while (<>) { print unless /^##/ && eof; }
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]