[12459] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 6059 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jun 19 19:07:33 1999

Date: Sat, 19 Jun 99 16:00:25 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 19 Jun 1999     Volume: 8 Number: 6059

Today's topics:
        (no subject) <hey@freenet.co.uk>
    Re: a thread on threads (Kai Henningsen)
    Re: Afraid to ask about Y2K! (Abigail)
    Re: Afraid to ask about Y2K! (Abigail)
    Re: Afraid to ask about Y2K! (Kai Henningsen)
    Re: Afraid to ask about Y2K! (Kai Henningsen)
    Re: Can Perl executables be compiled? (Cameron Laird)
    Re: configuring pop3 host for net::pop3 <gellyfish@gellyfish.com>
        Connecting via socket using SSL and PERL gsgwebs@my-deja.com
    Re: File Processing (Kai Henningsen)
    Re: FREE Mp3 Site... here you can even upload your song <cassell@mail.cor.epa.gov>
        HELP! update problem using DBD::XBase on win32 jbell@263.net
    Re: HELP! update problem using DBD::XBase on win32 <gellyfish@gellyfish.com>
    Re: Is it better perl than awk ? (Kai Henningsen)
    Re: Is it better perl than awk ? (Kai Henningsen)
    Re: Is it better perl than awk ? (Kai Henningsen)
    Re: Language choice for high-volume Oracle CGI interfac <firstsql@ix.netcom.com>
    Re: Language choice for high-volume Oracle CGI interfac <klaus@m-machine.com>
    Re: Multi-screen Perl Script <cassell@mail.cor.epa.gov>
    Re: Newbie need help <cassell@mail.cor.epa.gov>
    Re: Newbie need help (Abigail)
    Re: Ooops, my bad (Kai Henningsen)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 19 Jun 1999 22:20:14 +0000
From: hey <hey@freenet.co.uk>
Subject: (no subject)
Message-Id: <376C179E.F2B79A5C@freenet.co.uk>





------------------------------

Date: 19 Jun 1999 18:32:00 +0200
From: kaih=7JA-c9Lmw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: a thread on threads
Message-Id: <7JA-c9Lmw-B@khms.westfalen.de>

gbartels@xli.com (Greg Bartels)  wrote on 15.06.99 in <37665807.ED751BBB@xli.com>:

> I dont need the two subs to run in parrallel,
> I actually do _not_ want them to do that.

Sounds to me like what's really needed here are coroutines, not threads.  
Has anyone ever done coroutines for Perl?

For people not familiar with the term:

Coroutines are sort-of like cooperative multitasking for threads, except  
as a consequence they are quite a lot cheaper to implement - you don't  
really need to have locking of any sort, you just don't schedule another  
coroutine while inside a critical region.

You might say a coroutine is an extremely light-weight thread.

Essentially, a coroutine is an execution context (registers and stack).  
You can typically implement coroutines in C with only setjmp()/longjmp()  
if you know how to set up a jmp_buf with a new stack from scratch. Going  
from one coroutine to another just means doing a longjmp() to save the  
current coroutine, and doing a setjmp() to resume the new one.

And coroutines are ideal for situations where you have several interleaved  
algorithms running more-or-less independently, but don't really need  
threads.

Modula-2 had coroutines, so any M2 book will usually explain how they  
work.

Hmm, thinking about this ... how much setup would a Perl coroutine  
actually need? Sounds like it should be doable from an xs.

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


------------------------------

Date: 19 Jun 1999 11:22:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <slrn7mngt5.lri.abigail@alexandra.delanet.com>

m.a.a.m. (Orlofsky@ix.netcom.com) wrote on MMCXVIII September MCMXCIII in
<URL:news:376b4803.11350654@nntp.ix.netcom.com>:
`` 
`` What bothers me is the last sentence. Am I missing something here? If
`` only the divide by 4 test and the divide by 100 test are performed,
`` then the year 2000 WILL be "determined as being a leap year." 
`` 
`` The divide by 400 test would succeed for the year 2000 anyway. It's
`` important for determining leap-ness for 1800, 1900, 2100, 2200, etc.

Uhm, the 100 year rules says that years divisible by 100 are *NOT*
leap years. Hence, 1800, 1900, 2100, 2200, etc are *NOT* leap years.

