In Perl most of my print
statements take the form
print "hello." . "\n";
Is there a nice way to avoid keeping all the pesky "\n"s lying around?
I know I could make a new function such as myprint
that automatically appends \n, but it would be nice if I could override the existing print
.
转载于:https://stackoverflow.com/questions/2899367/how-can-perls-print-add-a-newline-by-default