I wanted to take out the print statements
Code:
ubuntu@ubuntu-VirtualBox:/usr/lib/cgi-bin$ cat here_doc.cgi
#!/usr/bin/perl
print "Content-type: text/html";
print "\n\n";
print "<html>\n";
print "<head>\n";
print "<title>Doing all this typing sucks</title>\n";
print "</head>\n";
print "<body>\n";
print "<h2>Hello World<h2>\n";
print "</body></html>\n";
so here we go - get rid of statements, however would like to save some print statements.
Code:
ubuntu@ubuntu-VirtualBox:/usr/lib/cgi-bin$ cat here_doc.cgi | sed 's/print//g'
#!/usr/bin/perl
"Content-type: text/html";
"\n\n";
"<html>\n";
"<head>\n";
"<title>Doing all this typing sucks</title>\n";
"</head>\n";
"<body>\n";
"<h2>Hello World<h2>\n";
"</body></html>\n";
is there way to just skip switching the print statement for the first three lines - I was looking for this output
Code:
#!/usr/bin/perl
print "Content-type: text/html";
print "\n\n";
"<html>\n";
"<head>\n";
"<title>Doing all this typing sucks</title>\n";
"</head>\n";
"<body>\n";
"<h2>Hello World<h2>\n";
"</body></html>\n";