Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: insert CGI script in single quotes.

by NetWallah (Canon)
on Apr 26, 2016 at 16:19 UTC ( [id://1161568]=note: print w/replies, xml ) Need Help??


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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1161568]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-19 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found