Perl and CGI

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentPerl and CGI

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old April 5th, 2006, 01:59 PM
shonnard shonnard is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 2 shonnard New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
PERL: Here Documents

I am teachering PERL for the first time to my High School students... Early in the book I am using to teach (PERL in easy steps) we learned about using HERE documents.
I like this idea, and in conjunction with the editor we're using (dz Soft Perl Editor), it seems like a good way to get around a lot of syntax errors that will come up (quotes, semi-colons, \n, etc.)

Now, I am teaching about parsing and key/values (using the text CGI/PERL by Diane Zak)...

while trying to get this code to run:

print "The capital of ", param('state'), " is ", param('cap'), ".\n";

I removed the following part of the code because I had set up a print <<DOC at the top of the page:
print " and the \n";
as well as all other internal double quotes...

But when I run the code, I get:
The capital of param('state') is param('cap').

I tested a variable ($test=1) and this ran perfectly (displaying a "1"). But for some reason the param statements appear?

HELP!

Reply With Quote
  #2  
Old April 14th, 2006, 02:14 PM
ghostdog74 ghostdog74 is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 2 ghostdog74 New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
you could try qq() or q() methods to reduce the quoting errors

Reply With Quote
  #3  
Old April 25th, 2006, 08:43 AM
shonnard shonnard is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 2 shonnard New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank you ghostdog!

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentPerl and CGI > PERL: Here Documents


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap