Solved

Working with images in pearl

Posted on 2007-03-28
1
217 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
ID: 18813199
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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 …
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…

830 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