Solved

Working with images in pearl

Posted on 2007-03-28
1
215 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
binary to char / hexadecimal 5 112
perl CPAN issue 3 109
How to search multiple patterms in a file with perl? 4 79
Regular Expression for URL 10 97
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 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

10 Experts available now in Live!

Get 1:1 Help Now