IHYPRESS PROGRAMMING
Tutorials and Perl programs with code and output for beginners
Perl logo
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
Perl ❯ Basic Operators
<03>
#!/usr/bin/perl -wT use CGI':standard'; use CGI::Carp qw(warningsToBrowser fatalsToBrowser); my $x; my $y; my $z; $x = 10; $y = "Oklahoma"; $z = $x * 3; #start html output here print "Content-type: text/html\n\n"; print "<!DOCTYPE html>"; print "<html><head><title>Operators</title></head>"; print "<body>"; print "<div>$z</div>"; print "<div>" . sqrt(2) . "</div>"; print "<div>" . 2**3 . "</div>"; if ($x > 5) {print "<div>x is larger than 5</div>";} print "<div>" . "Tulsa, " . $y . "</div>"; print "</body></html>";
Hergestellt in Deutschland / Made in Germany
Operators
30
1.4142135623731
8
x is larger than 5
Tulsa, Oklahoma
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland