[13286] in Perl-Users-Digest
Perl-Users Digest, Issue: 696 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 1 14:17:20 1999
Date: Wed, 1 Sep 1999 11:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 1 Sep 1999 Volume: 9 Number: 696
Today's topics:
:)) but86@my-deja.com
appending one file to another marcza@my-deja.com
Re: Calling Perl from C (Win32) jonsson@sii.com
Re: Can I have a subroutine return a hash? <aqumsieh@matrox.com>
Re: Case insensitive SQL query (elephant)
CGI DownLoad File on the PC Client <Edouard.Ouin@tinet.ie>
Re: directory processing (Bill Moseley)
Re: editors?? (Jenda Krynicky)
How to automate a batch job with parameter in perl <dazimi@yahoo.com>
How to automate a batch job with parameter in perl teamlinux@my-deja.com
How to delete hash file? (Shigio Yamaguchi)
Re: Mail including HTML tag... (Jenda Krynicky)
Perl in Win32 ? <eric138@yahoo.com>
Perl wrapper on NT <paulsxxx@cascadelinear.com>
Re: Perl/ HTML form mail attachments (Jenda Krynicky)
PerlIS.dll won't work for me Steve@rossbyweather.com
POP3->new error/package detection/POP3mail marcza@my-deja.com
Re: PPT I have a diff XSUB (John Porter)
Re: regex bug: (?:\d{3})+ loses count (M.J.T. Guy)
shebang question for Win32 Perl/Apache <see.email.address@bottom.in.sig>
Re: Simulating Carriage Returns (Larry Rosler)
Re: Simulating Carriage Returns (Larry Rosler)
SSL and Perl <admin@wasi.com>
Re: STDIN, Arrays and Win32 (elephant)
Re: subtraction error <i_tel@my-deja.com>
Re: Tracking progress of a Net::FTP download (Bill Moseley)
Weird perl quirk??? <gvalley@mitre.org>
Re: Win32::EventLog Issue <tye@metronet.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 01 Sep 1999 16:42:02 GMT
From: but86@my-deja.com
Subject: :))
Message-Id: <7qjl0o$qae$1@nnrp1.deja.com>
Thanks a lot!
That was more I was ever expecting...
I will try this out as soon as I can.
:)
Werner
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 01 Sep 1999 17:30:34 GMT
From: marcza@my-deja.com
Subject: appending one file to another
Message-Id: <7qjnrq$sn9$1@nnrp1.deja.com>
If I want to append the contents of one file to another I could do that
by
...
open(OUTF, ">>app.out") || die "Error";
open(WORKFILE, "<in.dat") || die "Error";
print OUTF <WORKFILE>;
close(WORKFILE);
close(OUTF);
...
But is there a better (faster) way? I've looked into the manuals
and didn't found an append() built-in function.
Bye
Marcus
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 01 Sep 1999 17:19:21 GMT
From: jonsson@sii.com
Subject: Re: Calling Perl from C (Win32)
Message-Id: <7qjn6b$s5v$1@nnrp1.deja.com>
It is not question of embedding the Perl DLL, it is the question wha
happens when I use OLE AUtomation from with in the perl scripts?
> Yes it is possible. Read the perlembed documentation that comes with
your Perl
> distribution.
>
> Juergen Ibelgaufts
>
> ------------------------------------------------
>
> jonsson@sii.com schrieb:
> >
> > I'm working on a C project (NOT C++, can't use it because of some
> > limitation outside of my control) and need to link in Perl (I know
this
> > can be done..) BUT the trick is that the Perl Scripts I need to
execute
> > are using OLE Automation to access the Lotus Notes OLE Interface.
> >
> > Has anyone any idea if this is possible or not?
> >
> > Sverrir
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 1 Sep 1999 11:00:45 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Can I have a subroutine return a hash?
Message-Id: <x3y7lmawuar.fsf@tigre.matrox.com>
gremlin <gremlin_NO_SPAM_@ix.netcom.com> writes:
> I would like to call a subroutine and have that routine open up a file,
> add data to a hash, and return the new hash to the calling routine. I
> have everything working except getting the data back to the caller! Can
> anyone show me the declaration; call; sub. return statement that will
> make all this work?
In the future, consider showing us some code so that we would exactly
know how to help you. But, from what you told us, I can give you a
couple of examples. These example assume that you pass in a hash to
the subroutine, but can be easily modified.
1) A subroutine that takes a hash and returns a hash:
sub sub1 {
my %hash_in = @_;
my %hash_out;
# do something to fill up %hash_out
return %hash_out;
}
This would be called as so:
my %hash_out = sub1(%hash);
This approach can be potentially very slow if the hashes are big,
since they have to be placed on/retrieved from the stack everytime the
function is called.
2) A subroutine that takes a reference to a hash, and returns a
reference to a hash:
sub sub2 {
my $h_in_ref = shift;
my %hash_out;
# do something to fill up %hash_out
return \%hash_out;
}
This would be called as so:
my $new_hash_ref = sub2(\%hash);
Elements can be accessed as $new_hash_ref->{'key'}. See 'perldsc' for
more details.
3) This is what I would actually do (assuming your function just adds
new (key, value) pairs, or modifies existing ones in that hash).
A subroutine that takes in a reference to a hash, and modifies that
hash directly:
sub sub3 {
my $h_in_ref = shift;
# modify $h_in_ref as you wish:
$h_in_ref->{'key1'} = 'val1';
$h_in_ref->{'key2'} = 'val2';
# no need to return anything
}
This would be called as so:
sub3(\%hash);
This last approach would be the fastest, and least
memory-consuming. These might or might not be issues, depending on
your application.
HTH,
--Ala
------------------------------
Date: Thu, 2 Sep 1999 03:20:36 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: Case insensitive SQL query
Message-Id: <MPG.12380b6f6545b879989ca1@news-server>
first .. please try to follow the posting guidelines for usenet by
putting your reply AFTER the text that you're replying to - it just
makes more sense
mrbog@my-deja.com writes ..
>Oh please, SQL is obviously tangentially related to perl.
guess again .. some of us will program Perl our whole lives without ever
going near a database - there is no more relation between Perl and MySQL
than between Perl and Microsoft Word .. it'd sure get busy in here if
people looking for help with Word specific questions started asking
>Not only that but I'm sure my question is a common one and doesn't
>require heaps of documentation to solve.
a) it's far more common in MySQL discussion forums - and MySQL
documentation
b) it's not as common as you probably think in c.l.p.misc (I've never
seen it asked before)
c) "How do I add a bookmark to my Word Document ?" is probably a very
common question too - and also a question that would not require heaps
of documentation to solve .. BUT IT'S STILL NOT A PERL QUESTION !!
>And BTW mysql.com doesn't solve my problem.
then you didn't look hard enough
<jeopardy post deleted>
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Wed, 01 Sep 1999 17:02:05 +0000
From: Edouard Ouin <Edouard.Ouin@tinet.ie>
Subject: CGI DownLoad File on the PC Client
Message-Id: <37CD5C0D.CB1DCC62@tinet.ie>
Hi,
Is it a way to download a file directly to the client via the "save as"
generic window to save a file on the local machine.
PS: in perl of course, via CGI if it's possible.
Thank's
--
---------------------------------------------------------
Edouard Ouin
Telecom Internet Tel: (353) 1 701 0182
Unit B, East Point Business Park Fax: (353) 1 701 1086
Fairview http://www.tinet.ie
Dublin 3 Edouard.Ouin@tinet.ie
Ireland Mobile : 087 289 0934
------------------------------
Date: Wed, 1 Sep 1999 09:17:04 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: directory processing
Message-Id: <MPG.1236e131802efef09896e5@nntp1.ba.best.com>
Laurent Cordon (Laurent.Cordon@afp.com) seems to say...
> I would like to update a file in a directoty
You don't need our permission. You need to simply have permissions.
Is your problem you don't know what file to open? Or want to open it
for read/write?
perldoc -f open
perldoc -f glob
perldoc -f opendir
perldoc -f readdir
perldoc File::Find
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Wed, 01 Sep 1999 16:35:15 GMT
From: Jenda@Krynicky.cz (Jenda Krynicky)
Subject: Re: editors??
Message-Id: <1103_936203715@prague_main>
On Tue, 31 Aug 1999 21:16:47 -0300, "Caper" <stevencNOSPAM@nbnet.nb.ca> wrote:
> Any good Perl debuggers or editors to suggest?
Hmm, this is a religious issue. And of course it depends on your OS.
And your kink. ;-)
I use PFE as my editor.
- http://www.lancs.ac.uk/people/cpaap/pfe
and ptkdb for debuging
- http://world.std.com/~aep/ptkdb/
Both free.
Jenda
http://Jenda.Krynicky.cz
------------------------------
Date: Wed, 1 Sep 1999 13:23:03 -0400
From: "Lex" <dazimi@yahoo.com>
Subject: How to automate a batch job with parameter in perl
Message-Id: <7qjnj6$nft$1@clio.net.metrotor.on.ca>
Hi Everyone;
I need to run a batch job everyday at specified time with a date parameter
such as
startjob.bat 0831
for the 31th of August if that is the today's
date or
Startjob.bat 0901.
(The date should be the today's date).
I know that I can schedule the job to run at the specific time using the
'at' scheduler in NT but how can I automate the part where I have to type
the date everyday and of course I would like to use perl.
Thanks very much for your support and please send reply's to
dazimi@oradev.csis.csd.metrotor.on.ca
------------------------------
Date: Wed, 01 Sep 1999 17:31:15 GMT
From: teamlinux@my-deja.com
Subject: How to automate a batch job with parameter in perl
Message-Id: <7qjnt3$snm$1@nnrp1.deja.com>
Hi Everyone;
I need to run a batch job everyday at specified time with a date
parameter such as
startjob.bat 0831
for the 31th of August if that is the
today's date or
Startjob.bat 0901.
(The date should be the today's date).
I know that I can schedule the job to run at the specific time using
the 'at' scheduler in NT but how can I automate the part where I have
to type the date everyday and of course I would like to use perl.
Thanks very much for your support and please send reply's to
dazimi@oradev.csis.csd.metrotor.on.ca
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 1 Sep 1999 17:50:03 GMT
From: shigio@wafu.netgate.net (Shigio Yamaguchi)
Subject: How to delete hash file?
Message-Id: <7qjp0b$7iv$1@news2.dti.ne.jp>
Hello,
Would you please tell me the way to delete hash file?
#!/usr/bin/perl
dbmopen(%CACH, "file", 0600);
$CACH{'key'} = 'value';
dbmclose(%CACH);
Above script leaves file named 'file.db' in current directory on my
FreeBSD 2.2.8R box. But it seems that suffix 'db' depends on which DBM
library is used. For example, if ndbm is used then it may 'file.pag' and
'file.dir'.
What the best way to delete hash file in any case?
Thank you in advance.
--
Shigio Yamaguchi - Tama Communications Corporation
Mail: shigio@tamacom.com, WWW: http://www.tamacom.com
------------------------------
Date: Wed, 01 Sep 1999 16:36:48 GMT
From: Jenda@Krynicky.cz (Jenda Krynicky)
Subject: Re: Mail including HTML tag...
Message-Id: <1104_936203808@prague_main>
On Wed, 1 Sep 1999 01:55:54 +0900, "W cube Desichnology"
<wcube@thrunet.com> wrote:
> I want your help...
> I wanna know how to mail with sendmail including HTML tag in perl.
> May I need some special module?
> Or, May I need header setting?
There are a few. See eg. http://Jenda.Krynicky.cz/#Mail::Sender
Jenda
http://Jenda.Krynicky.cz
------------------------------
Date: Thu, 02 Sep 1999 01:01:32 +0800
From: "Chow Hoi Ka, Eric" <eric138@yahoo.com>
Subject: Perl in Win32 ?
Message-Id: <37CD5BEB.D56700AD@yahoo.com>
Hello,
I am a beginner in Perl programming.
Would you please to teach me how to use Ms-Access database in Perl ?
Or give me some examples ???
Best regards,
Eric
--
_ _
/ ) |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ( \
/ / | | \ \
_( /_ | _ Chow Hoi Ka, Eric _ | _) )_
(((\ \> |/ ) ( \| </ /)))
(\\\\ \_/ / \ \_/ ////)
\ / E-Mail : eric138@yahoo.com \ /
\ _/ \_ /
/ / |____________________________________________| \ \
/ / \ \
------------------------------
Date: Wed, 01 Sep 1999 09:10:43 -0700
From: Paul Alan Spitalny <paulsxxx@cascadelinear.com>
Subject: Perl wrapper on NT
Message-Id: <37CD5003.6C7EF964@cascadelinear.com>
Hi,
I'm going to upgrade to using NT from Win95. When I have run Perl 5 in
the past, I have written .bat files with the following "wrapper:"
@echo off
perl -x -S %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
#! /usr/bin/perl
__END__
:endofperl
Then, in my autoexec.bat file I include the location of perl.exe in the
"PATH" variable. Then, to run a script I open the DOS prompt and type in
the name of the script (without having to type the .bat extension).
O.K. I'm finally leading up to my question(s).
1) Do I still need the wrapper when using PERL 5.005 on NT ?
2) The #! /usr/bin/perl line in the above wrapper is useless isn't
it? (any line starting with # is a comment, right?)
3) What exactly did the above wrapper do. I never really did understand
it.
4) To run PERL 5.005 on NT can I still NOT have to type: "perl
fred.bat" to run the script fred.bat from a DOS prompt? That is, how
does NT "know" where perl.exe lives? My goal is to be able to type
"fred" at the dos prompt, hopefully avoiding typing the file extension
and the word "perl"
5) Since I will run perl scripts from the DOS prompt, does that mean I
only get 16 bit performance, or do I get 32 bit performance?
Any comments greatly appreciated.
Thank you,
Paul
--
To email me directly you must remove the xxx after pauls (sorry for the
inconvenience but I'm getting spammed big time)
------------------------------
Date: Wed, 01 Sep 1999 16:38:10 GMT
From: Jenda@Krynicky.cz (Jenda Krynicky)
Subject: Re: Perl/ HTML form mail attachments
Message-Id: <1105_936203890@prague_main>
http://Jenda.Krynicky.cz/#Mail::Sender
------------------------------
Date: Wed, 01 Sep 1999 17:39:29 GMT
From: Steve@rossbyweather.com
Subject: PerlIS.dll won't work for me
Message-Id: <7qjoce$t4n$1@nnrp1.deja.com>
I have read through newsgroups and multiple FAQ's with no solution.
While trying to speed things up using PerlIS.DLL instead of Perl.exe on
IIS 4.0 I ran into a problem. I downloaded the newest build of Perl
from ActiveState and my old CGI programs work fine, but when I change
the mappings on IIS 4.0 from .cgi perl.exe %s %s to .cgi perlis.dll the
scripts don't work properly. I added the HTTP/1.0 200 OK line in there
and that didn't work. I added the proper script map in the registry
and nothing works. I created the simple helloworld.cgi file and ran
that, and now I get an error saying the helloworld script produced no
output.
Can somebody please help?
--Steven Shaw
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 01 Sep 1999 17:26:07 GMT
From: marcza@my-deja.com
Subject: POP3->new error/package detection/POP3mail
Message-Id: <7qjniv$sjb$1@nnrp1.deja.com>
I am using the Net::POP3 package similar to
$mail_server = "...";
...
$pop = Net::POP3->new($mail_server) or
&error("Error: Can't open connection to $mail_server: $!\n");
$pop->login($username, $id2) or
&error("Error: Can't authenticate: $!\n");
...
This gives an error msg:
Can't locate object method "new" via package "Net::POP3" at
/usr/xxx/cgi-bin/sndpop.pl line 134.
Why ?
BTW: &error is only a errorout routine.
How can I detect (from within the perl script) if the package
Net::POP3 is already installed ? (Without asking the busy
sysop). I guess if the $mail_server specification would be wrong
another error msg would appear.
Sometimes a Mail::POP3Client is recommended. Which of the two packages
are more used ?
Bye
Marcus
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 01 Sep 1999 16:31:35 GMT
From: jdporter@min.net (John Porter)
Subject: Re: PPT I have a diff XSUB
Message-Id: <slrn7sql77.2ml.jdporter@min.net>
In article <7qjhl8$noj$1@nnrp1.deja.com>, agutier@my-deja.com wrote:
>I have an XSUB that is based off of GNU diff. It works very well. It
>runs under Linux and Windows NT. What do I do now? How do I submit it
>to PPT?
Unfortunately, this does not qualify for PPT, because the goal of
PPT is to implement in Pure Perl.
--
John Porter
------------------------------
Date: 1 Sep 1999 16:48:39 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: regex bug: (?:\d{3})+ loses count
Message-Id: <7qjld7$9fs$1@pegasus.csx.cam.ac.uk>
In article <7qhc4l$g9u$1@charm.magnus.acs.ohio-state.edu>,
Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
>[A complimentary Cc of this posting was sent to M.J.T. Guy
><mjtg@cus.cam.ac.uk>],
>who wrote in article <7qgvq0$3gu$1@pegasus.csx.cam.ac.uk>:
>> So you should think of 5.005_02 as a development release. Anyone
>> running it should upgrade to 5.005_03 immediately.
>
>I think the same about 5.005_03. IME 5.005_03 is much less stable
>than other development releases (say, 5.005_56, which practically
>should be of production quality).
I should perhaps have been clearer by what I meant by "serious bugs",
production quality" etc.
5.005, 5.005_01 and 5.005_02 all had new bugs which the developers were
aware of, which were not present in previous production releases.
So upgrading to these versions could have been a retrograde step.
AFA I recall, 5.005_03 had no such known bug at the time of its release
as latest.tar.gz . And offhand, I don't know of any such bug
reported since.
OTOH the production releases so far *do* have such bugs introduced
since 5.005_03. Your recent run-in with join() provides a convenient
example.
Of course, the above doesn't apply to bugs in newly introduced features,
nor to bugs in features which are explicitly marked as "experimental",
since they raise no backward-compatibility problems. So for example
if you are playing with threads, the development releases are a much
better bet that 5.005_03. But don't expect producrion-quality
reliability.
Mike Guy
------------------------------
Date: Wed, 01 Sep 1999 10:09:29 -0700
From: Daniel Kirkdorffer <see.email.address@bottom.in.sig>
Subject: shebang question for Win32 Perl/Apache
Message-Id: <37CD5DC9.6D57020C@bottom.in.sig>
I recently installed Apache 1.3.9 on my Win95 box to put the OS
to good use ;^) and I've been hunting down solutions to a problem
with the shebang line that starts all my Perl scripts so that I can
continue to write #!/usr/bin/perl (which is where Perl is on
the Linux production box), rather than #!c:\perl\bin\perl .
The closest I've been able to come is to create a directory
at c:\usr\bin to house a copy of perl.exe, and use
#!c:/usr/bin/perl locally (because it at least works with forward
slashes).
Has anyone been able to do this so that they can omit the
"c:" entirely? Or am I SOL and going to have to always remember
to modify this when I upload to production?
Unfortunately, not using the Win95 OS is not an option right
now.
Thanks in advance,
Dan
--
Daniel Kirkdorffer
Email: webmaster 'at' disciplineglobalmobile 'dot' com
------------------------------
Date: Wed, 1 Sep 1999 08:59:23 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Simulating Carriage Returns
Message-Id: <MPG.1236ed3120720ee5989f03@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <7qjfq9$m8k$1@nnrp1.deja.com> on Wed, 01 Sep 1999 15:13:26
GMT, Stone Cold <paulm@dirigo.com> says...
> Um, thanks for the info (I think). I was using the localtime() module
> but when I print the output to a file, it wouldn't put zero's in front
> of the month or day if the string was 1. For example, if the current
> date was 1999-9-1, it would print the date as 1999-9-1. I need it in
> the form of 1999-09-01, therefore if the length of the month and/or day
> is 1 digit, then it needs to add a zero. Make sense?
>
> I guess I could manipulate the localtime output, but wasn't familiar
> with the length function. I need to write an if statement?
No. Though that is done in some of the awful scripts floating around.
perldoc -f sprintf
Note particularly the field-width specifier. For your desired (ISO-
standard) form, the format would be '%d-%.2d-%.2d'.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 1 Sep 1999 09:00:34 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Simulating Carriage Returns
Message-Id: <MPG.1236ed7fc6e3a187989f04@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <7qjg0b$mc7$1@nnrp1.deja.com> on Wed, 01 Sep 1999 15:16:41
GMT, Stone Cold <paulm@dirigo.com> says...
> I could use the localtime mod, but it doesn't print out zeros in front
> of the months and/or days that are only 1 digit (e.g. 1999-9-1 --->
> need this to be 1999-09-01).
>
> Any experience with the length statement? Need to write an if
> statement that will print out "01" if month/day is 1 digit.
Asking the same question twice won't get you two answers. Actually,
perhaps it will, where one of them will be derisive.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 1 Sep 1999 12:20:08 -0500
From: "RLD" <admin@wasi.com>
Subject: SSL and Perl
Message-Id: <7qjnev$4ts$1@hyperion.nitco.com>
Hello,
Trying to design a script that will in the background pass payment
information from a secure server to a secure server ( processing site ).
Can anyone lend a hand in how I would accomplish this? All I've seen
available so far is Net::SSLeay which I guess is what I need, however
installing the modules has proven to be a nightmare... is there another way?
Can LWP modules be tweaked possibly to allow for this type of Post?
Please CC my email wasi@netnitco.net if you can.
Thank you,
RL
------------------------------
Date: Thu, 2 Sep 1999 02:40:44 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: STDIN, Arrays and Win32
Message-Id: <MPG.1238021845b7e4c0989ca0@news-server>
Philip M. Cohen writes ..
>elephant wrote:
>
>> other people have said that ^D is actually the EOF character on Win95 ..
>> if you're in the experimentation mood - perhaps you could try using ^D
>> as the termination character in both the "copy con" and in the STDIN
>> input to perl
>
>At least on my system, ^D is just another character; it just puts a diamond
>character into the file (with copy con) or Perl STDIN array. Only ^C
>(kill) and ^Z (EOF) terminate anything; everything else just seems to
>stick a character into the file, unprintable in the case of ^F ^H ^I ^J ^M ^P.
>(I dunno about ^F; it doesn't make a BEL sound, though.)
I see the same behaviour on WinNT (although I had to test ^C before I
believed it)
I don't know what Perl installation other posters were testing against
to get the Win95 results they reported
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Wed, 01 Sep 1999 17:32:57 GMT
From: hojo <i_tel@my-deja.com>
Subject: Re: subtraction error
Message-Id: <7qjo09$soq$1@nnrp1.deja.com>
Thank You all for your insight. We will go with the hold number thing
as it seems to work fine. So much for my getting righ on floating point
errors!
Thanks
In article <37CD25E4.7908536D@Mark.Com>,
Mark <Mark@Mark.Com> wrote:
>
>
> Larry Rosler wrote:
> <Snip>
>
> > The only way it can help is by papering over a fundamentally flawed
> > approach -- dealing with dollars and cents as floating-point numbers
in
> > dollar units, instead of as integers in cent units.
> >
> > It should be ingrained into all programmers not to do this in
financial
> > calculations! This is a basic issue of professional competence.
>
> Hear, Hear!
>
> I have spend a number of months working on a billing system developed
by a
> 'reputable' software house that represents
> currency as floating points. Jeez, the trouble we had trying to sort
it out.
> The only solution was to reengineer the whole thing,
> code, database tables, etc, etc. Ignorance of basic maths, I'd say.
>
> Programming 1.0.1!
>
> >
> >
> > --
> > (Just Another Larry) Rosler
> > Hewlett-Packard Laboratories
> > http://www.hpl.hp.com/personal/Larry_Rosler/
> > lr@hpl.hp.com
>
>
--
=-=-=-=-=-=-=-=-=-=
David Hajoglou
Sys. Admin., Abbreviator
=-=-=-=-=-=-=-=-=-=
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 1 Sep 1999 09:45:41 -0700
From: moseley@best.com (Bill Moseley)
Subject: Re: Tracking progress of a Net::FTP download
Message-Id: <MPG.1236f80f83b775219896e6@nntp1.ba.best.com>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
cb (ecliptica.ww@nospam.virgin.net) seems to say...
> I'm working on a Perl program which automates a regular download of
> files using Net::FTP with Perl 5.005 and FreeBSD 3.2 UNIX on a P2/300.
> It works fine, but, as it is, the best ways I can come up with of
> telling whether the download is proceeding normally are (1) watch the
> Hard Drive light to see whether stuff is being written to disk, or (2)
> open another TTY console and issue "ls -l [filename]" commands to see
> (hopefully) the number of bytes increasing.
I'm not sure about Net::FTP, but if you use LWP::UserAgent you can do
this. There's an example in perldoc lwpcook
--
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.
------------------------------
Date: Wed, 01 Sep 1999 13:33:56 -0400
From: Gary Valley <gvalley@mitre.org>
Subject: Weird perl quirk???
Message-Id: <37CD6384.BD1716EE@mitre.org>
Hi,
I have a script running through two lists of records trying to determine
if their titles and names are similar. This is what it looks like soo
far:
for( $i = 0; $i < $numberRecords; $i++ ) {
for( $j = 0; $j < $count; $j++ ) {
$testName = quotemeta( $data[$j]{name} );
$testTitle = quotemeta( $data[$j]{title} );
if(( $correct[$i]{Name} =~ /$testName/ ) &&
( $correct[$i]{Title} =~ /$testTitle/ )) {
#correct the records...
}
}
}
My problem occurs only when $correct[$i]{Title} and $testTitle are both
null. It should still fall through and correct the records (because
they are equal), but it doesn't. (Anyone know why???) I checked to
ensure that the statement ( $correct[$i]{Name} =~ /$testName/ ) returns
a true value as well as ( $correct[$i]{Title} =~ /$testTitle/ ). Both
return true on the same set of records when checked separately.
(Meaning that when $i = 0 and $j = 377 they are both true when checked
separately.) However, when I "and" them together, they return false. I
need some help here folks... I'm outta ideas.
Thanx in advance.
-gary
--
Gary Valley
The MITRE Coporation
Phone: (703)-883-3359
Fax: (703)-883-7978
gvalley@mitre.org
------------------------------
Date: 1 Sep 1999 11:33:17 -0500
From: Tye McQueen <tye@metronet.com>
Subject: Re: Win32::EventLog Issue
Message-Id: <7qjkgd$dbc@beanix.metronet.com>
"Tom Lichti" <tom_lichti@interactivemedia.com> writes:
) >I am using this module to remotely access/monitor a number of NT Server
) >event logs, and it seems to work fine except for one thing: the actual
) >event message is not always returned
)
) After much head scratching and trial and error, I discovered the problem: if
) the item (either hardware or software) does not exist on the machine you are
) monitoring _from_, the message does not get built correctly. I believe it
) has to do with some resource files (dll's, I assume) that don't exist on the
) monitoring machine, so the formatmessage function fails. I can only assume
) this is the problem from what I read in the Win32 API reference documents,
) and investigation of the failed messages bears this out.
There are also the Registry entries under CCS/Services/EventLog/
which [I think] are needed for the API to find which *.dll to use
to find the "message resources".
Hmmm... I bet we could write a sub that copies remote EventLog
Registry entries and transforms them to use the administrative
shares to remotely access the message resources.
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 696
*************************************