in reply to Re^2: insert CGI script in single quotes.
in thread insert CGI script in single quotes. [SOLVED]

The code you posted in your original node works fine.

It sounds like you want it to continue to work with a single-quoted "heredoc", i.e.:

print <<'EOF';
By doing that, you are defeating interpolation.

May I suggest an alternative , more efficient (for the programmer) syntax to get the results you want, while avoiding the "heredoc" syntax that you are having trouble with :

use CGI; my $q = CGI::->new(); print $q->start_table($q->caption("table Caption")), "\n", $q->thead({-class=>"flip-content"}, $q->Tr($q->td({-width=>"20%"},"Students id") , map {$q->td({-class=>"numeric"}, $_). "\n"} ("First Name", "Last Name", "Date Of Birth", "Year In", "Password", "Email","Telepon") )), "\n", $q->start_tbody(),"\n"; while (my @row_array = $sth->fetchrow_array()){ print $q->Tr( map {$q->td($_) . "\n"} @row_array ),"\n"; } print $q->end_tbody(),"\n",$q->end_table(),"\n";
There are better alternatives if you use one of the "template" modules, but this should get you started.

        This is not an optical illusion, it just looks like one.

Replies are listed 'Best First'.
Re^4: insert CGI script in single quotes.
by pakeidoprek (Novice) on Apr 26, 2016 at 17:49 UTC

    wow it's great format. i will try it sir :)