Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

href used with print statement

href used with print statement

href used with print statement


How would I use href with a print statement.
Heres what I am thinking.

I created a form that appends data to a file and returns a print statement to html (The browser displays Payroll Reporting Form)

Here is how I added it.
print header, start_html("Payroll Reporting Form"), h1("Payroll Reporting From")

Heres my problem.

I want to add a second line of text that contains an href tag. The idea would be to have link point to the original form so that the user could start all over instead of using the back function on the browser.

My problem is that I can not seem to figure out how to do this using a print statment?


RE: href used with print statement

Sounds/Looks like you are using one of the CGI modules and are not quite sure what it is doing for you/to you.  If so, you should spend a little time writing some CGI w/o the module so you can see the mechanics.  The modules obscure the underlying stuff.  When you want an HREF to go to the client,
Do just what you said.....

print "<A HREF=\"some_URL\">Link Title</A>";

or, because escaping quotes is anoying,

print qq~<A HREF="some_URL">Link Title</A>~;

If you are using one of the CGI modules, it undoubtably has a function to do this, but, for this minor chore, I doubt it saves much/any effort.  I use CGI.pm extensively, but only for those things that I find it does better/easier than typing the stuff out the long way.

' hope this helps....

 keep the rudder amid ship and beware the odd typo

RE: href used with print statement


Thats again.
It worked.

I am using CGI.qw.

I have been reading up on perl over the last few weeks. So I would be condsidered a newbie to perl. Unforunatly my position lends it self to trial by fire (thrown to wolves) etc... So I forced to jump head first into the fire !

I will try to limit my posting.


RE: href used with print statement

I've been there.  ' been bounced on my head in the middle of a fire more than once.  I would encourage you to use this forum for what it is good for.  What it is good for is what you would expect.  People here are happy to help with problems, but, grow a little tired when someone asks for large amounts of code or weak questions with out first doing their home work.  So, please, continue doing some home work and ask for support as you need it.  

Also, take note of the FAQs.  There aren't many now, but the ones that are there are frequently asked question.  And, there will be more in the not to distant future.

 keep the rudder amid ship and beware the odd typo

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close