[25411] in Perl-Users-Digest
Perl-Users Digest, Issue: 7656 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 16 06:05:35 2005
Date: Sun, 16 Jan 2005 03:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 16 Jan 2005 Volume: 10 Number: 7656
Today's topics:
Re: Array generation poopdeville@gmail.com
Re: CGI: Execute a perl script inside another perl scri <"ryanb ~AT~ star-tel ~DOT~ com">
Re: CGI: Execute a perl script inside another perl scri <jurgenex@hotmail.com>
Re: CGI: Execute a perl script inside another perl scri <flavell@ph.gla.ac.uk>
converting perl to sed/ C shell ? surfunbear@yahoo.com
Re: converting perl to sed/ C shell ? <matternc@comcast.net>
implementing "protected" in OO perl SNeelakantan_C@zaplet.com
Re: implementing "protected" in OO perl <phaylon@dunkelheit.at>
Re: implementing "protected" in OO perl <phaylon@dunkelheit.at>
Re: implementing "protected" in OO perl (Anno Siegel)
Re: Listening for files in a directory <joe@inwap.com>
perl 5.8 bug ? (was Re: utf-8, was Re: Three questions: <groleau+news@freeshell.org>
Re: Perl error <wyzelli@yahoo.com>
Re: Print question <matthew.garrish@sympatico.ca>
Re: Print question <joe@inwap.com>
Re: Print question <bik.mido@tiscalinet.it>
Re: system command on Win98 (Jay Tilton)
Re: VB to Perl <groleau+news@freeshell.org>
Re: VB to Perl <tim@vegeta.ath.cx>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 15 Jan 2005 20:01:32 -0800
From: poopdeville@gmail.com
Subject: Re: Array generation
Message-Id: <1105848092.495242.291620@c13g2000cwb.googlegroups.com>
Michele Dondi wrote:
> On 14 Jan 2005 16:23:59 -0800, poopdeville@gmail.com wrote:
>
> >@data = (1,2,4,8,16)
> >sub RR {
> >my $upper = $#_;
> >@LOF = min(($_[0], $_[1])) / max(($_[0], $_[1]));
> >for $i (1 .. $upper - 1) {
> >push @LOF, min($_[$i], $_[$i+1]) / max($_[$i], $_[$i+1]);
> >}
> >print @LOF, "\n";
> >}
> >
> >RR(@data);
> >
> >This is giving me the right *form* of answer, but instead of giving
me
> >the .5.5.5.5 I expect, it's returning 0.510.50.25. Obviously, I've
> >misunderstood some convention. :-) Anybody see what's wrong?
>
> I noticed that you've already found what was wrong and that you've
> been given good advice.
>
> As a side note I'd like to add that even if generally speaking
> factorizing the code through subs is convenient, in this case min()
> and max() are likely to do much of the same job (also, function calls
> _with_ arguments are somewhat expensive in perl), well unless they
> cache their result, which probably would introduce more work than it
> would save, taking into account their simplicity.
>
Thanks for your suggestions. As I mentioned before, my Perl knowledge
is not very sophisticated. I don't have much experience with high
level programming languages, as all my previous programming has been
done in assembly, with Turing machines, the Lambda calculus, recursive
functions, and so on (that is, outside of a bit of assembly, I've never
written machine readable code). Therefore, I'm not familiar with the
nicities that make Perl a high level language (this relates to my
remark concerning my lack of understanding of strictures. I chose Perl
for my current project because it let me get down to writing algorithms
without having to worry about a zillion details, like C for instance.
But I enjoyed writing it, and I've met nice people here, so I'll stick
with it. :-)
> Please note, as another side note that while indeed there's nothing
> wrong a priori with a sub print()ing something, I used a return()
list
> instead, which seems more appropriate, IMHO.
Yes, I was using that print call while debugging. I've sinced changed
it to a return.
Thanks,
'cid 'ooh
------------------------------
Date: Sat, 15 Jan 2005 19:38:18 -0600
From: Ryan B <"ryanb ~AT~ star-tel ~DOT~ com">
Subject: Re: CGI: Execute a perl script inside another perl script
Message-Id: <10ujha9qhgggbc8@corp.supernews.com>
Try
system('C:/perl/bin/perl.exe envCGI.pl');
HTH,
Ryan
xdarcos@hotmail.com wrote:
> Hello,
>
> I am using perl scripts as CGI. What I want to do is to call another
> perl script where I only set environment variables (envCGI.pl).
>
> If I set these variables in my initial perl script, it works well (I
> get my HTML page) but if I call the other perl script, I get:
>
> [12/Jan/2005:10:43:22] failure ( 632): for host 10.70.176.104 trying
> to POST /surcouf.cgi, cgi_scan_headers reports: HTTP4044: the CGI
> program C:\Perl\bin\perl.exe did not produce a valid header (program
> terminated without a valid CGI header. Check for core dump or other
> abnormal termination).
>
> Here is my perl script:
>
> #!C:/perl/bin/perl.exe
>
> exec('envCGI.pl');
>
> //Then an exe is executed (in which the content-type is set) and the
> HTML page is well displayed.
> $matchAdmin = "Routage%3DADMIN";
> $matchConso = "Routage%3DCONSO";
> if ($ENV{QUERY_STRING} =~ /$matchAdmin/)
> {
> $cmd = 'admin.exe'; exec($cmd);
> }
> elsif ($ENV{QUERY_STRING} =~ /$matchConso/)
> {
> $cmd = 'conso.exe'; exec($cmd);
> }
> else
> {
> $cmd = 'contrat.exe'; exec($cmd);
> }
>
> I tried also to use: system('envCGI.pl'). There are no errors but the
> variables are not set. Is there an equivalent of EXPORT command of Unix
> ?
>
> Thanks for your help
> Xavier
> Note:I am using SunOne Web Server 6.1 and I am under Windows 2000
>
------------------------------
Date: Sun, 16 Jan 2005 01:56:01 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: CGI: Execute a perl script inside another perl script
Message-Id: <RQjGd.2353$c%6.523@trnddc03>
Ryan B" <"ryanb ~AT~ star-tel ~DOT~ com wrote:
> Try
> system('C:/perl/bin/perl.exe envCGI.pl');
And why do you think that if called with an absolute path the child process
would be able to overwrite environment variables in the parent process?
>> I am using perl scripts as CGI. What I want to do is to call another
>> perl script where I only set environment variables (envCGI.pl).
>>
>> I tried also to use: system('envCGI.pl'). There are no errors but the
>> variables are not set. Is there an equivalent of EXPORT command of
>> Unix ?
jue
------------------------------
Date: Sun, 16 Jan 2005 10:26:50 +0000
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: CGI: Execute a perl script inside another perl script
Message-Id: <Pine.LNX.4.61.0501161018460.31366@ppepc56.ph.gla.ac.uk>
On Sat, 15 Jan 2005, Ryan B blurts out atop a fullquote:
> Try
>
> system('C:/perl/bin/perl.exe envCGI.pl');
Why would the hon Usenaut need to "try" it? - aren't you sure it's
going to work? Where's your explanation of what you suppose the
questioner was doing wrong? Where's your explanation of how you
imagine the called process is going to be able to set environment
variables in the calling process?
> HTH,
TOFU posters rarely do. Statistically, in my experience, their
answers rarely address the substantive issues in the material that
they are so comprehensively quoting - but rarely, it seems, bothered
to read.
[ fullquote snipped ]
> > I am using perl scripts as CGI. What I want to do is to call another
> > perl script where I only set environment variables (envCGI.pl).
That's the point, just in case you still didn't get it.
------------------------------
Date: 15 Jan 2005 19:29:04 -0800
From: surfunbear@yahoo.com
Subject: converting perl to sed/ C shell ?
Message-Id: <1105846144.397474.194170@f14g2000cwb.googlegroups.com>
I had some resistance at work because our support team uses sed, but I
wrote some perl code. I have been trying to argue my case and win them
over, not sure if they are interested in learning perl or bettering
themselves technically in that regard.
If I get stuck, I am wondering if there is some transaltion utilities
to translate perl pattern matching expressions to sed expressions where
possible as well as maybe translating simple perl
scripts to c shell. That way I could develop what I need to in perl in
such a way as to convert it to sed/c shell when I am done. Maybe I
could convince them that the resulting generated srcipts are harder to
work with than the original perl, something like that.
------------------------------
Date: Sat, 15 Jan 2005 22:39:47 -0500
From: Chris Mattern <matternc@comcast.net>
Subject: Re: converting perl to sed/ C shell ?
Message-Id: <Xs2dndMmLb2ef3TcRVn-2A@comcast.com>
surfunbear@yahoo.com wrote:
> I had some resistance at work because our support team uses sed, but I
> wrote some perl code. I have been trying to argue my case and win them
> over, not sure if they are interested in learning perl or bettering
> themselves technically in that regard.
>
> If I get stuck, I am wondering if there is some transaltion utilities
> to translate perl pattern matching expressions to sed expressions where
> possible as well as maybe translating simple perl
> scripts to c shell. That way I could develop what I need to in perl in
> such a way as to convert it to sed/c shell when I am done. Maybe I
> could convince them that the resulting generated srcipts are harder to
> work with than the original perl, something like that.
Scripting in C Shell? Nooooo.....
http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
If you have a commercial UNIX, you almost certainly have ksh. If you
have a free UNIX/UNIX-clone, you almost certainly have bash. Use them.
In any case, you can't automatically translate from perl to a shell
+ sed, because perl is a superset of that. You can do too many things
in perl you can't do in a shell + sed.
--
Christopher Mattern
"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"
------------------------------
Date: 15 Jan 2005 16:44:57 -0800
From: SNeelakantan_C@zaplet.com
Subject: implementing "protected" in OO perl
Message-Id: <1105836297.326764.166400@z14g2000cwz.googlegroups.com>
Is there a way of making a certain variable 'protected' so that only
methods in derived classes may access it? I would prefer a mechanism
that doesn't wrap the variable in a method call since performance would
slow down by an order of magnitude.
-Shanker
------------------------------
Date: Sun, 16 Jan 2005 03:18:26 +0100
From: "Robert Sedlacek" <phaylon@dunkelheit.at>
Subject: Re: implementing "protected" in OO perl
Message-Id: <opskobc0fn2n465k@localhost>
Am 15 Jan 2005 16:44:57 -0800 schrieb <SNeelakantan_C@zaplet.com>:
> Is there a way of making a certain variable 'protected' so that only
> methods in derived classes may access it? I would prefer a mechanism
> that doesn't wrap the variable in a method call since performance would
> slow down by an order of magnitude.
I'm thinking of handling it this way:
package Example;
use warnings;
use strict;
use Package::with::brings::used::functions;
sub protected_method {
ensure private caller;
# ..
}
__END__
private gets caller as parameter and has it's own caller. By comparing it
is able to find out if both are equal. If they aren't, it drops an error
object, which is used by ensure to drop an error message (and die). Well,
the names are just quick thoughts. As well as a (maybe) useful kind of use
like:
if( has private caller ) {
# ...
}
hth,
p
--
http://www.dunkelheit.at/
------------------------------
Date: Sun, 16 Jan 2005 03:22:27 +0100
From: "Robert Sedlacek" <phaylon@dunkelheit.at>
Subject: Re: implementing "protected" in OO perl
Message-Id: <opskobjpwj2n465k@localhost>
Am Sun, 16 Jan 2005 03:18:26 +0100 schrieb Robert Sedlacek
<phaylon@dunkelheit.at>:
> I'm thinking of handling it this way:
Whoops. I'm sorry, I misread your post in first way. Have you thought about
using tie()?
sry again,
p
--
http://www.dunkelheit.at/
------------------------------
Date: 16 Jan 2005 01:22:39 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: implementing "protected" in OO perl
Message-Id: <cscfkv$8p4$1@mamenchi.zrz.TU-Berlin.DE>
<SNeelakantan_C@zaplet.com> wrote in comp.lang.perl.misc:
>
> Is there a way of making a certain variable 'protected' so that only
> methods in derived classes may access it?
As opposed to what?
> I would prefer a mechanism
> that doesn't wrap the variable in a method call since performance would
> slow down by an order of magnitude.
How do you know that? Access to this variable must dominate your program
in the strangest way for this to be true.
If you don't define an accessor (that is, a method) for the variable, it
doesn't play along with OO at all; there will be no difference between
derived classes and other classes with respect to that variable. Class
variables are not inherited in Perl OO.
Anno
------------------------------
Date: Sat, 15 Jan 2005 23:44:29 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Listening for files in a directory
Message-Id: <8PWdnTgwe9PChnfcRVn-vg@comcast.com>
Jim Gibson wrote:
> In article <41e62bd1$0$33639$edfadb0f@dread16.news.tele.dk>, Poul
> Møller Hansen <tux@pbnet.dk> wrote:
>
>>I'm trying to make a solution that can listen for files in a given
>>directory, and process the files as soon they have been written.
>>
>>So far I'm executing the script once per minute, but I would like a realtime
>>scan for files. Does any of you know how to start on this ?
>
> Notification when a file is created sounds like an operating system
> function, and I have never heard of any operating system offer this
> function as a general feature.
Linux has it. I don't know if it is older versions, but Red Hat 9
includes SGI's File Alteration Monitor which meets the requirements.
http://search.cpan.org/~jglick/SGI-FAM-1.002/lib/SGI/FAM.pm
-Joe
------------------------------
Date: Sat, 15 Jan 2005 20:14:06 -0500
From: Wes Groleau <groleau+news@freeshell.org>
Subject: perl 5.8 bug ? (was Re: utf-8, was Re: Three questions: ....)
Message-Id: <K-SdnQxw_8n4WXTcRVn-1Q@gbronline.com>
Alan J. Flavell wrote:
[re UTF-8 in perl scripts]
> It "works", yes, but (as I understand it, anyway) I think you have to
> ask for it. It could just be that if you call for locale-awareness
> with -CL, and you have utf-8 in your locale, it will come out in the
> wash; but I don't see any harm in asking for it directly, if you're so
> certain that you'll never not want it (sorry for the double-negative).
I also left the L off of -C because I don't think I have that completely
coerced to UTF-8
>>So, things are a little unclear. I put in both,
>
> Looks as if you're (a) right and (b) unlikely to cause any harm.
Sigh, now it starts getting weird. Kind of long, summary at the bottom.
The script with -CSD and use utf8 created a database,
and a test script pulled the records out of the database
and printed them. The non-ASCII characters rendered
correctly BUT that doesn't mean anything, since the test
script had the same -CSD and use utf8. (Right?)
So I figured I needed to eyeball inside the DB file
and see if I could find some nonASCII and see how it was encoded.
But a series of unfortunate events resulted in my having
to re-create the script, and then it crashed (bus error
or segmentation fault). Figured out which record it
was crashing on, put it in its own file, and ....
well to skip over the long tedious details, I eventually
had a version of the script that would crash and one that
would not crash on the same input file.
'diff' showed only one difference:
wgroleau$ diff ~/bin/GEDCOM_DB ./tempGCDB
1c1
< #!/usr/bin/perl -w -CSD
---
> #!/usr/bin/perl -w -CSD
od -xc revealed that the extra space is indeed a (hex 20)
regular space and not a UTF-8 construct.
More study showed that the space made a difference on the only
two systems I currently have access to:
wgroleau$ uname -a
Darwin Groleau.local 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov 7
16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC Power
Macintosh powerpc
wgroleau$ perl -v
This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2003, Larry Wall
AND
[0:ag/g/groleau> uname -a
NetBSD otaku 1.6.2_STABLE NetBSD 1.6.2_STABLE (sdf) #0: Sun Jul 25
04:17:09 UTC 2004 root@ol:/var/src/src/sys/arch/alpha/compile/sdf alpha
[0:ag/g/groleau> perl -v
This is perl, v5.8.0 built for alpha-netbsd
Copyright 1987-2002, Larry Wall
On Darwin/PPC, the extra space prevents bus error/segmentation fault.
On Net-BSD/Alpha, it prevents the following:
[0:ag/g/groleau> rm wgroleau.DB; ./tempGCDB < bad.record.GED
Recompile perl with -DDEBUGGING to use -D switch
Can't emulate -S on #! line at ./tempGCDB line 1.
[255:ag/g/groleau> head -1 ./tempGCDB
#!/usr/pkg/bin/perl -w -CSD
Summary: On two diferent platforms, in
#!/usr/bin/perl -w -CSD
the extra space is required.
If anyone wants to try it on a different system, I can provide
the script and the input file.
--
Wes Groleau
-----------
"Thinking I'm dumb gives people something to
feel smug about. Why should I disillusion them?"
-- Charles Wallace
(in _A_Wrinkle_In_Time_)
------------------------------
Date: Sun, 16 Jan 2005 01:13:53 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: Perl error
Message-Id: <ldjGd.120180$K7.70148@news-server.bigpond.net.au>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote in message
news:Xns95DFA7D034E19asu1cornelledu@132.236.56.8...
: "quartet" <travisq@gmail.com> wrote in news:1105823297.270006.258140
: @z14g2000cwz.googlegroups.com:
:
: > Can someone tell me why this script is failing with, "Use of
: > uninitialized value in string at ./xmldoc line 16."
:
: The subject line of your post is incorrect. It should have been
: "programmer error".
:
: > use XML::Simple;
: > #use Data::Dumper;
: > #use Carp;
:
: use strict;
: use warnings;
:
: missing.
At least 'use strict;' must exist in the real script, hence the error.
However, as Sherm pointed out, this script has only 12 lines so is not the
same as that generating the error.
I suspect the absence of 'my' in front of $data is the cause of this
specific error, but as you point out, there are other things wrong too....
P
--
print "Just another Perl Hacker";
------------------------------
Date: Sat, 15 Jan 2005 22:17:32 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Print question
Message-Id: <b1lGd.67107$TN6.2319397@news20.bellglobal.com>
"edgrsprj" <edgrsprj@ix.netcom.com> wrote in message
news:OM5Gd.7168$C52.2430@newsread2.news.atl.earthlink.net...
> "Michele Dondi" <bik.mido@tiscalinet.it> wrote in message
> news:9rlfu0taqvcm9gqck09qpg772tiqr4l69c@4ax.com...
>> On Fri, 14 Jan 2005 08:24:18 GMT, "edgrsprj" <edgrsprj@ix.netcom.com>
>
>> Listen: I am willing to be as gentle and as positive as possible, but
>> all this sounds so strange, at best! I mean, it's evident that you're
>
>
> With some assistance from 2 respected geologists I published one technical
> paper on this a number of years ago and own 3 copyrights on the
> technology.
> It was discussed in detail in an invited presentation at an annual
> disaster
> mitigation conference in the People's Republic of China back in 2003.
>
So why don't you provide any specific names? People who aren't crackpots
(and personally it doesn't matter much to me either way if you are), never
have to hide information. You never even use your real name anywhere on your
web site!
So name your geologists. Cite the publication and date where this paper was
published. You wouldn't think it would be so hard just to name the
conference you were at instead of giving a year and very large country. None
of these things you do, however, and so in the eyes of anyone reading your
posts you are a crackpot.
It's not such a terrible thing to have an altruistic goal without a strong
background in whatever area it is you're interested in helping out in, if
you state as much up front. If you have issues of inadequacy because of your
(lack of) schooling, you shouldn't resort to blurring your credentials.
You'll find that people are more understanding of your goals if you're
honest with them.
Matt
------------------------------
Date: Sun, 16 Jan 2005 00:15:08 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Print question
Message-Id: <-_-dncLijcgTv3fcRVn-sg@comcast.com>
edgrsprj wrote:
> What I am planning to try to do is have that Perl program translated into a
> CGI type language so that it will run at that U.N. site or some other site.
Perl is a "CGI type language", therefore you program does not need to
be translated. The program's input and output routines may need to be
tweaked to properly execute in the CGI environment, but your program's
core routines should work as is.
It sounds like you were assuming that the U.N. site is not capable
of running perl programs. You should find out for sure before
wasting time looking for another language.
-Joe
------------------------------
Date: Sun, 16 Jan 2005 11:30:17 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Print question
Message-Id: <okbku0pqk4bf6nb45ij0he5ad7ruibhda9@4ax.com>
On Sat, 15 Jan 2005 09:55:58 GMT, "edgrsprj" <edgrsprj@ix.netcom.com>
wrote:
>> Listen: I am willing to be as gentle and as positive as possible, but
>> all this sounds so strange, at best! I mean, it's evident that you're
>
>My primary computer program simply compares certain types of data associated
>with what are believed to be earthquake fault zone activity related
>electromagnetic energy field fluctuations with similar data associated with
[snip rest]
There was no need to be so verbose, since notwithstanding the fact
that all this indeed may be really interesting, I don't have the
competence and the technical knowledge to have even a clue wether all
this makes sense, just like most people here, I suppose. And _if_
anyone is really interested, they can go to the link you posted here.
>With some assistance from 2 respected geologists I published one technical
>paper on this a number of years ago and own 3 copyrights on the technology.
[snip rest]
Wow, I'm impressed - and I'll trust your word. Retrospectively this
"attitude" may seem to you to be overly suspicious, but in some sense
your claims needed a sort of confirmation...
Still I can't understand why you can't manage to start a research
project along these lines within an active research group. As I wrote
in the other post AFAIK they generally have powerful machines that
make PCs look ridicule (even if this is somewhat less impressive than
in the past). I don't know how things go amongst geologists, but in
Physiscs, for example they still generally use Fortran -even if many
young researchers despise it for various reasons- basically for two
reasons: (i) a hystorical one (tradition) and (ii) it is (said to be)
_fast_[*].
All in all nothing a priori prevents you from using Perl for your
research. But it's hard to imagine it can be the best language for the
_computational_ part of it. It is of course great for data input and
output, but IMHO you should really consider the actual
computation-intensive parts as binary extensions.
[*] A friend of mine, whose main activity is about Quantum Field
Theory simulations on lattices, despite being really a C/C++ fan,
writes his simulations mostly in Fortran. He's lately resorted to
writing libraries in Fortran (for the computation-intensive parts of
his programs) and using them in C.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Sun, 16 Jan 2005 01:48:46 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: system command on Win98
Message-Id: <41e9c5ea.435552741@news.erols.com>
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:
: The variable being referred to is PATHEXT not PATH. I am not sure if it
: would work on Win 98, though (I still haven't turned on the Win 98
: machine).
Setting PATHEXT has no effect on non-NT-flavored MS systems.
------------------------------
Date: Sat, 15 Jan 2005 20:29:01 -0500
From: Wes Groleau <groleau+news@freeshell.org>
Subject: Re: VB to Perl
Message-Id: <bdGdna0Roop-WnTcRVn-1g@gbronline.com>
"J�����������������������������������" wrote:
>>>Call waveInGetDevCaps(0, VarPtr(Caps), Len(Caps))
>>
>>Calls a function and passes it some information
>>about Caps.
>
> Maybe
> waveInGetDevCaps(0, $Caps{VarPrt}, $Caps{Len});
Yes, but I think the OP wants us to tell him/her
how to write waveInGetDevCaps in perl. :-)
--
Wes Groleau
-----------
"Thinking I'm dumb gives people something to
feel smug about. Why should I disillusion them?"
-- Charles Wallace
(in _A_Wrinkle_In_Time_)
------------------------------
Date: Sun, 16 Jan 2005 03:23:59 GMT
From: Tim Hammerquist <tim@vegeta.ath.cx>
Subject: Re: VB to Perl
Message-Id: <slrncujng5.638.tim@vegeta.saiyix>
Tad McClellan <tadmc@augustmail.com> wrote:
> Larry <dontmewithme@got.it> wrote:
> > Below is a chunk of VB code:
> [snip\
> > and I need to that in Perl!!
>
> Step 1: Learn VB
>
> Step 2: Learn Perl
>
> Step 3: Convert the VB code to Perl code
Maybe try:
http://translate.google.com/langpair=vb|pl
Oh. It doesn't seem to support that pair.
Well, unless you learn both languages and translate it yourself, you
risk it being translated into the same pseudo-gibberish Google Translate
normall spews.
And please don't put that sort of ick into production Perl code. It's
depressing to look at.
HTH,
Tim Hammerquist
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
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.
#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 V10 Issue 7656
***************************************