Solved

Working with images in pearl

Posted on 2007-03-28
1
213 Views
Last Modified: 2008-02-01
hi there,
I'm totally new on this perl thing so be patience :)
i'm trying to put a image on the page but it does not seems to work i got an erorr saying "Software error:
syntax error at /home/s07-it605-s27/public_html/cgi-bin/mets.pl line 25, near ""<img border="0"
Execution of /home/s07-it605-s27/public_html/cgi-bin/mets.pl aborted due to compilation errors."

here is the piece of code that actually calls the image:
print ("<img border="0" src="file:///../images/2006-07-05-topper-mets.jpg" width="472" height="270" align="left"><br><H1>You are correct!!!  It is  

$thepara0</H1>
See I told you it wasn't that hard to find out was it?<p>Too bad I'm all the way
down here in Florida and I won't be able to see this great set of guys taking
the field on opening date but one thing is for sure </p>
<p><b><font size="6">This is the year!!! </font></b><br>
</p>");

can this be done in pearl?
if it is how can i do it?


0
Comment
Question by:jsctechy
1 Comment
 
LVL 17

Accepted Solution

by:
mjcoyne earned 500 total points
Comment Utility
Use a "here-doc":

#!/usr/bin/perl -w
use strict;

my $thepara0 = "Something";

print<<END
<img border="0" src="file:///../images/2006-07-05-topper-mets.jpg" width="472" height="270" align="left"><br><H1>You are correct!!!  It is  

$thepara0</H1>
See I told you it wasn't that hard to find out was it?<p>Too bad I'm all the way
down here in Florida and I won't be able to see this great set of guys taking
the field on opening date but one thing is for sure </p>
<p><b><font size="6">This is the year!!! </font></b><br>
</p>
END
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now