xsize 0 Report post Posted October 19, 2004 I wonna show you my first perl programm: [br]#!/usr/bin/perl[/br]# See Log file[br][/br]print "Content-type: text/html\n\n";[br]print "<HTML><HEAD><TITLE>Mind of Perl</TITLE>";[/br]print "<head><body><p>";[br]print "<h1>Hay Cgi-BIn</h1>";[/br]print "</body></html>"[br] if you have other perl script, post it in this topic.[/br]How write perl counter? Share this post Link to post Share on other sites
s243a 0 Report post Posted December 12, 2004 How does it work? I started reading a book on pearl about 6 years ago but I didn?t finish it and forgot everything I learned. I assume the # denotes comment, ; for end of line. I recognize you are printing an HTML file. My questions are: how does the program know where to print? When and how does the program get executed, and does it show up automatically in your web browser or do you have to open the file first? I?ll probably get around to reading some stuff on my own soon enough but a discussion can be more fun then a book. Share this post Link to post Share on other sites
eiteljoh 0 Report post Posted December 14, 2004 That's cool - i'm just learning too. Now you can add CGI module, and makes life easier!! so you can replace things like "<br>" with brnot sure what the other benefits of it are ... [br]#!c:\perl\bin\perl -w[/br]use CGI qw/:standard/;[br][/br]use CGI;[br][/br]print header;[br]print "<html>"; # unsure of the cgi rep for this.[/br]print br . "Hello" . p . hr . "World";[br]print </html>";[/br] Share this post Link to post Share on other sites
s243a 0 Report post Posted December 14, 2004 Speaking of Perl Programing. This guy has a few examples.http://www.scriptarchive.com/I noticed the get call puts functionname.cgi?(input arguments) in the URL.But would the Perl scripts have a .pl after the file name. Is functionname.cgi, some other file that interprets the perl script? How do you create it?Maybe this will give me the answers I want.http://www.cgi101.com/book/ Share this post Link to post Share on other sites
cuber9 0 Report post Posted December 21, 2004 do you want your website translate to hebrew language>? that's in israel.. Share this post Link to post Share on other sites
eiteljoh 0 Report post Posted April 5, 2005 i'll make a tip for you, since i just went through some learning as well.#!c:\perl\bin\perl -wuse CGI qw/:standard/;this will also help with the Xisto website when you get going.1) you'll need to change the 1st line of your perl to: #!/usr/bin/perl -w2) make sure you keep using the CGI init the way you are... i spent about 3 hours trying to fix what was happening, and got really confused about it ... but i had use CGI qw(:standard) ; #-- BAD!!!i have no idea why, but it works fine on my computer. Share this post Link to post Share on other sites