AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Simple Perl Examples
 
 
  [ # 31 ]
Victor Shulist - Jul 24, 2010:

Dave.. for code, we should ask Erwin if he wants to have us email the files, and put them in some kind of “downloads” section.. because when you copy and paste code into these text boxes, and then click submit,  behind the scenes, it replaces your double and single quotes with strange ascii codes and then you can’t run the code.

Victor, actually we’d like to support both options:
1. upload your code
2. embedded your code.

Would it be possible to add it as a feature request (or event better: two feature requests) in the Admin tab with some additional explanation?
http://www.chatbots.org/admin/viewforum/13/

Would be cool! Thanks for that.
Erwin

 

 
  [ # 32 ]

Ok Erwin I will do that.

Now for the inline code, we will have to watch how we handle special charactors.  Example, single quote and double quote marks.  When you post one of these characters and view the page, it replaces those characters with other ones, some other ascii code ... but when you copy and paste from the page (if someone did that rather than download the file), and paste it into notepad and save it, it will not run, it gives errors because the characters are different.  I don’t know if this is a unicode issue perhaps.

 

 
  [ # 33 ]

Well, if it’s an encoding issue, it’s not due to page encoding. The HTML for the page sets the encoding to UTF-8, which is as it should be. My guess at this point is that it’s in the function that handles the [ code ] tag. Of course, that’s far outside the scope of my duties and permissions here, so I’ll leave it up to the Boss. smile

 

 
  [ # 34 ]
Chuck Bolin - Jul 28, 2010:

Richard,
GFA Basic?  That was my first high level programming language in ‘86. I had a blast with GEM (Graphics Environment Manager).  Remember the documentation?? There wasn’t much…was there?  Those were the days before ‘Google’. =)

GEM and AES were fortunately so intuitive they didn’t need documentation. wink Plus there was a nice builder that created these RSC files…
I have these nifty ATARI emulators on my mobile phone and notebook. Nostalgic reasons - you know.

I did write an electrical drawing program in GFA Basic.
...
and then I traded the ATARI for some scuba equipment so I could dive off the coast of beautiful southern California. It was a tough trade though.

I wrote some MIDI applications (those days the ATARI was the ultimate MIDI workhorse) and started selling them through my company I founded the day I turned 18.
Then I bought some scuba equipment and went diving to the Maledives, I’m happy to have managed that before the vast majority of the coral reefs there died.

Richard

 

 
  [ # 35 ]

file: helloworld.cgi
path: cgi-bin

#!/usr/bin/perl -w

print "Content-type: text/html\n\n";

print <<
EOF ;
<
html>
<
head><title>Simple Perl CGI example</title></head>
<
body>
<
h1>Helloworld.</h1>
<
p>Simple Perl CGI example</p>
</
body>
</
html>
EOF

exit ; 
 

 < 1 2 3
3 of 3
 
  login or register to react
‹‹ New Sitepal Features      Simple PHP Examples ››