Find the answer to your Linux question:
Results 1 to 3 of 3
I'm trying to IE, make Code: <P style="background-color:#222222">Hello!</P> Work inside a Perl Script: "comments.pl" For those wondering: Code: #!/usr/bin/perl -w htmlReturn(); sub htmlReturn { Thanks for Commenting! That's all! } ...
  1. #1
    Just Joined! heyyeh's Avatar
    Join Date
    Aug 2008
    Posts
    71

    Exclamation [SOLVED] Help Making HTML tags work in Perl

    I'm trying to IE, make
    Code:
    <P style="background-color:#222222">Hello!</P>
    Work inside a Perl Script: "comments.pl"

    For those wondering:
    Code:
    #!/usr/bin/perl -w
    
    htmlReturn();
    
    sub htmlReturn {
    	Thanks for Commenting! That's all!
    }
    #End this Subroutine.
    That's my code so far!
    Any ideas?

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,228
    I'm afraid I don't entirely understand. Are you just trying to print "<P style="background-color:#222222">Hello!</P>"? Then just use the "print" function.
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Just Joined! heyyeh's Avatar
    Join Date
    Aug 2008
    Posts
    71

    Question Perl Problem Yet Again!

    I already found out the answer.
    Values for a HTML tag's attribute is strictly in double quotes:
    "
    And double quotes for print strings are also in double quotes if you are printing more than one character.

    But, I found out that you can just use
    \" \"
    In place of quotation as an attribute's value.

    If it's alright, I need to post another problem I have with another script I have made; for uplaoding an image.

    I made a global variable called: "$SafeChar".

    But no matter how many times I rename it, Eclipse gives me this Error:
    Global Symbol
    $SafeChar requires an Explicit Package Name
    That Error is inline by the way; within one line.

    And I also get this message:
    Variable $SafeChar is not imported
    I'm using EPIC- Eclipse Perl Integration Plugin- to make this script and Kedit for the last one mentioned about the quotation problem.

    All other Variables work Like a Charm Except for those Errors that I for one character have no use for right now, for I am testing these scripts to use on a day that I get a website with CGI-BIN support.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...