2000 is an exception on the 100 year rule. Determined by the 400 year 
rule.



Note that the June issue of CAMC got the rules that determine whether
a year is a leap year or not *WRONG*. Beside the 4, 100, and 400 year
rules, they also thought the 4000 year exists.



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 19 Jun 1999 11:23:41 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <slrn7mnh09.lri.abigail@alexandra.delanet.com>

Bart Lateur (bart.lateur@skynet.be) wrote on MMCXVIII September MCMXCIII
in <URL:news:376b52d8.230300@news.skynet.be>:
&& Abigail wrote:
&& 
&& >What's the fear for a module?
&& 
&& Separate searching for the file. Separate reading of the file. Separate
&& compilation. All waste *some* time.
&& 
&& I find the "fear of a module" even slightly more sensible, than the fear
&& of eval (once). Of course, it's difficult to becnhmark, as you can't
&& "use" a module over and over again, in order to get a reliable
&& benchmark. At the least, disk caching would kick in.


Since, as you said, it's very difficult to benchmark, don't you think
the extra time is neglictable? 

If such extra time matters to you, you shouldn't be programming in Perl
anyway.




Abigail
-- 
sub f{sprintf'%c%s',$_[0],$_[1]}print f(74,f(117,f(115,f(116,f(32,f(97,
f(110,f(111,f(116,f(104,f(0x65,f(114,f(32,f(80,f(101,f(114,f(0x6c,f(32,
f(0x48,f(97,f(99,f(107,f(101,f(114,f(10,q ff)))))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 19 Jun 1999 20:17:00 +0200
From: kaih=7JA-cJl1w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7JA-cJl1w-B@khms.westfalen.de>

rlb@intrinsix.ca (Lee)  wrote on 17.06.99 in <B38E9489966838AC02@204.112.166.88>:

> In article <3769028f@cs.colorado.edu>,
> Tom Christiansen <tchrist@mox.perl.com> wrote:
>
> >In comp.lang.perl.misc,
> >    lr@hpl.hp.com (Larry Rosler) writes:
>
> [re: my claim that POSIX declares that leap seconds are ignored]
>
> >:I believe that this is a correct statement.  But when asked to, I was
> >:unable to come up with an authoritative reference for it.  Please post
> >:your reference.
> >
> >    ``It is inappropriate to require that a time represented as seconds
> >     since the Epoch precisely represent the number of seconds between
> >     the referenced time and the Epoch''
> >		    --IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2
>
> Is "inappropriate" committee-ese for an injunction against something?
>
> My own search of library and internet turned up many mentions, but nothing
> even vaguely authoritative. I was beginning to suspect that I had done my
> small part in perpetuating an "alligator in the POSIX sewers" myth.

I don't know who stole my copy of POSIX.1, but I do remember that it said  
that time_t is reckoned in calendar seconds since epoch, not in real-time  
seconds since epoch (though that's not the words they used). In fact, IIRC  
the definition had a Y2.1K bug in that it defined ignoring the 100- and  
400-year rules for some unexplained (and no doubt extremely silly) reason.

The current Austin Group draft (http://www.opengroup.org/austin/) says (in  
xbd):

478 2.95 Epoch
479 The time zero hours, zero minutes, zero seconds, on January 1, 1970 Coordinated Universal
480 Time. See Section 2.258 on page 48.

1174 2.258 Seconds Since the Epoch
1175 A value to be interpreted as the number of seconds between a specified time and the epoch. A
1176 Coordinated Universal Time name (specified in terms of seconds (tm_sec), minutes (tm_min),
1177 hours (tm_hour), days since January 1 of the year (tm_yday), and calendar year minus 1900
1178 (tm_year)) is related to a time represented as seconds since the Epoch, according to the
1179 expression below.
1180 If the year is <1970 or the value is negative, the relationship is undefined. If the year is |1970 and
1181 the value is non-negative, the value is related to a Coordinated Universal Time name according
1182 to the expression:
1183 tm_sec + tm_min*60 + tm_hour*3600 + tm_yday*86400 +
1184 ( tm_year-70)*31536000 + (( tm_year-69)/4)*86400

I believe that's nearly exactly what POSIX.1 said.


Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


------------------------------

Date: 19 Jun 1999 20:24:00 +0200
From: kaih=7JA-cYKHw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <7JA-cYKHw-B@khms.westfalen.de>

abigail@delanet.com (Abigail)  wrote on 17.06.99 in <slrn7mh4e2.ejb.abigail@alexandra.delanet.com>:

> POSIX can declare whatever they want. The truth is, leap seconds do happen.
> Your system clock might never show '23:59:60', any data that has timestamps
> on it *may* have 23:59:60 as a timestamp. Specially if it's coming from a
> field like astronomy, or some place else, where they do think keeping time
> is important.

There's realtime time, and there's calendar time. POSIX uses calendar  
time. Astronomy uses realtime time. Both do what they do for very good  
reasons.

> Does POSIX compliance mean that your system clock has to be 22 seconds off?

Nope. It does mean, however, that for leap seconds, time_t to struct tm  
conversion is not quite deterministic.

With calendar time, you know that every GMT day is exactly 86400 seconds.  
For *most* (not all) purposes, this is vastly preferrable to having to  
know about leap seconds.

Most non-POSIX clocks in this world don't know about leap seconds, either,  
you know.

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


------------------------------

Date: 19 Jun 1999 15:15:54 -0500
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Re: Can Perl executables be compiled?
Message-Id: <7kgtpq$gov$1@Starbase.NeoSoft.COM>

In article <376b8601@cs.colorado.edu>,
Tom Christiansen  <tchrist@mox.perl.com> wrote:
>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, joechan25@hotmail.com (Joe Chan) writes:
>:Hi, I was wondering if Perl scripts could be compiled into stand alone
>:executables for distribution on other PC's without Perl installed.
>:This would be Windows based PC's.
>
>Might one inquire as to which part of the standard answer to this standard
>question as included in the standard perlfaq3 manpage that ships standard
>with every perl distribution did you find particularly opaque?
>
>Best answer: include a perl installation with your program.  Other answer:
>use a code generator.
			.
			.
			.
<URL:http://
language.perl.com/newdocs/pod/perlfaq3.html#How_can_I_compile_my_Perl_progra>
is indeed as lucid and lively as your writings generally are.  I
think it's slightly anachronistic, though, in so summarily dismissing
the value of single-file-executables.  I know of big, technically
successful applications that have not been deployed simply because
of the (managerial) cost of installations.  I have abundant evidence
that people are sometimes willing to pay a bundle just for reducing
a file count by linking static executables, as bloated as we might
find them.

I agree that the most practical course now for those working with
Perl is to distribute a standard Perl installation.  I can see this
changing, though, before long ...

What do you mean by "code generator" in this context?  I truly can't
decipher whether you're jocularly recommending a different language,
an even more complicated installation, or what.
-- 

Cameron Laird           http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com      +1 281 996 8546 FAX


------------------------------

Date: 19 Jun 1999 21:25:18 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: configuring pop3 host for net::pop3
Message-Id: <7kh1ru$4ig$1@gellyfish.btinternet.com>

On Thu, 17 Jun 1999 17:46:38 GMT hojo wrote:
> I am trying to write a set of scripts that use Net::POP3.  However, i am
> not sure how to configure the pophost section in Net::Config.  Our pop
> server is kicked of via inetd.  That, and I am not sure where it is as I
> did not install it on my system (rh 5.0, perl5.00502).  Where do I
> begin?  Do I need to run pop as a background daemon, or can I get at it
> through inetd?
> 

If your POP3 server is being run by inetd then you dont have to worry about
it.  Net::POP3 requires you to specify a POP3 server in the constructor
so it doesnt need preconfiguring - I would read the Net::POP3 manpage.

My best advice would be to read the manpage for the module and try some
code and if you find that it doesnt work post back a small example of
code that doesnt work ...

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Sat, 19 Jun 1999 20:59:27 GMT
From: gsgwebs@my-deja.com
Subject: Connecting via socket using SSL and PERL
Message-Id: <7kh0bc$29t$1@nnrp1.deja.com>

I have a question using PERL for connecting to a socket and
communicating with a credit card authorization gateway (but maintaining
the SSL data integrity). I have read dozens of documents on SSLeay
(including the FAQ and Programmers reference), but I am still having
some difficulty.

Here is the scenario:

Our application is in PERL. We have a shoppingcart software that runs
on our secure server (https:secure.myserver.com). We are needing to
connect to a secure transaction gateway (https:secure.transaction-
gateway.com) via a socket to authorize the credit card information that
comes through the cart. After we connect, we send them the users cc
info, and then need to get back the comma delimited string that
contains the response code (accepted or declined).

We have no problem doing this with PERL insecurely, but we are not sure
the minimum requirements of the SSL function calls used to transfer the
encrypted data. We would normally use filehandles to communicate with
the server we are connecting to. The SSL certificates are already done
-- I just need the minimum SSL calls to transfer and receive the data
to and from the two servers.

Here is our routine (but what are we missing??) :

$remote_host = "www.authorize.net";
$remote_port = "443"; # SSL Port

use Socket;
socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp'));

# build the remote address
internet_addr = inet_aton($remote_host) ||
die "Couldn't convert $remote_host into an Internet address: $!\n";

$paddr = sockaddr_in($remote_port, $internet_addr);
connect(SERVER, $paddr) || die "Couldn't connect to $remote_host:
$remote_port : $!\n";

# create an SSL structure ???(are we suppose to pass in
# arguments or our filehandle or can con be our filehandle?)???
con=(SSL *)SSL_new();

# give it a file descriptor to use ???(can we use our filehandle-
SERVER?)???
SSL_set_fd(con,s);

# connect
SSL_connect(con);

$data_w_headers = qq~
POST /scripts/authrequest.asp HTTP/1.1
Host: www.authorize.net:443
Content-type: application/x-www-form-urlencoded
Content-length:1024

home=Cosby&favorite+flavor=flies
~;

# send data
SSL_write(con,$data,$content_length);

# receive data
SSL_read(con,buf,??unkown??);

# close(socket)
SSL_shutdown(con)

__EOF__

Thanks for your help using PERL for connecting/sending/receiving data
through a secure socket. I would be happy to give you my kids in
compensation for your help :)

Are there any good resources that describe the SSLeay function calls in
more detail -- describing the arguments or variables associated with
each function(besides the ones at openssl.org, or through the FAQ and
programmers reference -- I have checked all of the links through those).

Greg Graf
System Admin
GSG WEBS/GSG Net


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: 19 Jun 1999 20:55:00 +0200
From: kaih=7JA-dWm1w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: File Processing
Message-Id: <7JA-dWm1w-B@khms.westfalen.de>

abigail@delanet.com (Abigail)  wrote on 16.06.99 in <slrn7mfcle.do2.abigail@alexandra.delanet.com>:

> Wyzelli (wyzelli@yahoo.com) wrote on MMCXV September MCMXCIII in
> <URL:news:ymH93.12$E4.15259@vic.nntp.telstra.net>:
> &&
> && It's amazing what I can learn just by following some of these threads...
>
>
> But it's even more amazing that this thread doesn't answer the question
> originally asked.

Well, the first (one article, Bart) subthread I see does. (For me, this is  
the second (very long, started by Jonathan) subthread. And your  
explanation is the last (one article) subthread.)

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


------------------------------

Date: Sat, 19 Jun 1999 13:47:17 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: FREE Mp3 Site... here you can even upload your songs
Message-Id: <376C01D5.FDFAC2E1@mail.cor.epa.gov>

Dave Cross wrote:
> 
> On Saturday, 19 Jun 1999 05:21:14 -0600, nobody@nowhere33.yet wrote:
> 
> >www.mediterranei.it/mp3
> 
> Did you have a Perl question?

I think he just confused this newsgroup with 
cramp.lung.pearl.jam

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Sat, 19 Jun 1999 20:06:53 GMT
From: jbell@263.net
Subject: HELP! update problem using DBD::XBase on win32
Message-Id: <7kgt8o$1es$1@nnrp1.deja.com>

Hi, anyone can please help.

I'm trying to doing some update on a .dbf table.  my script looks
like this,

use DBI;
	my $sql = "update my_table set city = 'BELLEVILL', set carn
= '2' where useruid = '929817326'";

	my $dbh = DBI->connect("DBI:XBase:\Root\My_dir}") or die
$DBI::errstr;
	my $sth = $dbh->prepare($sql) or $dbh->errstr();
	my $rv = $sth->execute() or die $sth->errstr();
        # blah.....

It returns an error says "can't execute undefined value".
and in diagnostics, it says prepare failed

If I left only one of the set pairs in there, it just worked!
It's seems DBI doesn't allow more than one pair or something else.

I read the DBD::XBase perldoc and didn't see anything wrong with $sql.

What seems to be the problem?

Thanks.

----
Regards,
JB



Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


------------------------------

Date: 19 Jun 1999 23:05:02 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: HELP! update problem using DBD::XBase on win32
Message-Id: <7kh7mu$4ts$1@gellyfish.btinternet.com>

On Sat, 19 Jun 1999 20:06:53 GMT jbell@263.net wrote:
> Hi, anyone can please help.
> 
> I'm trying to doing some update on a .dbf table.  my script looks
> like this,
> 
> use DBI;
> 	my $sql = "update my_table set city = 'BELLEVILL', set carn
> = '2' where useruid = '929817326'";
> 
> 	my $dbh = DBI->connect("DBI:XBase:\Root\My_dir}") or die
> $DBI::errstr;

You either need to use single quotes in that connect string or do something
about the slashes.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: 19 Jun 1999 21:13:00 +0200
From: kaih=7JA-dtyHw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Is it better perl than awk ?
Message-Id: <7JA-dtyHw-B@khms.westfalen.de>

kasal@matsrv.math.cas.cz (Stepan Kasal)  wrote on 16.06.99 in <slrn7mfc8r.8ii.kasal@matsrv.math.cas.cz>:

> -- in history it was PL/1 (I think), combining all the best features of all
> it's predecessors, and endig up as unusable vehicle.

PL/I certainly is big. And it does a number of things I don't like. But  
calling it unusable is utterly ridiculous.

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


------------------------------

Date: 19 Jun 1999 21:20:00 +0200
From: kaih=7JA-eLymw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Is it better perl than awk ?
Message-Id: <7JA-eLymw-B@khms.westfalen.de>

uri@sysarch.com (Uri Guttman)  wrote on 16.06.99 in <x7n1xzcx4d.fsf@home.sysarch.com>:

> >>>>> "KM" == Kenny McCormack <gazelle@yin.interaccess.com> writes:

KM>> But don't forget what PERL, the acronym, stands for.
KM>> I'd be just as happy if Perl were never discussed in the AWK newsgroup,
KM>> but the fact of the matter is that it is frequently used to solve the
KM>> same sorts of problems as is AWK, so the comparisons are inevitable.

> not really. try writing in awk a client or server or cgi or direct
> database access or you get what i mean. the power of the base language
> is great and when you add cpan it becomes a world dominator. it just
> does the job.

If the wheels are missing, the car won't run. But if the car won't run,  
that doesn't necessarily imply that the wheels are missing.

Perl is used to do all the stuff awk does, but that doesn't mean awk is  
used to do all the stuff perl does.

As for database access, I seem to recall hearing about an SQL engine  
written in awk+sh. Yes, I do think that's pretty perverted.

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


------------------------------

Date: 19 Jun 1999 21:31:00 +0200
From: kaih=7JA-fTkHw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Is it better perl than awk ?
Message-Id: <7JA-fTkHw-B@khms.westfalen.de>

demas@sunspot.tiac.net ((Charles Demas))  wrote on 16.06.99 in <7k6sf3$8v4@news-central.tiac.net>:

> In simpler words, you'll get more done more quickly learning awk
> first.  Perl is more powerful and cryptic, and much harder to
> learn because there's so much more to it (I'm trying to learn it).

There may be more to Perl, but that doesn't necessarily make awk easy to  
learn.

Personally, I find doing anything non-trivial in awk A LOT harder than  
doing it in Perl, and will usually not even try. Awk is nice for saying    
df | awk '{ print $3; }' (but then, awk is sort of overkill for that,  
except there doesn't seem to be a tool that does only this - cut doesn't  
seem to offer a reasonable way to do this), maybe even if I want to add  
that column up, but anything more is a reason to fire up Perl.

Awk just doesn't seem to match the way I think about problems.

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


------------------------------

Date: Sat, 19 Jun 1999 13:04:34 -0700
From: Lee Fesperman <firstsql@ix.netcom.com>
Subject: Re: Language choice for high-volume Oracle CGI interface?
Message-Id: <376BF7D2.687A@ix.netcom.com>

Greg McCann wrote:
> We're doing a proposal for a system doing high-volume financial transactions on
> the internet.  We're expecting 10,000 transactions per day at the beginning, up
> to 1,000,000 transactions per day eventually.  The client has specified an
> Oracle database with an NT web server, using SSL for secure communications both
> between the browser client and our server and between remote servers and our
> main server.
> 
> We're debating what language to use for the CGI programming.  C++, Java, Perl,
> ...?  I have some experience using Perl for database access, but not with Oracle
> or on a system as large as this.  Do you have any thoughts on the relative
> merits of these languages for this application?  If possible, we would like to
> follow a path which wouldn't lock us in to a Microsoft platform.

Add to your list of portable CGI languages - Jive (http://www.firstsql.com/jive/), the 
only one on the list specifically for CGI programming with database.

--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)


------------------------------

Date: Sat, 19 Jun 1999 20:51:55 GMT
From: Klaus Sonnenleiter <klaus@m-machine.com>
Subject: Re: Language choice for high-volume Oracle CGI interface?
Message-Id: <376C0239.35F62B46@m-machine.com>

Greg,

I believe somebody else already mentioned the Oracle App Server. You might also want
to take a look at third party application servers. You might also want to take a
look at third party application servers. We are using a products called "Tango" made
by Pervasive. It basically encapsulates your SQL queries in an easy to maintain
container for the application logic and it lets you add your own Java or C++ code
pieces for time critical operations. It also uses OCI instead of ODBC and is
scalable across multiple platforms should you ever grow out of NT.

Check out http://www.pervasive.com/products/tango for more details.

Klaus Sonnenleiter
The Media Machine, LLC
http://www.webdlms.com

Greg McCann wrote:

> We're doing a proposal for a system doing high-volume financial transactions on
> the internet.  We're expecting 10,000 transactions per day at the beginning, up
> to 1,000,000 transactions per day eventually.  The client has specified an
> Oracle database with an NT web server, using SSL for secure communications both
> between the browser client and our server and between remote servers and our
> main server.
>
> We're debating what language to use for the CGI programming.  C++, Java, Perl,
> ...?  I have some experience using Perl for database access, but not with Oracle
> or on a system as large as this.  Do you have any thoughts on the relative
> merits of these languages for this application?  If possible, we would like to
> follow a path which wouldn't lock us in to a Microsoft platform.
>
> Thanks,
>
> Greg



------------------------------

Date: Sat, 19 Jun 1999 13:23:03 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Multi-screen Perl Script
Message-Id: <376BFC27.7F291CEF@mail.cor.epa.gov>

John wrote:
> 
> Hi,
> 
> I know this is a bit off topic, but the PERL/CGI newsgroups were mostly in
> other languages that I could'nt understand (not English). Anyway, I am

Your question seems extremely on-topic to me.  You have a question
about writing code in Perl, and you even present code with 
questions about said code.  Bravo!

That said, you may be pleased to know that there is
comp.infosystems.www.authoring.cgi
which handles a lot of CGI questions, some involving Perl
scripts for CGI.  That group may be helpful for some future
question you might have.

> writing a multi-screen CGI script. I know the standard if-elsif-else
> structure method, but I am passing the name of functions in a hidden form
> field (name = action, value = name of subfunction to activate without the
> '&'). Is there a more efficient way then the if-else structures? I also know
> the method like the following:
> 
> %subroutines =
> (
>  'add_user'   => \&add_user(),
>  'add_user_screen' => \&add_user_screen(),
>  ............
> );
> 
> if(%subroutines{"$INPUT{'action'}"})

I think you want to use defined() in your if clause.

> [snip]
> but wondered if I could avoid making the hash at all in a similar method
> (because of the fact you just have to add a '&' in front of the value of the
> $INPUT{'action'} variable in order to get the correct function call).

This looks clean to me.  And safe.  Safety always matters,
especially in a fragile environment.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: Sat, 19 Jun 1999 13:31:52 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: nightcom <farell@startrekmail.com>
Subject: Re: Newbie need help
Message-Id: <376BFE38.59DE403E@mail.cor.epa.gov>

[courtesy cc sent to poster]

nightcom wrote:
> 
> Hi,
> can somebody help me?
> How do I configure Personal Web Server
> to run cgi scripts?
> I'm running win98 and recently downloaded
> ActivePerl Build 517, though I have no idea how  to run
> the demo cgi(s) included.
> I tried creating a virtual dir. and selected all three permission for
> this dir. but I still can't run any cgi(s).
> Even tried searching on activeperl's website but not much info
> there about PWS.

That's probably because ActiveState puts that information on
your hard disk when you install AS Perl.  When you installed
it, the install program asked you where in your Start Menu
you wanted a shortcut to the on-line docs.  Go there.  Open
your Start Menu, navigate to the on-line perl documentation
button, click on it, and you'll get the complete set of docs,
in HTML, opened with your favorite browser.

Start at the top of the left-hand frame.  Then read through
the "ActivePerl Components" to see how to run PerlScript 
programs.  Then read through the "ActivePerl FAQ" section.
In there you'll find a subsection on webserver config which
should help you get PWS working.

And keep reading the docs.  There are hundreds of pages of
great info on Perl just waiting for you.  But if the info
seems to be over your head, then you may want to first head
to one of the web tutorials.  I recommend:
http://www.netcat.co.uk/rob/perl/win32perltut.html
which is well worth going all the way through.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


------------------------------

Date: 19 Jun 1999 11:34:59 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Newbie need help
Message-Id: <slrn7mnhlf.lri.abigail@alexandra.delanet.com>

nightcom (farell@startrekmail.com) wrote on MMCXVIII September MCMXCIII
in <URL:news:pRFa3.94$Oi2.20577@news2.randori.com>:
// Hi,
// can somebody help me?

It would help if you use a suitable Subject line.

// How do I configure Personal Web Server
// to run cgi scripts?

You read the manual of Personal Web Server. Or you call tech support.

// I'm running win98 and recently downloaded
// ActivePerl Build 517, though I have no idea how  to run
// the demo cgi(s) included.
// I tried creating a virtual dir. and selected all three permission for
// this dir. but I still can't run any cgi(s).
// Even tried searching on activeperl's website but not much info
// there about PWS.


That might be because Perl and webservers are 2 different things.



Please come back if you have specific Perl questions. 
Do not bother to ask again about web servers. That's what web server
groups are for.



Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: 19 Jun 1999 17:38:00 +0200
From: kaih=7JA-bX1mw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Ooops, my bad
Message-Id: <7JA-bX1mw-B@khms.westfalen.de>

tchrist@mox.perl.com (Tom Christiansen)  wrote on 13.06.99 in <376459e8@cs.colorado.edu>:

>      [courtesy cc of this posting mailed to cited author]
>
> In comp.lang.perl.misc,
>     Russ Allbery <rra@stanford.edu> writes:
> :I'm not aware of any Unix that places any (practically encounterable)
> :limits on the size of a directory, apart from the performance degredation
> :on file accesses through the directory that starts setting in at around
> :10,000 files.
>
> No, Linux kicks in before then.   BSD seems to stand up to it fine,
> however.

Linus is much better with this in the 2.2 series thanks to the dcache  
(though still not like systems like OS/2 or MacOS that use btrees for  
directories - I think that's one planned enhancement).

Though that's nothing compared to MS-DOS. Back when I had an 286/10, I  
measured MS-DOS directory throughput at 32 kB per second. That's just  
ridiculous. (A long create() loop, where per 1000 files in the directory  
it took a second per new file, and a file entry is 32 bytes under MS-DOS.  
Hmm. Maybe I should test that with Perl/linux 2.2 ... oops, ran out of  
inodes before it slowed down enough to be reasonable to time. That's on a  
486/100.)

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


------------------------------

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 6059
**************************************

home help back first fref pref prev next nref lref last post