Path: news.cs.au.dk!not-for-mail From: "Sascha Kimmel" Newsgroups: comp.lang.beta Subject: RE: CGI in BETA Date: 21 Jun 2000 08:31:00 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 45 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <20000621083100.10766.qmail@noatun.mjolner.dk> Reply-To: "Sascha Kimmel" NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 961576928 349649 255.255.255.255 (21 Jun 2000 08:42:08 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 21 Jun 2000 08:42:08 GMT Xref: news.cs.au.dk comp.lang.beta:12475 > -----Original Message----- > From: Peter von der Ahé [mailto:nospam2159@cs.au.dk] > Sent: Monday, June 19, 2000 7:19 PM > To: usergroup@mjolner.dk > Subject: Re: CGI in BETA > > > >>>>> "SK" == Sascha Kimmel writes: > > SK> -------------X<------------------------------------------------- > SK> ($sec,$min,$hour,$mday,$mon,$year,$wkday,$yday,$isdst) = > SK> localtime(time); $mon++; $year=$year+1900; print < SK> here from $ENV{'HTTP_REFERER'}, your IP-address is > SK> $ENV{'REMOTE_ADDR'}, your hostname ist $ENV{'REMOTE_HOST'}, your > SK> browser is $ENV{'HTTP_USER_AGENT'} and currently it's $hour > SK> o´clock, $min minutes and $sec seconds on $mday.$mon.$year! EOF > SK> -------------X<------------------------------------------------- > > SK> What if you have many many values? Not easy in BETA, isn't it? :) > > I think you miss the point. No one argues that perl is better at > handling text and regular expression than BETA. But BETA can be used > for CGI programming - all you need for this is an executable which can > read environment variables and knows how to print mime headers. > > As for the speed of the above, please note that this would be faster: > > print "You came here from ", > $ENV{'HTTP_REFERER'}, > " your IP-address is ", > $ENV{'REMOTE_ADDR'}, > ", your hostname is ", ...; > > So it might be more convenient but does not lead to more efficient > programs especially for many, many values... Yes, but what if you CHANGE some things in your HTML code? Always split this up into several lines again and again? As I mentioned in my other posting I think that it should be easy to understand and see what a script does, instead of using a strict syntax which would be faster, but would take you some time to understand. Regards, Sascha Kimmel