print "'$_' is empty string" if $_ =~ /^$/; #### 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";