I need to have perl return a # some how
I am having my code write to a webpage. In the webpage I need to be able to change colors of the page and text. While yes it is possible and it is working to use default names of colors such as white, red, blue ect. I would also like the code to be able to use custom colors such as #BE9292. Howver the code is doing strange things when it either has to write # from what I enter on the web page because then it writes it as %23BE9292 or if I call it from the perl script and only enter BE9292 as a color then the script stops there and gets caught in a loop because to perl # is for comments.. I am looking for the work around so that perl will know I am trying to use and return the # as part of my code rather than as a comment indicator. Thanks, Mark At 07:17 PM 12/7/01 -0500, you wrote: >Mark, > >It's not clear to me what you're wanting to do from your posting. One >comment though if you don't mind... you can avoid the backslash character >and in this case make the code more legible by using Perl's 'custom quotes' >feature. > >For example, > >" text=\"$textcolor\"" > >can be rewritten as > >qq| text="$textcolor"| > >The way it works is that by saying 'qq' plus a character, you acheive the >same effect as using double quotes. Using 'q' plus a character works just >like single quotes, i.e. uninterpreted character string. The character you >chose to follow the 'qq' is up to you and you only need to be sure to >delimit both ends of the string with that character. There's an exception >if you decide to use parens or square or curly brackets or angle brackets >then the start and end delimiters must be the start and end of these... >which might be clear as mud so I'll give an example: > >qq( text="$textcolor") > > >Marty > >At 06:56 PM 12/7/01 -0500, Mark Jervis Sr. wrote: >><body bgcolor="Blue" text="custom" link="White" alink="White" vlink="White"> >> >>Ok here is what it is returning. >> >>I fixed the code to this: >> >>if($textcolor eq "custom") >> { >> print " text=\"$textcolor\""; >> } >>else{ >> print " text=\"$txtcustom\""; >> } >> >>when textcolor equals custom thats what it's returning rather than reading >>the else statement. > >Website Creation Made SIMPL(tm) >http://face2interface.com/Home/Demo.shtml >WebSafe Color Picker -- http://face2interface.com/Websafe > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]