a single line with this =>
s/\n//g and print while <>;
Be very careful...
Indeed. Try this one:
--- begin ---
#!/usr/local/bin/perl
print "Hello World!\n"
--- end ---
And if you insists that the shebang line isn't part of the program:
--- begin ---
# start of program
print "Hello World!\n"
--- end ---
And if you insist that you can't have comments (or pod documentation):
--- begin ---
print "Hello World!
"
--- end --
or worse:
--- begin ---
print <<EOF
Hello World!
EOF
--- end --
And I could probably go on a bit longer, if I felt like it. Line
endings in Perl are not equivalent to "nothing" or even other
whitespace. They are for many intents and purposes, but not nearly for
all.
Martien