Current location: Hot Scripts Forums » Programming Languages » Perl » syntax for adding a css style to a perl script please


syntax for adding a css style to a perl script please

Reply
  #1 (permalink)  
Old 11-08-03, 05:16 AM
arpana arpana is offline
New Member
 
Join Date: Nov 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
syntax for adding a css style to a perl script please

Hi,
This is my first post and sorry its a no brainer but here goes

I have a line in my code that I need to add a style too but I am unsure what the correct way is to do this.

This is my line in perl:

print "<img src=\"/photos/$img\" border=\"0\" alt=\"$img\" id=\"photo\" />";

and I want to add to the begining: <span class="photo"> and at the end: </span>

I tried this but it gave me a 500:

print "<span class="photo"><img src=\"/photos/$img\" border=\"0\" alt=\"$img\" id=\"photo\" /></span>";

Any help greatly appreciated.

Karl
Reply With Quote
  #2 (permalink)  
Old 11-08-03, 05:31 AM
The Hooded's Avatar
The Hooded The Hooded is offline
Newbie Coder
 
Join Date: Nov 2003
Location: Toronto, Canada
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
What you need todo to fix your error is add the \ backslash character in front of each Quotation mark.

In many programing languages the \ is used as an escape charater to allow for special characters in the code
print "<span class=\"photo\"><img src=\"/photos/$img\" border=\"0\" alt=\"$img\" id=\"photo\" /></span>";
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie perl script to call an array in a subroutine and add 1 Arowana Perl 1 10-31-03 01:04 PM
unsing win32 perl script run lotus notes mail josephg Perl 0 10-26-03 10:19 PM
Perl CGI wrapper script available? paulbearer Script Requests 0 09-17-03 03:18 PM
need perl script! dip Script Requests 3 09-08-03 10:57 AM
YAhoo store style script? KayENT PHP 0 07-22-03 08:47 AM


All times are GMT -5. The time now is 04:42 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.