Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convert to using heredoc

Also handle case where IP address can't be detected. 
  • Loading branch information...
commit 8615bb6cb623096eb7463b00443feb6f8015c85e 1 parent 20890f4
@genehack genehack authored
Showing with 12 additions and 15 deletions.
  1. +12 −15 www/cgi-bin/index.pl
View
27 www/cgi-bin/index.pl
@@ -3,19 +3,16 @@
use CGI qw/:standard/;
use Net::Address::IP::Local;
-print header;
-
-print "<HTML><BODY>";
-print "DC.PM Podcaster Software<BR><BR>";
-print "My IP address is: " . Net::Address::IP::Local->public_ipv4 . "<BR><BR>";
-
-# Check to see if presentation is ready
-# If so
-
-print "To add yourself as a presentor, click <A HREF=\"present.pl\">here</A>.<BR>";
-
-print "</BODY></HTML>";
-
-
-
+my $ip = Net::Address::IP::Local->public_ipv4
+ or qq|<span style="color:red">Could not detect IP!</span>|;
+print header;
+print <<EOHTML;
+<html>
+ <body>
+ <p>DC.PM Podcaster Software</p>
+ <p>"My IP address is: $ip</p>
+ <p>To add yourself as a presentor, click <a href="present.pl">here</a>.</p>
+ </body>
+</html>
+EOHTML
Please sign in to comment.
Something went wrong with that request. Please try again.