[25412] in Perl-Users-Digest
Perl-Users Digest, Issue: 7657 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jan 16 11:05:47 2005
Date: Sun, 16 Jan 2005 08:05:23 -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: 7657
Today's topics:
[newbie] chomp acting weird (or me not understanding ho <hendrik_maryns@despammed.com>
[perl-python] 20050116 defining a function <xah@xahlee.org>
Re: Array generation <joe@inwap.com>
Re: converting perl to sed/ C shell ? <tadmc@augustmail.com>
explorer feature for a perl editor? s_p_a_m_mob@hotmail.com
Re: explorer feature for a perl editor? <hendrik_maryns@despammed.com>
installing module to my own directory with MCPAN ioneabu@yahoo.com
Re: installing module to my own directory with MCPAN <1usa@llenroc.ude.invalid>
Re: installing module to my own directory with MCPAN ioneabu@yahoo.com
Re: installing module to my own directory with MCPAN <mritty@gmail.com>
Re: Loop through a text file line by line <joe@inwap.com>
Low level data manipulation in Perl <perl@lennychallis.co.uk>
Re: Low level data manipulation in Perl <nobull@mail.com>
Re: Low level data manipulation in Perl <nospam@bigpond.com>
Re: Opening a text file and editing its contents <joe@inwap.com>
Re: Perl 5.6.0 Compatible With Windows 2003? <joe@inwap.com>
Re: Perl error <tadmc@augustmail.com>
Re: Perl error <tadmc@augustmail.com>
Re: Print question beliavsky@aol.com
Re: Print question <1usa@llenroc.ude.invalid>
Re: system command on Win98 <joe@inwap.com>
Re: utf-8, was Re: Three questions: UTF-8, DBM, hash of <tadmc@augustmail.com>
Re: VB to Perl <dontmewithme@got.it>
Re: VB to Perl <1usa@llenroc.ude.invalid>
Re: VB to Perl <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 16 Jan 2005 16:44:16 +0100
From: Hendrik Maryns <hendrik_maryns@despammed.com>
Subject: [newbie] chomp acting weird (or me not understanding how it works??)
Message-Id: <T7ednZHf0q5HFnfcRVnyug@scarlet.biz>
Hi,
I'm reading lines from an inputfile which contains on every line a word,
a description of it, and the word again. I want to reconstruct the
sentence these words formed. "LET" is the sign for punctuation, thus
means the end of the sentence is reached. Whend i use chomp like this:
#add this when testing
open(INFILE, "test.txt");
#
do{
my @zinwoorden;
chomp($lijn=<INFILE>);
while ($lijn!~/LET/){
$lijnnr++;
push(@zinwoorden,$lijn);
$lijn=<INBESTAND>;
} #enduntil
for (@zinwoorden){
s/(\w+).*/$1/;
}
my $zin=join (" ", @zinwoorden);
print "$lijnnr \n$zin \n";
} until eof(INFILE);
it doesn't work, just prints 0.
If I do this, on the other hand:
do{
my @zinwoorden;
$lijn=<INFILE>;
while ($lijn!~/LET/){
$lijnnr++;
push(@zinwoorden,$lijn);
$lijn=<INBESTAND>;
} #enduntil
for (@zinwoorden){
s/(\w+).*\n/$1/; # <-- workaround
}
my $zin=join (" ", @zinwoorden);
print "$lijnnr \n$zin \n";
} until eof(INFILE);
it works. I don't understand this. I'd like to use chomp, as it is
safer, in case the \n would, by some strange event, not be there...
I tried to change $/="\n", but as I don't really know what that does,
I'm a bit afraid there, it didn't work anyway.
An easy example of INFILE would be:
## start of test.txt
dames N(soort,mv,basis) dame
en VG(neven) en
heren N(soort,mv,basis) heer
meneer N(soort,ev,basis,zijd,stan) meneer
de LID(bep,stan,rest) de
rector N(soort,ev,basis,zijd,stan) rector
een LID(onbep,stan,agr) een
hele ADJ(prenom,basis,met-e,stan) heel
mooie ADJ(prenom,basis,met-e,stan) mooi
avond N(soort,ev,basis,zijd,stan) avond
en VG(neven) en
een LID(onbep,stan,agr) een
hartelijk ADJ(vrij,basis,zonder) hartelijk
welkom N(soort,ev,basis,onz,stan) welkom
aan VZ(init) aan
alle VNW(onbep,det,stan,prenom,met-e,agr) al
aanwezigen ADJ(nom,basis,met-e,mv-n) aanwezig
in VZ(init) in
de LID(bep,stan,rest) de
zaal N(soort,ev,basis,zijd,stan) zaal
. LET() .
## end of test.txt
and a few more of these sentences would follow.
Any comment on my code welcome too!
Cheers, Hendrik
------------------------------
Date: 16 Jan 2005 06:45:53 -0800
From: "Xah Lee" <xah@xahlee.org>
Subject: [perl-python] 20050116 defining a function
Message-Id: <1105886753.149519.194980@z14g2000cwz.googlegroups.com>
=A9 # the following is a example of defining
=A9 # a function in Python.
=A9
=A9 def fib(n):
=A9 """This prints n terms of a sequence
=A9 where each term is the sum of previous two,
=A9 starting with terms 1 and 1."""
=A9 result=3D[];a=3D1;b=3D1
=A9 for i in range(n):
=A9 result.append(b)
=A9 a,b=3Db,a+b;
=A9 result.insert(0,1)
=A9 del result[-1]
=A9 return result
=A9
=A9 print fib(6)
=A9
=A9 # note the use of .insert to insert 1 at
=A9 # the beginning of a list, and =D2del
=A9 # result[-1]=D3 to remove the last element
=A9 # in a list. Also, the string
=A9 # immediately following the function
=A9 # definition is the function's
=A9 # documentation.
=A9
=A9 # the unusual syntax of a.insert() is
=A9 # what's known as Object Oriented syntax style.
=A9
=A9 # try writing a factorial function.
=A9
=A9 -------------------
=A9 # the equivalent perl version is this:
=A9
=A9 =3Dpod
=A9
=A9 fib(n) prints n terms of a sequence where each
=A9 term is the sum of previous two,
=A9 starting with terms 1 and 1.
=A9
=A9 =3Dcut
=A9
=A9 use strict;
=A9 my @result;
=A9 my ($a, $b);
=A9
=A9 sub fib($) {
=A9 my $n=3D @_[0];
=A9 @result=3D();$a=3D1;$b=3D1;
=A9 for my $i (1..$n){
=A9 push @result, $b;
=A9 ($a,$b)=3D($b,$a+$b);
=A9 }
=A9 unshift @result, 1;
=A9 pop @result;
=A9 return @result;
=A9 }
=A9
=A9 use Data::Dumper;
=A9 print Dumper [fib(5)];
=A9
=A9 # the =3Dpod and =3Dcut
=A9 # is perl's way of demarking inline
=A9 # documentation called POD.
=A9 # see =D2perldoc -t perlpod=D3
=A9 # note: the empty line around it
=A9 # is necessary, at least in perl version
=A9 # 5.6 up to ~2002.
=A9
=A9 # the =D2use strict;=D3 is to make perl's
=A9 # loose syntax stricter by enforcement.
=A9 # Its use is encouraged by
=A9 # perl gurus, but not all standard
=A9 # packages use it.
=A9
=A9 # the =D2my=D3 are used to declare variables.
=A9 # necessary under =D2use strict;=D3
=A9 # see =D2perldoc -t strict=D3
=A9
=A9 # the $ in fib($) is there to declare
=A9 # that fib has a parameter of one scalar.
=A9 # Its use is however optional and uncommon.
=A9 # it is used for clarity but
=A9 # has also met with controversy by
=A9 # perl gurus as being unperl.
=A9 # see =D2perldoc perlsub=D3 for ref.
=A9
=A9 # the @_[0] is the first element of the
=A9 # array @_. The @_ array is a predefined
=A9 # array, holding arguments to subroutines.
=A9 # see =D2perldoc -t perlvar=D2
=A9
=A9 # see
=A9 # perldoc -tf unshift
=A9 # perldoc -tf pop
=A9
=A9 # the last line, [fib(5)], is basically
=A9 # to make it a memory address of a copy of
=A9 # the list returned by fib(5), so that
=A9 # Dumper can print it.
=A9 # see =D2perldoc -t perldata=D3 or perlref
=A9 # for unix-styled technicalities.
=A9
=A9 Xah
=A9 xah@xahlee.org
=A9 http://xahlee.org/PageTwo_dir/more.html
------------------------------
Date: Sun, 16 Jan 2005 04:25:27 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Array generation
Message-Id: <D-ydnY5JfKOqwHfcRVn-ug@comcast.com>
poopdeville@gmail.com wrote:
> print @LOF, "\n";
Change that to
print "@LOF\n";
to make the output more readable.
-Joe
------------------------------
Date: Sun, 16 Jan 2005 07:55:26 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: converting perl to sed/ C shell ?
Message-Id: <slrncuksie.dd3.tadmc@magna.augustmail.com>
surfunbear@yahoo.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.
There is a mailing list for discussion of getting more
folks to use Perl:
http://lists.perl.org/showlist.cgi?name=advocacy
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Jan 2005 05:49:18 -0800
From: s_p_a_m_mob@hotmail.com
Subject: explorer feature for a perl editor?
Message-Id: <1105883358.737881.295470@z14g2000cwz.googlegroups.com>
Hi there,
I am looking for a perl editor which has an explorer feature (like a
document with style in OpenOffice) to rearrange a perl package. Such an
editor should parse the source text and show the perl structure (sub)
and pod structure (=head1, =head2, etc.) and enable the user to
rearrange graphically the structure.
If such an editor doesn't exist (apart from VisiPerl, not tested) I am
thinking of using OpenOffice.
Best regards,
Marc-Olivier BERNARD
------------------------------
Date: Sun, 16 Jan 2005 16:52:28 +0100
From: Hendrik Maryns <hendrik_maryns@despammed.com>
Subject: Re: explorer feature for a perl editor?
Message-Id: <FcGdnRlmCognEHfcRVnysQ@scarlet.biz>
s_p_a_m_mob@hotmail.com schreef:
> Hi there,
>
> I am looking for a perl editor which has an explorer feature (like a
> document with style in OpenOffice) to rearrange a perl package. Such an
> editor should parse the source text and show the perl structure (sub)
> and pod structure (=head1, =head2, etc.) and enable the user to
> rearrange graphically the structure.
>
> If such an editor doesn't exist (apart from VisiPerl, not tested) I am
> thinking of using OpenOffice.
I'm not sure wether I understand exactly what you want, but eclipse with
the EPIC extension for Perl, does something that sounds like this... It
does syntax-highlighting and checking too.
It is rather heavy and because of that tends to be a bit slow, though.
Hendrik
------------------------------
Date: 16 Jan 2005 04:50:24 -0800
From: ioneabu@yahoo.com
Subject: installing module to my own directory with MCPAN
Message-Id: <1105879824.437592.14240@c13g2000cwb.googlegroups.com>
I installed Switch.pm in my own module directory on my web account
using:
perl Makefile.PL PREFIX=/u/mydir/perl
It took a while and was not easy because I had to look through
directories for it with ftp and when I finally got it, decompressed it,
and attempted installation, I was told I needed Filter. I had to go
through the whole process again to install Filter first.
All of this was because I wrote a script on my home computer using
Switch and I thought I would be cool and use Switch instead of if,
elsif, etc...
My question is: Why can't I use:
perl -MCPAN -e 'shell'
with some equivalent of the PREFIX option so it can handle my
installation headaches for me? The problem is that I do not have root
access on this account. I do everything on the command line using ssh
to connect.
Thanks!
wana
------------------------------
Date: 16 Jan 2005 13:35:31 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: installing module to my own directory with MCPAN
Message-Id: <Xns95E0576841F4Aasu1cornelledu@132.236.56.8>
ioneabu@yahoo.com wrote in news:1105879824.437592.14240
@c13g2000cwb.googlegroups.com:
> Subject: installing module to my own directory with MCPAN
There is nothing called MCPAN.
> My question is: Why can't I use:
>
> perl -MCPAN -e 'shell'
>
> with some equivalent of the PREFIX option so it can handle my
> installation headaches for me?
You have been around long enough to know that you should read the
documentation for the modules you are using before posting here:
http://search.cpan.org/~andk/CPAN-1.76/lib/CPAN.pm#CONFIGURATION
http://search.cpan.org/~andk/CPAN-1.76/lib/CPAN.pm#FAQ (specifically,
question 5).
Sinan.
------------------------------
Date: 16 Jan 2005 05:45:07 -0800
From: ioneabu@yahoo.com
Subject: Re: installing module to my own directory with MCPAN
Message-Id: <1105883107.219046.216200@c13g2000cwb.googlegroups.com>
[...]
> There is nothing called MCPAN.
Sorry, I really did not know that the interactive shell for downloading
modules was actually CPAN.pm. That is really helpful. Now that I know
what I'm using, I'll read about it. I'm glad that it's not really
MCPAN. It sounds like a McDonald's breakfast. Thanks!
wana
>
> > My question is: Why can't I use:
> >
> > perl -MCPAN -e 'shell'
> >
> > with some equivalent of the PREFIX option so it can handle my
> > installation headaches for me?
>
> You have been around long enough to know that you should read the
> documentation for the modules you are using before posting here:
>
> http://search.cpan.org/~andk/CPAN-1.76/lib/CPAN.pm#CONFIGURATION
>
> http://search.cpan.org/~andk/CPAN-1.76/lib/CPAN.pm#FAQ (specifically,
> question 5).
>
> Sinan.
------------------------------
Date: 16 Jan 2005 06:30:15 -0800
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: installing module to my own directory with MCPAN
Message-Id: <1105885815.345473.68410@f14g2000cwb.googlegroups.com>
ioneabu@yahoo.com wrote:
> [...]
> > There is nothing called MCPAN.
>
> Sorry, I really did not know that the interactive shell for
downloading
> modules was actually CPAN.pm. That is really helpful. Now that I
know
> what I'm using, I'll read about it. I'm glad that it's not really
> MCPAN. It sounds like a McDonald's breakfast. Thanks!
The -M in
perl -MCPAN -e'shell'
is a command line option that loads a module. Saying -MCPAN is the
equivalent of saying
use CPAN;
within a script. Read more about it in
perldoc perlrun
Paul Lalli
------------------------------
Date: Sun, 16 Jan 2005 03:19:18 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Loop through a text file line by line
Message-Id: <oaedneTi39ok0HfcRVn-og@comcast.com>
Martin Kissner wrote:
> I said: "If you replace <DATA> with <> you can read from STDIN."
> You said: "Not exactly. ..."
> I was not sure if I have expressed myself correctly so tried to clear
> up what I meant.
If you replace <DATA> with <> you can read from STDIN, provided that
@ARGV is empty. If there is anything in @ARGV, the items will be
interpreted as file names and <> will read from them instead.
Without qualifiers, your statement implied that <> always reads from
STDIN, and that is not exactly true.
-Joe
------------------------------
Date: Sun, 16 Jan 2005 12:54:59 -0000
From: "Leonard Challis" <perl@lennychallis.co.uk>
Subject: Low level data manipulation in Perl
Message-Id: <csdo6v$60e$1@newsg2.svr.pol.co.uk>
Hi everyone,
I have spent a few hours looking on Google, Perl.com, CPAN etc to try find
some information on messing about with low leveldata in Perl. I am talking
about opening files and looking at them in their very simplest format, 1s
and 0s.
What I have noticed from my searches so far is things like pack(), unpack(),
binmode() and some other stuff, but not really what I'm looking for, AFAIK.
If anyone could even just point me in the right direction, maybe just the
proper keywords to use in google to find some articles and tutorials on this
kind of task in Perl I would much appreciate it.
Thanks a lot,
Lenny Challis
------------------------------
Date: Sun, 16 Jan 2005 15:16:19 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Low level data manipulation in Perl
Message-Id: <cse0g6$hpg$1@slavica.ukpost.com>
Leonard Challis wrote:
> I have spent a few hours looking on Google, Perl.com, CPAN etc to try find
> some information on messing about with low leveldata in Perl. I am talking
> about opening files and looking at them in their very simplest format, 1s
> and 0s.
>
> What I have noticed from my searches so far is things like pack(), unpack(),
> binmode() and some other stuff, but not really what I'm looking for, AFAIK.
In what way are they not what you are looking at? Appart fromm those
three there's also vec().
------------------------------
Date: Mon, 17 Jan 2005 01:50:59 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: Low level data manipulation in Perl
Message-Id: <34vgr5F4flkv8U1@individual.net>
Leonard Challis wrote:
> Hi everyone,
>
> I have spent a few hours looking on Google, Perl.com, CPAN etc to try find
> some information on messing about with low leveldata in Perl. I am talking
> about opening files and looking at them in their very simplest format, 1s
> and 0s.
>
> What I have noticed from my searches so far is things like pack(),
> unpack(), binmode() and some other stuff, but not really what I'm looking
> for, AFAIK.
>
> If anyone could even just point me in the right direction, maybe just the
> proper keywords to use in google to find some articles and tutorials on
> this kind of task in Perl I would much appreciate it.
>
> Thanks a lot,
> Lenny Challis
Pack/unpack easily translate to hexadecimal, and conversion to binary from
there is trivial.
But Perl has the full complement of bit twiddling operators anyway (similar
to C).
gtoomey
------------------------------
Date: Sun, 16 Jan 2005 04:00:52 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Opening a text file and editing its contents
Message-Id: <Lb2dncBkC7vrynfcRVn-ig@comcast.com>
Previous post:
>> open my $file, '<', $ARGV[0] or die "Could not open file. $!";
>> while (<$file>){
>> s/<(Ra|N\d)>//;
>> s!^(.\w\w)( \d+):(\d+)!$1/$2/$3!;
>> print;
>> }
toomanyjoes@mail.utexas.edu wrote:
> I'm assuming the print command on the last line is the command
> that actually executes the changes above?
No, it does not. The changes are performed by the s/// operators.
> My question is by using $ARGV[0] (What exactly is this doing in this case)
@ARGV is a way of passing file names as command-line arguments.
As in `perl myprog.pl infile.txt`.
> how does the compiler know what file $file is?
In the above code, $file is not a file and it is not a file name.
It is a file handle. The file handle is activated by open()
and utilized by <$file>.
> Should I set ARGC[0] equal to the filename in a line above?
No, you set it by specifying the filename on the command line.
If wish to hard-code the file name, use
my $filename = 'inputfile.txt';
open my $file, '<', $filename or die "Can't open $filename: $!\n";
> When I run the code as you have shown it I get no output and no
> changes are made to the text file.
Since you did not specify a filename on the command line, your
script is waiting for you to manually type in some lines of text.
It will continue to read from STDIN (your keyboard) until you
type the end-of-file character(s), such as Control-D or
Control-Z + Enter.
-Joe
------------------------------
Date: Sun, 16 Jan 2005 04:18:51 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Perl 5.6.0 Compatible With Windows 2003?
Message-Id: <D-ydnY9JfKMyxnfcRVn-ug@comcast.com>
basis_consultant@hotmail.com wrote:
> I was unable to find a Website to confirm whether or not Perl
> v5.6.0 compatible with Win 2003. Does anybody know?
Of course it is compatible.
One question you can ask is "are there specific bugs in v5.6.0
(which were fixed in v5.6.1) that will affect me running it on Windows?".
> The perl scripts seem to work, except for the fact that the pictures
> are not successfully inserted into Oracle. The Perl script indicates an
> 'unable to open temporary file at (eval 9)..'
1) Have you verified that the jpeg files were successfully uploaded?
2) Is the correct default directory being used when it runs?
3) The 'unable to open temporary file' line in your program should
be changed to include the file name and the error code, such as
open(...) or die "Unable to open temporary file $file - $!";
> any ideas on solving Perl's 'unable to open temporary file
> at (eval 9)..'
Print the string before eval()ing it. Send it to a log file if
needed. You'll need to determine exactly what was given to
eval() to debug this.
-Joe
------------------------------
Date: Sun, 16 Jan 2005 07:59:03 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Perl error
Message-Id: <slrncuksp7.dd3.tadmc@magna.augustmail.com>
Peter Wyzl <wyzelli@yahoo.com> wrote:
> "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."
>: use strict;
>: use warnings;
>:
>: missing.
>
> At least 'use strict;' must exist in the real script, hence the error.
That is wrong on at least 2 counts.
First, it is a warning, not an error.
> I suspect the absence of 'my' in front of $data is the cause of this
> specific error,
Second, the message has nothing to do with strictures.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 16 Jan 2005 08:00:23 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Perl error
Message-Id: <slrncuksrn.dd3.tadmc@magna.augustmail.com>
quartet <travisq@gmail.com> wrote:
> uninitialized value in string at ./xmldoc line 16."
^^^^^^^
[snip 12-line program]
^^^^^^^
Please do not lie to us.
Please do not waste our time.
Please post the actual failing code if you want help
fixing the failed code.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Jan 2005 05:36:42 -0800
From: beliavsky@aol.com
Subject: Re: Print question
Message-Id: <1105882602.461293.248860@z14g2000cwz.googlegroups.com>
>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_[*].
At least one "young researcher" likes Fortran -- I am in my 30's.
I think the reasons for using Fortran are not entirely historical. For
numerical work involving arrays, especially multi-dimensional arrays,
Fortran 90/95 is arguably a higher-level language than C or C++. It is
easy to dynamically allocate multidimensional arrays, pass them to
functions and subroutines, and perform operations on whole arrays and
array sections, as in Matlab.
Joel Spolsky wrote,
"I've mentally divided the world into three groups. The largest group
of people can't program at all. There's another, smaller group of
people who can program, but not with pointers. And there's a tiny group
of people who can program, even with pointers. Those elite few can even
understand what it means to write CString*& in C++."
The middle group that can program but cannot grasp pointers can still
use Fortran :).
Of course, C++ is a rich and powerful language that can be used for
almost any programming task.
------------------------------
Date: 16 Jan 2005 13:54:59 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Print question
Message-Id: <Xns95E05AB5D3778asu1cornelledu@132.236.56.8>
Michele Dondi <bik.mido@tiscalinet.it> wrote in
news: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]
...
>>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...
This is getting really off-topic here but I just wanted to point out
that it is very easy to own a copyright. At least according to U.S. law
(as far as I know), you own the copyright to everything you produce the
moment you produce it (and put a copyright notice on it) unless you
explicitly state otherwise.
Copyright covers exact or substantial reproduction of something. So he
owns the copyrights to his scripts. He might have taken the extra step
of registering his copyright. That might have made him feel really
important.
His attitude regarding learning Perl has proved that he is a clown in
the same league as "Robin", at least in this arena. While I am not going
to rule out the possibility that he is another Einstein biding his time
at the patent office, I am sceptical and mostly annoyed with his posts
right now.
Sinan
------------------------------
Date: Sun, 16 Jan 2005 04:40:44 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: system command on Win98
Message-Id: <W_-dnRTYCuZS_XfcRVn-qw@comcast.com>
Mike Flannigan wrote:
> system 'start lltost.fch' does work, thanks to Sinan pointing
> that out. Not sure why 98 needs that 'start' in there, but
> apparently it does.
The argument to perl's system() function needs to be the name
of an executable program or command, not a document.
The 'start' command determines which application to run
based on the document's name.
------------------------------
Date: Sun, 16 Jan 2005 07:45:09 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: utf-8, was Re: Three questions: UTF-8, DBM, hash of lists, ...
Message-Id: <slrncukrv5.dd3.tadmc@magna.augustmail.com>
Wes Groleau <groleau+news@freeshell.org> wrote:
> Alan J. Flavell wrote:
>> There are no special awards for folding several questions into one
>
> No rewards expected or requested.
>
>> hanging-off the original posting. Confusion all round.
>
> Welcome to Usenet.
So long then.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 16 Jan 2005 11:40:05 GMT
From: Larry <dontmewithme@got.it>
Subject: Re: VB to Perl
Message-Id: <dontmewithme-A00834.12395016012005@twister2.tin.it>
In article <Xns95DFA6CB41C29asu1cornelledu@132.236.56.8>,
"A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:
> Here's some untested code. Enjoy!
I can not thank you enough!! That made my life a lot easier!
I just need you to spell out the chunk of code below:
Win32::API->Import(winmm => q{
LRESULT waveInGetDevCaps(
UINT_PTR DeviceID,
LPWAVEINCAPS pwic,
UINT cbwic
)}
);
I feel to know the "import" function but it'd be great if you could tell
me what "LRESULT","UINT_PTR","UINT_PTR" and "UINT" are meant to be!
thanks again!!!
------------------------------
Date: 16 Jan 2005 13:28:25 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: VB to Perl
Message-Id: <Xns95E05634E2CC7asu1cornelledu@132.236.56.8>
Larry <dontmewithme@got.it> wrote in
news:dontmewithme-A00834.12395016012005@twister2.tin.it:
> In article <Xns95DFA6CB41C29asu1cornelledu@132.236.56.8>,
> "A. Sinan Unur" <1usa@llenroc.ude.invalid> wrote:
>
>> Here's some untested code. Enjoy!
>
> I can not thank you enough!! That made my life a lot easier!
>
> I just need you to spell out the chunk of code below:
>
> Win32::API->Import(winmm => q{
> LRESULT waveInGetDevCaps(
> UINT_PTR DeviceID,
> LPWAVEINCAPS pwic,
> UINT cbwic
> )}
> );
>
> I feel to know the "import" function
We are talking about the "Import" method of the Win32::API module here.
Case matters.
> but it'd be great if you could tell me what
> "LRESULT","UINT_PTR","UINT_PTR" and "UINT" are meant to
> be!
We are talking about the Windows API here. So, you need to head on over
to Microsoft's web site and read about it there:
<http://tinyurl.com/3wogu>.
These are mnemonics for C typedefs. Roughly, you can read them as
LRESULT = "Long Result"
UINT = "Unsigned Integer"
UINT_PTR = "Pointer to Unsigned Integer"
I used LRESULT rather than MMRESULT because I did not have time to check
the typedef for MMRESULT. It seemed to work on XP32 but looking at the
header file, I see that MMRESULT is typedef'ed to UINT on 32 bit
platforms. There is no guarantee that MMRESULT will not be typedef'ed in
to something else on. say, XP64.
This is drifting off-topic for this group. If you have questions about
the Windows API's there are other fora dedicated to various parts of it.
If you are going to be using the Windows API, you should probably
download and install the Platform SDK available from Microsoft at least
to have the header files available so you can check this sort of stuff.
Sinan
------------------------------
Date: Sun, 16 Jan 2005 07:48:52 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: VB to Perl
Message-Id: <slrncuks64.dd3.tadmc@magna.augustmail.com>
Wes Groleau <groleau+news@freeshell.org> wrote:
> "J???????????????????????????????????" wrote:
>> waveInGetDevCaps(0, $Caps{VarPrt}, $Caps{Len});
>
> Yes, but I think the OP wants us to tell him/her
> how to write waveInGetDevCaps in perl. :-)
That's easy!
You write it like this:
wave_in_get_dev_caps()
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
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 7657
***************************************