Firestarter 0 Report post Posted June 26, 2007 Hello semua putranians,Aku dah belajar cara coding perl ni. Jadi aku nak combine dalam html. Camner yeK? Ni coding aku..print "This is Perl FOR loop.\n"; print "-----------------------\n\n"; print "Count from 100 to 1 then stop.\n "; print "----------------------------\n"; for ($count = 100; $count >= 1; $count--) { print "$count ";} print "\n"; print "\nCount from 1 to 100 then stop.\n "; print "----------------------------\n"; for ($count = 1; $count <= 100; $count++) {print "$count ";} print "\n"; Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted June 26, 2007 tambah code ni kat atas kut ,#!/usr/bin/perl -wT print "Content-type: text/html\n\n"; Quote Share this post Link to post Share on other sites
Firestarter 0 Report post Posted June 27, 2007 Pastu add cam biasa ke coding <html> tu. Letak kat bawah ke? Aku ni noob. Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted June 27, 2007 print "<html><head><title>Hello World</title></head>\n";ko baca buku ni jer la ek, http://www.cgi101.com/book/ Quote Share this post Link to post Share on other sites
Firestarter 0 Report post Posted June 27, 2007 Aku dah add camni:#!/usr/bin/perl -wT print "Content-type: text/html\n\n"; print "<html><head><title>Hello World</tile></head>\n"; print "<body>\n"; print "This is Perl FOR loop.\n"; print "-----------------------\n\n"; print "Count from 100 to 1 then stop.\n "; print "----------------------------\n"; Â Â Â Â Â Â Â Â for ($count = 100; $count >= 1; $count--) { print "$count ";} print "\n"; print "\nCount from 1 to 100 then stop.\n "; print "----------------------------\n"; Â Â Â Â Â Â Â Â for ($count = 1; $count <= 100; $count++) {print "$count ";} print "\n"; print "</body></html>\n";Tapi tak jadi la.. Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted June 27, 2007 try ekjas -wT jadi #!/usr/bin/perl#!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html><head><title>Hello World</tile></head>\n"; print "<body>\n"; print "This is Perl FOR loop.\n"; print "<br />"; print "-----------------------\n\n"; print "<br />"; print "Count from 100 to 1 then stop.\n "; print "<br />"; print "----------------------------\n"; Â Â Â Â Â Â Â Â for ($count = 100; $count >= 1; $count--) { print "$count ";} print "\n"; print "<br />"; print "\nCount from 1 to 100 then stop.\n "; print "<br />"; print "----------------------------\n"; Â Â Â Â Â Â Â Â for ($count = 1; $count <= 100; $count++) {print "$count ";} print "<br />"; print "\n"; print "</body></html>\n"; Quote Share this post Link to post Share on other sites
Firestarter 0 Report post Posted June 29, 2007 Dah ok..Junior aku lupe nak add module perl dalam httpd.conf.. Penat aku godek.. Nak marah kan..budak baru kuar U..Tak tau ape2..Harap degree je .. Quote Share this post Link to post Share on other sites
mnajem 0 Report post Posted June 30, 2007 Perl ada ajar kat universiti ke? biasanya belajar sendiri aja.. btw ko nak buat projek apa ni.. jarang lak aku nengok skang orang buat perl+cgi . kalo guna untuk UNIX shell tu biasa gak.. apart from SH Quote Share this post Link to post Share on other sites
mchammer 0 Report post Posted July 10, 2007 Perl ada ajar kat universiti ke? biasanya belajar sendiri aja.. btw ko nak buat projek apa ni.. jarang lak aku nengok skang orang buat perl+cgi . kalo guna untuk UNIX shell tu biasa gak.. apart from SHmnajem, SH tu apa? Quote Share this post Link to post Share on other sites
encik pot pet 0 Report post Posted July 10, 2007 sh ialah Bourne shell, bash ialah Bourne-again shell. Quote Share this post Link to post Share on other sites
Firestarter 0 Report post Posted July 11, 2007 (edited) Ni aa..Aku dah letak pe yang perlu. Aku install LAMPP(Linux,Apache,Mysql,PHP,Perl) tapi web aku tak kuar la..Dah banyak kali aku restart..Aku nak run dalam cgi..#!/usr/bin/perl -wT print "Content-type: text/html\n\n"; print "Hello World.\n";Ni aku punya config file.. http://pastebin.com/m6d5b124e Edited July 11, 2007 by Firestarter Quote Share this post Link to post Share on other sites
mohdfadly 24 Report post Posted July 11, 2007 Buang option -wT Quote Share this post Link to post Share on other sites