- or download this
while ( <> ) {
chomp;
print "$_\n" if length $_;
}
- or download this
{
local $/;
...
$contents =~ tr/\n/\n/s;
print $contents;
}
- or download this
$/='';chomp,print"$_\n"while<>
- or download this
print/./?$_:''while<>
- or download this
print/./?$_:''for<>
- or download this
perl -ne "print if/./"
- or download this
perl -0pe "y/\n/\n/s"
- or download this
perl -ne "/./&&print"