Convert to using heredoc #4

Merged
merged 1 commit into from Aug 8, 2012
Jump to file
+12 −15
Split
View
@@ -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