or download this
print "Empty matches ^\$ --> ", ("" =~ /^$/ ? 'yes' : 'no'), "\n";
print "Newline matches ^\$ --> ", ("\n" =~ /^$/ ? 'yes' : 'no'), "\n"
+;
print "Empty matches ^\\z --> ", ("" =~ /^\z/ ? 'yes' : 'no'), "\n";
print "Newline matches ^\\z --> ", ("\n" =~ /^\z/ ? 'yes' : 'no'), "\n
+";