Skip to content
Browse files

Convert to using heredoc

Also handle case where IP address can't be detected. 
  • Loading branch information...
1 parent 20890f4 commit 8615bb6cb623096eb7463b00443feb6f8015c85e @genehack committed
Showing with 12 additions and 15 deletions.
  1. +12 −15 www/cgi-bin/
27 www/cgi-bin/
@@ -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=\"\">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;
+ <body>
+ <p>DC.PM Podcaster Software</p>
+ <p>"My IP address is: $ip</p>
+ <p>To add yourself as a presentor, click <a href="">here</a>.</p>
+ </body>

0 comments on commit 8615bb6

Please sign in to comment.
Something went wrong with that request. Please try again.