• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

Linking code HTML in Perl

I'm trying to generate links in a webpage where you'd click the word and it will send you to a different site.

I'm doing this writing in Perl,  i've tried: <a href="url">Link text</a>

in the script below... but whenever i add it into the body, i receive the Server Error message.

Is there something i'm doing wrong?
<form id='form1' name='form1' method='post' action='ORFfinder.pl'>
  <label>Please enter a Fasta formatted DNA Sequence:<br>
    <textarea name='dna-textbox' id='dna-textbox' 'DNA sequence here:' cols='45' rows='5'></textarea><form id='form1' name='form1' method='post'
 <p>Or upload a DNA Fasta sequence file: <input type='file' name='fileupload'/></p> </label>
  <p>Please select an enzyme to digest sequence:</p>
      <input type='radio' name='enzyme' value='TRYPSIN' id='TRYPSIN'
    <br />
      <input type='radio' name='enzyme' value='ENDOPROTL' id='ENDOPROTL' />
      Endoproteinase Lys-C</label>
    <br />
      <input type='radio' name='enzyme' value='ENDOPROTA' id='ENDOPROTA' />
      Endoproteinase Arg-C</label>
    <br />
      <input type='radio' name='enzyme' value='V8PROT' id='V8PROT' />
      V8 proteinase (Glu-C)</label><br>
    <input type='submit' name='button' id='button' value='Submit' />
     <input type='reset' name='Reset' id='Reset' value='Reset' />
       <input type='button' name='Help' id='Help' value='Help' />
       <input type='button' name='Upload' id='Upload' value='Upload' />
    <br />

Open in new window

1 Solution
The problem is you are using the " character to indicate the start/end of your string.  You either need to escape the " you want to appear, or use another character.
##### Example with escaping
print "<html>
more stuff here
<a href=\"www.somesite.com\">link to some site</a>
##### Example using another character
print qq{<html>
more stuff here
<a href="www.somesite.com">link to some site</a>

Open in new window

StephenMcGowanAuthor Commented:
Thanks Adam
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now