[7497] in Perl-Users-Digest
Perl-Users Digest, Issue: 1123 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 3 20:07:24 1997
Date: Fri, 3 Oct 97 17:00:20 -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 Fri, 3 Oct 1997 Volume: 8 Number: 1123
Today's topics:
E-card script error <mgranath@algonet.se>
foreach my $elem (@elements) - doesn't work! <jwillia@medicode.com>
Re: foreach my $elem (@elements) - doesn't work! (Matthew Cravit)
Re: How to telnet from perl using cron? (Mark Newman)
IPC question on listen() Gerben_Wierda@RnA.nl
Re: IPC question on listen() (Matthew Cravit)
Re: New Perl syntax idea (Gurusamy Sarathy)
Re: PERL and serial port <jeep@rahul.net>
Problems with CGI::* Module example <irogers@biggun.com>
Re: PROOF: VB FASTER THAN PERL, C, C++ (Brian Wheeler)
Re: PROOF: VB FASTER THAN PERL, C, C++ <xrcc0494@dcaca037.ca.boeing.com>
Re: STDERR capture <westxga@ptsc.slg.eds.com>
Re: Test for alphabetic character? <westxga@ptsc.slg.eds.com>
Re: Using Perl Format <IggieBee@worldnet.att.net>
Win32::OLE, SQL Server Question <mwilso@sapient.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 3 Oct 1997 22:50:24 GMT
From: "Mikael Granath" <mgranath@algonet.se>
Subject: E-card script error
Message-Id: <01bcd04f$1d453580$799364c3@komjotr>
I have a problem....
I'm trying to run a e-card script but when I'm pressing the submit-button
(Skicka kortet) I'm having "Server error". Can anyone tell me why??? The
page is http://www.algonet.se/~mgranath/postcard.html I'm also attach the
pl file
*************************************
Titta in i bageriet och baka en kaka!
http://www.algonet.se/~mgranath
*************************************
begin 600 postcard.pl
M(R$O=7-R+VQO8V%L+V)I;B]P97)L(" -"B,C(R,C(R,C(R,C(R,C(R,C(R,C
M(R,C(R,C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=S(&ET(2 @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(PT*(R @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" C#0HC
M+2!%;F0@57-E<B!#;VYF:6<@+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2,-"@T*#0HC+2!-86EN
M(%!R;V=R86T@+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2,-"B,@=6YC;VUE;G0@9F]L;&]W
M:6YG(&1I<W!L87D@97)R;W)S('1O('1H92!B<F]W<V5R(&9O<B!D96)U9V=I
M;F<@:&5L< T*(R @($)%1TE.('L-"B,@(" @('5S92!#1TDZ.D-A<G @<7<H
M8V%R<&]U="D[#0HC(" @("!C87)P;W5T*%-41$]55"D[#0HC(" @?0T*#0IU
M<V4@0T=).PT*(R!4:&ES('=I;&P@<'5T(&UO<F4@=7-E9G5L(&EN9F]R;6%T
M:6]N(&EN('EO=7(@97)R;W)?;&]G#0IU<V4@0T=).CI#87)P.R -"@T*;7D@
M)&-R96%T95]T:6UE(#T@=&EM92@I.PT*#0HD1D]232 ](&YE=R!#1TD[#0H-
M"FEF("@D1D]232T^<&%R86TH)V-O9&4G*2D@>PT*"7!R:6YT("1&3U)-+3YH
M96%D97([#0H)*"9S96QE8W1#87)D*"1&3U)-+3YP87)A;2@G8V]D92<I*2 F
M)B F9&ES<&QA>4-A<F0I('Q\("9C;VYS;VQE.PT*"7!R:6YT("(\<#X\82!H
M<F5F/21"05-%7U)%1CY396YD('EO=7(@;W=N('!O<W1C87)D('1O('-O;65O
M;F4A/"]A/CPO<#XB.PT*?2!E;'-I9B H(2 D1D]232T^<&%R86TH)W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M*"=M<V<G+"1M
M<V<I.R -"@T*"6]P96X@*$9(+" B/CXD1$%405]&24Q%(BD@?'P@9&EE(")#
M86XG="!O<&5N("1$051!7T9)3$4@9F]R('=R:71E+B D(2([#0H)(R!C;V1E
M+"!R96-I<&EE;G0L('-E;F1E<BP@:6UA9V4L(&UE<W-A9V4N( T*"7!R:6YT
M($9(("1C<F5A=&5?=&EM92P@(EPP(CL-"@EP<FEN="!&2" D1D]232T^<&%R
M86TH)W)C<'0G*2P@(EPP(CL-"@EP<FEN="!&2" D1D]232T^<&%R86TH)V9R
M;VTG*2P@(EPP(CL-"@EP<FEN="!&2" D1D]232T^<&%R86TH)VEM9R<I+" B
M7# B.PT*"7!R:6YT($9(("1&3U)-+3YP87)A;2@G;7-G)RDL(")<;B([#0H)
M8VQO<V4@1D@[#0I]#0H-"G-U8B!N;W1I9GE28W!T('L-"B @(" @(" @(R!,
M970@=&AE(')E8VEP:65N="!K;F]W('1H97D@:&%V92!A('!O<W1C87)D('=A
M:71I;F<N#0H);W!E;BA-04E,+" B?"1-04E,7U!23T<B*2!\?"!D:64@(D-A
M;B=T(&]P96X@)$U!24Q?4%)/1RX@)"$B.PT*"7!R:6YT($U!24P@(D9R;VTZ
M("(L("1-04E,7T923TTL(")<;B([#0H)<')I;G0@34%)3" B5&\Z("(L("1&
M3U)-+3YP87)A;2@G<F-P="<I+" B7&XB.PT*"7!R:6YT($U!24P@(E-U8FIE
M8W0Z("1354)*14-47&Y<;B([#0H)<')I;G0@34%)3" B1W)E971I;F=S(5QN
M7&Y3;VUE;VYE(&AA<R!F:6QL960@;W5T(&$@<&]S=&-A<F0@:6X@>6]U<B B
M.PT*"7!R:6YT($U!24P@(FYA;64A7&Y<;EEO=2!H879E("1#05)$7TQ)1D4@
M9&%Y<R!T;R!P:6-K(&ET('5P(&9R;VTZ7&XB.PT*"7!R:6YT($U!24P@(B D
M4$E#2U507U523#]C;V1E/21C<F5A=&5?=&EM92(@+B D1D]232T^<&%R86TH
M)W)C<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H))FQO8VM&:6QE*$Y%5RD[#0H-"@EM>2 D
M9V]O9%]A<U]D96%D(#T@:F]I;B@G?"<L0&1E871H7W)O=RD[#0H);7D@)'-O
M=6P[#0H)=VAI;&4@*"1S;W5L(#T@/$],1#XI('L-"@D)<')I;G0@3D57("1S
M;W5L('5N;&5S<R H)'-O=6P@/7X@+UXD9V]O9%]A<U]D96%D+V\I.PT*"7T-
M"@T*"6-L;W-E($],1#L-"@EC;&]S92!.15<[#0H))G5N;&]C:T9I;&4H3D57
M*3L-"@ER96YA;64H(B1$051!7T9)3$4N=&UP(BPB)$1!5$%?1DE,12(I('Q\
M( T*"0ED:64@(D-A;B=T(')E;F%M92 D1$%405]&24Q%+G1M<"!T;R D1$%4
M05]&24Q%+B D(2([#0H))G5N;&]C:T9I;&4H3TQ$*3L-"GT-"@T*<W5B(&QO
M8VM&:6QE('L-"@EL;V-A;"@D1D@I(#T@0%\[#0H);&]C86PH)'1R>2D@/2 P
M.PT*"6QO8V%L*"1S=&%T=7,I(#T@,#L-"@T*"7=H:6QE("@D<W1A='5S("$]
M(# I('L-"@D))'-T871U<R ](&9L;V-K*"1&2"P@,BD[#0H)"2@D=')Y(#T]
M(#0I("8F(&QA<W0[#0H)"21S=&%T=7,@)B8@<VQE97 H,2D[#0H)"21T<GDK
M*SL-"@E]#0I]#0H-"G-U8B!U;FQO8VM&:6QE('L-"@EL;V-A;"@D1D@I(#T@
;0%\[#0H)9FQO8VLH)$9(+" X*3L-"GT-"@T*
`
end
------------------------------
Date: Fri, 03 Oct 1997 16:35:44 -0600
From: Jerry Williams <jwillia@medicode.com>
Subject: foreach my $elem (@elements) - doesn't work!
Message-Id: <3435733F.73E30D52@medicode.com>
#!/usr/bin/perl -w
use strict;
use diagnostics;
my @elements;
##my $elem;
@elements=(1,2,3,4);
foreach my $elem (@elements) {
print "$elem\n";
}
returns:
Missing $ on loop variable at ./tp line 7.
This is right out of the perlsyn manual page. It would appear that you
can't use my
to declare the variable in the foreach loop. Is this a bug? Or are the
docs wrong?
Or is this a version thing. I am running perl5.003. Or is there
something that I am missing? Thanks for any help!
------------------------------
Date: 3 Oct 1997 15:57:50 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: foreach my $elem (@elements) - doesn't work!
Message-Id: <613t9e$9p1$1@shell3.ba.best.com>
In article <3435733F.73E30D52@medicode.com>,
Jerry Williams <jwillia@medicode.com> wrote:
>foreach my $elem (@elements) {
[ Snip ]
>Missing $ on loop variable at ./tp line 7.
>[...] is this a version thing. I am running perl5.003. Or is there
This is apparently a version thing. The perldelta manpage for 5.004
(which lists the things which have changed since 5.003) has this
to say:
Also, you can declare a foreach loop control variable
as lexical by preceding it with the word "my". For
example, in:
foreach my $i (1, 2, 3) {
some_function();
}
$i is a lexical variable, and the scope of $i extends
to the end of the loop, but not beyond it.
I'm not sure how it was documented in earlier versions of perl, but
this suggests strongly that you need to upgrade to 5.004 to get this
capability.
/MC
--
Matthew Cravit, N9VWG | Experience is what allows you to
E-mail: mcravit@best.com (home) | recognize a mistake the second
mcravit@taos.com (work) | time you make it.
------------------------------
Date: Fri, 3 Oct 1997 16:54:12 -0500
From: newmanmb@cig.mot.com (Mark Newman)
Subject: Re: How to telnet from perl using cron?
Message-Id: <MPG.e9f257fd0d354ce989680@news.cig.mot.com>
In article <01bcc8f1$fd057c80$b5910a9f@aurora.cna.com>, aaron@soltec.net
says...
> How about letting us take a look at that code......
>
> Don <defike@ilstu.edu_nospam> wrote in article
> <34286124.2839678@news.alt.net>...
> > I have been struggling with setting up a cron that runs a perl script
> > which executes a telnet. The script runs the way it should via the
> > command line. When trying to run it from a cron it always fails at
> > the telnet portion. I have tried this using a shell script and Expect
> > and everything will work via command line but fails when trying to
> > cron. I tried declaring the term env but that wasn't enough.
> > Suggestions are welcomed.
> >
> > Thanks,
> > Don
> > defike@ilstu.edu
> >
>
I had a similar problem. What I found was that from the command line, my
enviroment (especially the TCL_LIBRARY env) was setup properly. However
the enviroment for the cron job was not setup properly. Without
TCL_LIBRARY being set to the path of my tcl libraries, expect will not
run.
Add a line similar to:
$ENV{"TCL_LIBRARY"}=______________ <--- location of tcl
libraries.
------------------------------
Date: Fri, 3 Oct 1997 21:15:51 GMT
From: Gerben_Wierda@RnA.nl
Subject: IPC question on listen()
Message-Id: <EHHv2F.HqI@RnA.NL>
When I write a server and I let that server listen wit a call like
listen( S, 2);
I do expect that maximum three process may connect to that server process
simultaneously, one being handled and two waiting.
But when I do that, and I try to connect to that server process with telnet,
I can get 5 processes to connect. One actively handled, 4 waiting but able to
provide input. Only the sixth telnet gets a 'connection timed out'. I do not
understand this behaviour. Is there a minimum queue on listen()?
I am running:
This is perl, version 5.003 [+ TipTop patch 2] with EMBED MULTIPLICITY
built under next at Sun Sep 08 1996 14:32:59 EDT
+ suidperl security patch
under NEXTSTEP 3.3.
--
Gerben_Wierda@RnA.nl (Gerben Wierda)
"If you don't know where you're going, any road will take you there"
Paraphrased in Alice in Wonderland, originally from the Talmud.
Renee: "Met veel koper maakt men hoempa." (After hearing Brahms'
Festouverture)
------------------------------
Date: 3 Oct 1997 15:41:31 -0700
From: mcravit@best.com (Matthew Cravit)
Subject: Re: IPC question on listen()
Message-Id: <613sar$2f6$1@shell3.ba.best.com>
In article <EHHv2F.HqI@RnA.NL>, <Gerben_Wierda@RnA.nl> wrote:
>When I write a server and I let that server listen wit a call like
>
> listen( S, 2);
>
>provide input. Only the sixth telnet gets a 'connection timed out'. I do not
>understand this behaviour. Is there a minimum queue on listen()?
Not per se, no. However, some implementations of the BSD socket library
ignore the parameter passed to listen, and just use the system default
listen queue size regardless of what you specify. This may be the problem
you're experiencing here.
/MC
--
Matthew Cravit, N9VWG | Experience is what allows you to
E-mail: mcravit@best.com (home) | recognize a mistake the second
mcravit@taos.com (work) | time you make it.
------------------------------
Date: 3 Oct 1997 22:46:18 GMT
From: gsar@engin.umich.edu (Gurusamy Sarathy)
Subject: Re: New Perl syntax idea
Message-Id: <613sjq$ct1@srvr1.engin.umich.edu>
In article <613npp$8ue@srvr1.engin.umich.edu>,
Gurusamy Sarathy <gsar@engin.umich.edu> wrote:
>Of course, 5.005 will contain enough new syntax to allow my
>longstanding plans to merge in the functionality of the Alias
>module. Automagic lexical variables inside methods that can then
>refer to the object attributes as simple variables:
>
> package Foo;
> use Fields qw(foo bar);
> sub new { bless { foo => 1, bar => ['a','b','c'] }, shift }
> sub amethod : method {
> print $foo, @bar; # lexical $foo, @bar object attributes
> }
> __END__
> 1abc
>
>,in 5.005-speak.
Of course, that hypothetical example would need something like:
package main;
Foo->new->amethod;
just before the __END__ to print what I was pretending it would
print.
- Sarathy.
gsar@umich.edu
------------------------------
Date: 3 Oct 1997 22:03:00 GMT
From: California Man <jeep@rahul.net>
Subject: Re: PERL and serial port
Message-Id: <613q2k$ge9$1@samba.rahul.net>
ALl I can say is this. I worked for a brief time at a company who
used modems and perl. They had someone com in and write a patch
using C++ commands for the com port stuff and somehow integrated
it into the perl compiler.
Check out the com port stuff in C++...but then again, this may
have already been obvious
HOpe that helps a little
--
------------------------------------------------------------------
http://www.rahul.net/jeep
------------------------------------------------------------------
------------------------------
Date: Fri, 03 Oct 1997 15:58:11 -0700
From: ian c rogers <irogers@biggun.com>
Subject: Problems with CGI::* Module example
Message-Id: <34357882.3C28836@biggun.com>
I'm trying to run the following example from
http://www-genome.wi.mit.edu/ftp/pub/software/WWW/CGIperl/docs/Request.pm.html
#!/usr/local/bin/perl # add -T to test tainted behaviour
use CGI::Base;
use CGI::Request;
GetRequest('R'); # get and import request into R::...
# Just to make life more interesting add an ISINDEX.
# Try entering: "aa bb+cc dd=ee ff&gg hh<P>ii"
print "<ISINDEX>\r\n";
print "<B>You entered:</B> ", # print results safely
join(', ', CGI::Base::html_escape(@R::KEYWORDS))."\r\n";
print FmtRequest(); # show formatted version of request
The CGI::Base::html_escape(@R::KEYWORDS) returns absolutely nothing for
me. Any idea why this might be?
ian
--
<a href="http://www.biggun.com/~irogers">ian c rogers</a>
<a href="http://www.biggun.com/">Big Gun Project, SMC</a>
------------------------------
Date: 3 Oct 1997 21:57:17 GMT
From: bdwheele@indiana.edu (Brian Wheeler)
Subject: Re: PROOF: VB FASTER THAN PERL, C, C++
Message-Id: <613pnt$rf0$3@dismay.ucs.indiana.edu>
You are quite an idiot. All you've managed to prove is that vb doing
some math function is faster than vb calling a dll function to do some trivial
math. Did you bother to "optimize" the C version? did you try to run a
test where the benchmark was done in C, instead of being called from VB? Since
we can assume you didn't, try it, and tell us the results. Also, since you
didn't tell us what kind of machine you were on, we have no way of really
telling how "good" these numbers are.
by the way, how does telling us how fast vb vs C is tell us how fast
vb is to Perl and C++. Trivial benchmarks tell *NOTHING*.
loser.
Brian Wheeler
bdwheele@Indiana.edu
In article <613e81$lu1@dfw-ixnews12.ix.netcom.com>,
SpamProofSeal@none.com (SpamProofSeal@none.com) writes:
> About the only thing C does faster than VB these days is string
> manipulation, and that will be all over with VB6. Below are
> the results. Below that is the source code incase you are
> still a disbeliever.
>
>
> My results:
>
> Inside the VB environment (interpreted VB mode):
> =================================================
> Visual C++ - 7 seconds
> Visual Basic - 49 seconds (not surprising, huh? READ ON!)
>
>
> Optimized for speed VB executable:
> =================================================
> Visual C++ - 8 seconds
> Visual Basic - 3 seconds (In your face C bigots! hehe!)
>
>
> VB Executable, not optimized for maximum speed:
> ==================================================
> Visual C++ - 8 seconds
> Visual Basic - 12 seconds (A little slower, but still good)
>
> ===========================================================================================
>
> For those who want to try this yourself, novice level knowledge of VB
> is required, and enough C
> knowledge to create a .DLL is required. All tests were done using VB
> 5.0 and VC 5.0.
>
> The test to a C function was done by calling a .DLL containing a C
> function that performed 1000
> runs through a loop. The C function call is called "TestMath".
>
> The test to the VB function was done by calling a VB function that
> mirrors the functionality of
> the C function, 1000 runs through a loop. The VB function call is
> called "VBMath".
>
>
>
> ' CODE STARTS HERE
> '==========================================================================================
> 'put this in a module
>
> Option Explicit
>
> 'here is the dll declaration.. The C code is at the bottom of this
> file
> Declare Function TestMath Lib "JunkDLL2.dll" (ByVal a As Double, b As
> Double) As Double
>
> Public Function VBMath(ByVal a As Double, ByVal b As Double)
>
> Dim i As Long
> Dim x As Double
> Dim y As Double
> Dim z As Double
> x = a
>
> For i = 0 To 999
> x = x * 1.02
> y = x * 1.02
> z = b * y
> Next i
>
> VBMath = z
>
> End Function
> '============================================================================================
>
> '============================================================================================
> ' Put the following in a VB form, with two command buttons (command1
> and command2),
> ' four labels (label1,label2, etc.). Put label1 & label2 next to
> command1, and label3 & label4
> ' next to command2. Make the labels long enough to hold many digits
> so u can see the result.
> '============================================================================================
>
> Option Explicit
>
> '============================================
> Const ITERATIONS = 32000
>
> ' mess with this as you like. Keep in mind the result will not change.
> ITERATIONS only affects
> ' the number of times the function is called (thus affecting the total
> time).
>
>
> Public AVAL As Double
> Public BVAL As Double
> Public CVAL As Double
>
> Private Sub Command1_Click()
>
> '=================================================================
> ' Don't harass me about the general ugliness and sloppiness
> ' of this code and the unnecessary variables. I was doing several
> ' experiments and did not bother to clean it up.
> '=================================================================
>
> Dim z As Double
> Dim xx As Integer
> Dim d As Date
> Dim vTotalTime
>
> Dim a#, b#, c#
> Screen.MousePointer = vbHourglass
>
> a = AVAL
> b = BVAL
> c = CVAL
>
> Label1 = ""
> Label2 = ""
>
> d = Now()
>
> For xx = 1 To ITERATIONS
> a = AVAL
> b = BVAL
> c = CVAL
>
> z = TestMath(a, b)
>
> Next xx
> vTotalTime = DateDiff("s", d, Now)
> Beep
>
> Debug.Print "DONE - Value = " & z
> Debug.Print "total Time = " & vTotalTime
>
> Label1 = "RESULT = " & Format(z, "####################.#############")
> Label2 = "TIME = " & vTotalTime & " SECONDS"
> Screen.MousePointer = vbDefault
>
> End Sub
>
> Private Sub Command2_Click()
>
> '=================================================================
> ' Don't harass me about the general ugliness and sloppiness
> ' of this code and the unnecessary variables. I was doing several
> ' experiments and did not bother to clean it up.
> '=================================================================
>
> Dim z As Double
> Dim xx As Integer
> Dim d As Date
> Dim vTotalTime
>
> Dim a#, b#, c#
>
> Screen.MousePointer = vbHourglass
> a = AVAL
> b = BVAL
> c = CVAL
>
> Label3 = ""
> Label4 = ""
>
> d = Now()
>
> For xx = 1 To ITERATIONS
> a = AVAL
> b = BVAL
> c = CVAL
>
> z = VBMath(a, b)
> Next xx
>
> vTotalTime = DateDiff("s", d, Now)
> Beep
> Debug.Print "DONE - Value = " & z
> Debug.Print "total Time = " & vTotalTime
>
> Label3 = "RESULT = " & Format(z, "####################.#############")
> Label4 = "TIME = " & vTotalTime & " SECONDS"
>
> Screen.MousePointer = vbDefault
>
> End Sub
>
> Private Sub Form_Load()
>
> AVAL = 44
> BVAL = 4
> CVAL = 6
>
> End Sub
>
> '=========================================
> 'Here comes the C code
> '=========================================
>
>
> //===========================================
> // This stuff just goes in a .DLL.. You may need to
> // make a .DEF file as well
> // All tests were done with VB5.0 and VC++5.0,
> // Windows 95, P166 without service packs
> // The VB declaration is in the module code above
> //============================================
>
> double __stdcall TestMath(double a, double far * b)
>
> {
> long i;
> double x;
> double y;
> double z;
>
> x = a;
>
> for (i = 0; i < 1000; ++i)
> {
>
> x = x * 1.02;
> y = x * 1.02;
> z = *b * y;
> }
>
> return(z);
>
> }
>
------------------------------
Date: Fri, 3 Oct 1997 23:12:47 GMT
From: "robert c. combs" <xrcc0494@dcaca037.ca.boeing.com>
Subject: Re: PROOF: VB FASTER THAN PERL, C, C++
Message-Id: <34357BEF.78F@dcaca037.ca.boeing.com>
All this test _MAY_ have proved (there are an awful lot of mitigating
factors here) is that Microsoft has produced an extremely ineffecient
C++ compiler (which should surprise noone).
This code is simple enough that the object code (barring library
inclusions) should be nearly identical.
"Better to remain silent and be thought a fool, than to speak and
remove all doubt."
-bob combs
Brian Wheeler wrote:
>
> You are quite an idiot. All you've managed to prove is that vb doing
> some math function is faster than vb calling a dll function to do some trivial
> math. Did you bother to "optimize" the C version? did you try to run a
> test where the benchmark was done in C, instead of being called from VB? Since
> we can assume you didn't, try it, and tell us the results. Also, since you
> didn't tell us what kind of machine you were on, we have no way of really
> telling how "good" these numbers are.
>
> by the way, how does telling us how fast vb vs C is tell us how fast
> vb is to Perl and C++. Trivial benchmarks tell *NOTHING*.
>
> loser.
>
> Brian Wheeler
> bdwheele@Indiana.edu
>
> In article <613e81$lu1@dfw-ixnews12.ix.netcom.com>,
> SpamProofSeal@none.com (SpamProofSeal@none.com) writes:
> > About the only thing C does faster than VB these days is string
> > manipulation, and that will be all over with VB6. Below are
> > the results. Below that is the source code incase you are
> > still a disbeliever.
> >
> >
> > My results:
> >
> > Inside the VB environment (interpreted VB mode):
> > =================================================
> > Visual C++ - 7 seconds
> > Visual Basic - 49 seconds (not surprising, huh? READ ON!)
> >
> >
> > Optimized for speed VB executable:
> > =================================================
> > Visual C++ - 8 seconds
> > Visual Basic - 3 seconds (In your face C bigots! hehe!)
> >
> >
> > VB Executable, not optimized for maximum speed:
> > ==================================================
> > Visual C++ - 8 seconds
> > Visual Basic - 12 seconds (A little slower, but still good)
> >
> > ===========================================================================================
> >
> > For those who want to try this yourself, novice level knowledge of VB
> > is required, and enough C
> > knowledge to create a .DLL is required. All tests were done using VB
> > 5.0 and VC 5.0.
> >
> > The test to a C function was done by calling a .DLL containing a C
> > function that performed 1000
> > runs through a loop. The C function call is called "TestMath".
> >
> > The test to the VB function was done by calling a VB function that
> > mirrors the functionality of
> > the C function, 1000 runs through a loop. The VB function call is
> > called "VBMath".
> >
> >
> >
> > ' CODE STARTS HERE
> > '==========================================================================================
> > 'put this in a module
> >
> > Option Explicit
> >
> > 'here is the dll declaration.. The C code is at the bottom of this
> > file
> > Declare Function TestMath Lib "JunkDLL2.dll" (ByVal a As Double, b As
> > Double) As Double
> >
> > Public Function VBMath(ByVal a As Double, ByVal b As Double)
> >
> > Dim i As Long
> > Dim x As Double
> > Dim y As Double
> > Dim z As Double
> > x = a
> >
> > For i = 0 To 999
> > x = x * 1.02
> > y = x * 1.02
> > z = b * y
> > Next i
> >
> > VBMath = z
> >
> > End Function
> > '============================================================================================
> >
> > '============================================================================================
> > ' Put the following in a VB form, with two command buttons (command1
> > and command2),
> > ' four labels (label1,label2, etc.). Put label1 & label2 next to
> > command1, and label3 & label4
> > ' next to command2. Make the labels long enough to hold many digits
> > so u can see the result.
> > '============================================================================================
> >
> > Option Explicit
> >
> > '============================================
> > Const ITERATIONS = 32000
> >
> > ' mess with this as you like. Keep in mind the result will not change.
> > ITERATIONS only affects
> > ' the number of times the function is called (thus affecting the total
> > time).
> >
> >
> > Public AVAL As Double
> > Public BVAL As Double
> > Public CVAL As Double
> >
> > Private Sub Command1_Click()
> >
> > '=================================================================
> > ' Don't harass me about the general ugliness and sloppiness
> > ' of this code and the unnecessary variables. I was doing several
> > ' experiments and did not bother to clean it up.
> > '=================================================================
> >
> > Dim z As Double
> > Dim xx As Integer
> > Dim d As Date
> > Dim vTotalTime
> >
> > Dim a#, b#, c#
> > Screen.MousePointer = vbHourglass
> >
> > a = AVAL
> > b = BVAL
> > c = CVAL
> >
> > Label1 = ""
> > Label2 = ""
> >
> > d = Now()
> >
> > For xx = 1 To ITERATIONS
> > a = AVAL
> > b = BVAL
> > c = CVAL
> >
> > z = TestMath(a, b)
> >
> > Next xx
> > vTotalTime = DateDiff("s", d, Now)
> > Beep
> >
> > Debug.Print "DONE - Value = " & z
> > Debug.Print "total Time = " & vTotalTime
> >
> > Label1 = "RESULT = " & Format(z, "####################.#############")
> > Label2 = "TIME = " & vTotalTime & " SECONDS"
> > Screen.MousePointer = vbDefault
> >
> > End Sub
> >
> > Private Sub Command2_Click()
> >
> > '=================================================================
> > ' Don't harass me about the general ugliness and sloppiness
> > ' of this code and the unnecessary variables. I was doing several
> > ' experiments and did not bother to clean it up.
> > '=================================================================
> >
> > Dim z As Double
> > Dim xx As Integer
> > Dim d As Date
> > Dim vTotalTime
> >
> > Dim a#, b#, c#
> >
> > Screen.MousePointer = vbHourglass
> > a = AVAL
> > b = BVAL
> > c = CVAL
> >
> > Label3 = ""
> > Label4 = ""
> >
> > d = Now()
> >
> > For xx = 1 To ITERATIONS
> > a = AVAL
> > b = BVAL
> > c = CVAL
> >
> > z = VBMath(a, b)
> > Next xx
> >
> > vTotalTime = DateDiff("s", d, Now)
> > Beep
> > Debug.Print "DONE - Value = " & z
> > Debug.Print "total Time = " & vTotalTime
> >
> > Label3 = "RESULT = " & Format(z, "####################.#############")
> > Label4 = "TIME = " & vTotalTime & " SECONDS"
> >
> > Screen.MousePointer = vbDefault
> >
> > End Sub
> >
> > Private Sub Form_Load()
> >
> > AVAL = 44
> > BVAL = 4
> > CVAL = 6
> >
> > End Sub
> >
> > '=========================================
> > 'Here comes the C code
> > '=========================================
> >
> >
> > //===========================================
> > // This stuff just goes in a .DLL.. You may need to
> > // make a .DEF file as well
> > // All tests were done with VB5.0 and VC++5.0,
> > // Windows 95, P166 without service packs
> > // The VB declaration is in the module code above
> > //============================================
> >
> > double __stdcall TestMath(double a, double far * b)
> >
> > {
> > long i;
> > double x;
> > double y;
> > double z;
> >
> > x = a;
> >
> > for (i = 0; i < 1000; ++i)
> > {
> >
> > x = x * 1.02;
> > y = x * 1.02;
> > z = *b * y;
> > }
> >
> > return(z);
> >
> > }
> >
------------------------------
Date: Fri, 03 Oct 1997 12:25:29 +0000
From: Glenn West <westxga@ptsc.slg.eds.com>
Subject: Re: STDERR capture
Message-Id: <3434E439.4999@ptsc.slg.eds.com>
Pascal Delmoitie wrote:
>
> Hi,
>
> Newbie to perl, I try to capture the output of STDERR
>
> ex:
>
> $var = `UNIX COMMAND`; (Back quotes)
>
> With success of the UNIX COMMAND I get sthng in $var
>
> With failure I would like to get the result sent to STDERR
> in a varaiable in order to analyze it.
>
> How should I do it ?
I would try something like:
$var=`UNIX COMMAND 2>&1`;
if ($? != 0) {
chomp($var);
print "Error $var on UNIX COMMAND\n";
}
>
> Thanx
>
> Pascal
>
> ------------------------------------------------------
> Pascal Delmoitie
> <pascal@belnet.be>
>
> BELNET Service Support Team
>
> Rue de la Science, 4 Tel. : +32.2.238-3685
> B-1000 BRUSSELS Fax. : +32.2.513-5730
> BELGIUM
> ------------------------------------------------------
------------------------------
Date: Fri, 03 Oct 1997 12:40:00 +0000
From: Glenn West <westxga@ptsc.slg.eds.com>
Subject: Re: Test for alphabetic character?
Message-Id: <3434E7A0.6B94@ptsc.slg.eds.com>
Ramon Rodriguez wrote:
>
> How can I test to see if some user input in a cgi script is text or
> numeric(what I'll accept) in Perl5? Thanks in advance.
>
if ($user_input=~/\D/) {
print "$user_input has non-numeric data\n";
}
> Ramon Rodriguez
------------------------------
Date: Fri, 03 Oct 1997 19:39:09 -0400
From: Ignacio Bustamante <IggieBee@worldnet.att.net>
Subject: Re: Using Perl Format
Message-Id: <3435821D.7631@worldnet.att.net>
Tom,
Thanks for your reply,
>
> If I have to guess, I think your problems are with the here-document
> syntax. Make sure there's no superfluous whitespace (such as
> indentation, trailing ^Ms etc on the line with the terminator.
>
Yes, yes.. it now works, thanks!. I simply flushed veryting against the
left margin, and got both examples working.
> Take it easy. You've stumbled upon the intersection of two somewhat
> obscure features of Perl, and features authors of books seem to ignore.
>
Are there any other sources of information (books, articles, etc.) on
this subject, that you could point me to? (anyone?)
> Unfortunately, the section on here-documents has been hidden in the
> perldata manpage, with no crossrefs from the other quoting mechanisms,
> but fortunately there's the entry in perlfaq4 on here-documents
> describing the problems people usually run into using them.
>
On perlfaq4, the only thing I found was:
Why don't my <
Check for these three things:
1.There must be no space after the << part.
2.There (probably) should be a semicolon at the end.
3.You can't (easily) have any space between in front of the tag.
Am I missing something?
> You see, we don't want people to stop asking, we just want them to see
> if the answers have already been provided for their (and our)
> convenience by looking in the FAQs before posting their questions to
> USENET.
>
Thanks for your words encouragement.
Regards,
Ignacio
------------------------------------------------------------
Know this my son..The only thing your boss will ever remember, is that
last bad thing you did!.
------------------------------
Date: Fri, 3 Oct 1997 19:17:22 -0400
From: Matt Wilson <mwilso@sapient.com>
Subject: Win32::OLE, SQL Server Question
Message-Id: <0685A427A719D11197BB00A024D39945CDF8CF@delphi.sapient.com>
I am currently working on a project where it would be helpful to
directly connect
to Microsoft SQL Server 6.5 through Perl. Luckily, SQL Server supports
automation
so the creation of an object that can query and manipulate the database
is no problem.
There is a problem when it comes to getting rich error information back
when a query
fails. The SQL help assumes that the automation is acheived through VB,
where the
'Err.Description' variable is automatically filled with the error
message; in C++ a call
must be made to an API function GetErrorInfo() which returns a pointer
to a pointer
to a IErrorInfo structure, using this interface pointer (
p->GetDescription() ) returns a
text buffer describing the error.
>From the documentation:
HRESULT GetErrorInfo(DWORD dwReserved, IErrorInfo **pperrinfo);
Using the module Win32::API, I can call this function but I'm not
getting anything
back for **pperrinfo. How do you refer to an OLE interface in Perl? Is
there a better
way to do this?
Any help is greatly appreciated,
Matthew Wilson
Sapient Corp.
(312) 458-1814
mwilso@sapient.com
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
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 1123
**************************************