[8550] in Perl-Users-Digest
Perl-Users Digest, Issue: 2167 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 23 19:08:22 1998
Date: Mon, 23 Mar 98 16:00:28 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 23 Mar 1998 Volume: 8 Number: 2167
Today's topics:
Re: - Perl Script to Find & Display Matches.. - (Wef)
Re: Another novice needing RegExpr help.... (stephen benson)
Anyone out there used the Perl Compiler Kit? <mdg1@hidec.engr.uark.edu>
Re: Calling all Newbies (Mark Folse)
Re: checking for undefined elements in an array <lr@hpl.hp.com>
Re: checking for undefined elements in an array <merlyn@stonehenge.com>
Re: Creating a unique id number? (Abigail)
Re: Going Rates for PERL Programming??? <fp@pmpcs.com>
How to log input to different files in perl <lars-n@hsr.no>
Re: Im a dip so kill me ok! (John Callender)
Re: LWP doesn't do HTTP keepalives! <aas@sn.no>
Need help with Win32 File Functions <mdanna@ghg.net>
Re: Passing reference to array of hashes: a better way? <cmargoli@world.northgrum.com>
Perl Databases... <Bill.Lewis@mci.com>
Re: Perl system() calls on NT w/IIS (Mark Folse)
Re: sprintf rounding error (Mark-Jason Dominus)
Unix Sendmail equivalent for Perl Win32 and NTMail <dbozz@istar.ca>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 23 Mar 1998 22:18:04 GMT
From: wef@N0SPAM_wef.net (Wef)
Subject: Re: - Perl Script to Find & Display Matches.. -
Message-Id: <3516dccf.27755186@news>
Since you're storing all the found matches in a concatenated string
($results) is no way to cascade the match output...
You should re-write the script to store matches in an array.
if ($agency eq "ICL") {
push(@results,<tr><td align=center>$id</td>
<td>align=center>$agency</td> <td align=center>$title</td></tr>\n);
}
Then you'll need to completely re-write the output portions.... Est.
time to completion 2-4 hours.. Est. cost = 200-400 USD...
JWefler
wef@wef.net
On Mon, 23 Mar 1998 19:13:59 +0000, James <James@cydaps.nospam.co.uk>
wrote:
>
>
>
>Hi!
>
>Just as I thought I had found the solution, it all goes wrong again!
>I have developed the following script that is supposed to display any
>vacancies from a flat-text based file (at the bottom of this posting)
>that match the specific agency (in this case ICL). This part of the
>script works fine, the problems arise when it is supposed to display 10
>vacancies per page. There are 11 vacancies that should match in the
>database, and the various counts etc match perfectly, but *all* of the
>matching vacancies are shown, then when clicking on the Next Match
>button, no vacancies are shown (the figures are still correct though)
>and the button to say Pervious 10 Matches vanishes...
>
>I guess that my method of 'storing' the matching vacancies is wrong, but
>can anyone help me out on this one as I am desperately trying to get
>this to work...
>
>Thanks so much for any help offered with this, it is much appreciated!
>
>Best wishes
>
>
>James
>
>
>
>
>
>
>
>Example of the job_display.cgi script
>
>
>
>#!/usr/bin/perl
>
>
>$HitsPerPage = 10;
>$data = "data/vacancy-icl-sap.txt";
>$cgiurl = "/cgi-bin/job_display.cgi";
>
>require "find.pl";
>
>@day = (Sun,Mon,Tue,Wed,Thu,Fri,Sat);
>@month = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec);
>
>read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>@pairs = split(/&/, $buffer);
>foreach $pair (@pairs){
> ($name, $value) = split(/=/, $pair);
> $name =~ tr/+/ /;
> $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> $value =~ tr/+/ /;
> $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
> if ($FORM{$name}) {
> $FORM{$name} = "$FORM{$name}, $value";
> }
> else {
> $FORM{$name} = $value;
> }
>}
>
>
>$matchcount=0;
>
>open (data, "$data");
>@details = <data>;
>close (data);
>
>foreach $pair (@details) {
> ($id,$agency,$title) = split(/_/, $pair);
>
> if ($agency eq "ICL") {
> $results .= "<tr><td align=center>$id</td> <td
>align=center>$agency</td> <td align=center>$title</td></tr>\n";
> $matchcount++;
> }
>}
>
># SCRIPT OUTPUT
>
>print "Content-type: text/html\n\n";
>print "<HTML><HEAD><TITLE>ICL Vacancies</TITLE></HEAD>\n";
>print "<BODY BGCOLOR=\"#ffffff\" TEXT=\"#000000\">";
>print "<H1 ALIGN=CENTER>ICL Vacancies</H1>\n";
>print "<P ALIGN=CENTER><SMALL>";
>print "(<STRONG>$matchcount</STRONG> match";
>if ($matchcount == 1) {
> print " found)";
>}
>else {
> print "es found)";
>}
>print "</SMALL>\n";
>
>unless ($FORM{'first'}) { $FORM{'first'} = 1; }
>unless ($FORM{'last'}) { $FORM{'last'} = $HitsPerPage; }
>
>if ($matchcount == 0) {
> print "<P ALIGN=CENTER>There are currently no vacancies in the
>database!";
> print "</P>\n";
>}
>else {
> print "<P ALIGN=CENTER><STRONG>Matches $FORM{'first'} ";
> if ($matchcount < $FORM{'last'}) {
> print "- $matchcount</STRONG></P>\n";
> }
> else {
> print "- $FORM{'last'}</STRONG></P>\n";
> }
> print "<HR WIDTH=50%>\n";
> $Count = 0;
> print "<center><table width=\"90%\" border=0
>bgcolor=\"#cccccc\">\n";
>
> &PrintEntry;
>
> print "</table><center>\n";
> print "<P><CENTER><TABLE><TR>\n";
> if ($FORM{'first'} > 1) {
> print "<TD><FORM METHOD=POST ACTION=\"$cgiurl\">\n";
> print "<INPUT TYPE=HIDDEN NAME=\"first\" ";
> print "VALUE=\"",($FORM{'first'}-$HitsPerPage),"\">\n";
> print "<INPUT TYPE=HIDDEN NAME=\"last\" ";
> print "VALUE=\"",($FORM{'last'}-$HitsPerPage),"\">\n";
> print "<INPUT TYPE=SUBMIT ";
> print "VALUE=\"Last $HitsPerPage Matches\">\n";
> print "</FORM></TD>\n";
> }
> if ($FORM{'last'} < $matchcount) {
> print "<TD><FORM METHOD=POST ACTION=\"$cgiurl\">\n";
> print "<INPUT TYPE=HIDDEN NAME=\"first\" ";
> print "VALUE=\"",($FORM{'first'}+$HitsPerPage),"\">\n";
> print "<INPUT TYPE=HIDDEN NAME=\"last\" ";
> print "VALUE=\"",($FORM{'last'}+$HitsPerPage),"\">\n";
> print "<INPUT TYPE=SUBMIT VALUE=\"";
> $nextset = $matchcount-$FORM{'last'};
> if ($nextset == 1) {
> print "Next Match";
> }
> elsif ($nextset < $HitsPerPage) {
> print "Next $nextset Matches";
> }
> else {
> print "Next $HitsPerPage Matches";
> }
> print "\">\n</FORM></TD>\n";
> }
> print "</TR></TABLE></CENTER></P>\n";
>}
>
>print "</BODY></HTML>\n";
>
>exit;
>
># SUBROUTINES
>
>sub Get_Date {
> $mtime = time unless ($mtime);
> ($mday,$mon,$yr) = (localtime($mtime))[3,4,5];
> $date = "$mday $month[$mon] 19$yr";
> return $date;
>}
>
>sub PrintEntry {
> $Count++;
> next if ($Count < $FORM{'first'});
> last if ($Count > $FORM{'last'});
> print "$results";
>
>}
>
>sub ByDate {
> $aval = $mtime{$a};
> $bval = $mtime{$b};
> $bval <=> $aval;
>}
>
>sub ByValue {
> $aval = $truval{$a};
> $bval = $truval{$b};
> $bval <=> $aval;
>}
>
>
>########################### End of script
>
>
>
>Example of the vacancy-icl-sap.txt file
>
>
>1_ICL_IT Manager
>2_SAP_Systems Analyst
>3_ICL_Programmer
>4_ICL_Business Manager
>5_SAP_Sales Person
>6_ICL_Finance Director
>7_ICL_IT MANAGER
>8_ICL_Work Shop Assistant
>9_ICL_Manger
>10_ICL_Site Manager
>11_ICL_Jeweller
>12_ICL_IT Development Office
>13_ICL_CGI Developer
>
>
>
>
>
>james@cydaps.nospam.co.uk (please remove nospam. if emailing)
------------------------------
Date: Mon, 23 Mar 1998 23:38:31 GMT
From: stephenb@scribendum.win-uk.net (stephen benson)
Subject: Re: Another novice needing RegExpr help....
Message-Id: <3516f17e.25234184@nntp.ibmpcug.co.uk>
On Mon, 23 Mar 1998 04:29:26 GMT, doswald@xmission.com (David Oswald)
wrote:
My real problem is clearly I'm misunderstanding somewthing about
multilines; I couldn't get the phrase when it's cut across two lines.
Someone else said
>>>You're never going to match over multiple lines as long as you're reading in
>>>and matching against one line at a time.
>>>
>>>Perhaps you want to read in the entire file and iterate over a global match.
Which would seem to be the real problem. I want to grab a chunk of
text, an imported file, and replace it with its filename and URL as
an HREF I don't need to scan it line by line.
>Match: Any amount of anything at all or nothing until 'N' is reached.
Right; to catch extra/no space errors (WWNote is a common usage)
>Match the characters (in this order): 'Note'
>Match: Any amount or none of 's'
Yup. A newline and quite few spaces; this is where I fail miserably
>Match: Any amount of anything at all or nothing until 't' is reached.
>Match: 't' and 'o'
>Match: Any amount of anything or none at all until a digit.
I was getting desperate -- usually I used \s+ for the spaces (again to
catch errors), but I replaced them globally.
>Match: Any digit or nothing at all.
>Match: '.'
>Match: Any amount of digits with a minimum of one.
My attempt to get 5, 5.0, 12.45, 0.13 etc
>Load entire match so far into $1
...
>It just might be incredibly out of control,
>but of course the design of a RE is often also balanced with context;
>perhaps what you're matching is already in a predictable format and
>the fact that this RE matches such a broad range of strings isn't of
>concern.
>
It is theoretically predictable -- FrontPage output (ahem); but by the
end of the evening I was getting desperate, flailing around a bit... I
should have paid more attention to what version I posted. And I
shouldn't have mentioned J*v*s***t
-- stephen benson
stephenb@scribendum.win-uk.net || stephen_benson@watsonwyatt.co.uk
http://www.ibmpcug.co.uk/~2i/ || http://www.scribendum.win-uk.net/
__________________________________________________________________
------------------------------
Date: Mon, 23 Mar 1998 11:39:12 -0600
From: Michael Glover <mdg1@hidec.engr.uark.edu>
Subject: Anyone out there used the Perl Compiler Kit?
Message-Id: <35169E40.171A029D@hidec.engr.uark.edu>
I'm trying to compile a relatively simple program using the Perl
Compiler Kit (Alpha 3) and I'm hitting a snag.
My program uses the LWP library (LWP::UserAgent, to be exact). I can
make an executable from the Perl code successfully, but I keep getting
an error like "Can't locate object method "new" via package
"LWP::UserAgent" ... at line 9" whenever I attempt to run the
executable. Line 9 is: "$ua = new LWP::UserAgent;"
I know I should probably be using the -u option, but I can't seem to get
it to work.
Anyone have any command-line examples that I could try?
Mike
--
----------
Michael D. Glover
Research Associate / System Administrator
High Density Electronics Center (HiDEC) Tel: (501) 575-7292
University of Arkansas Fax: (501) 575-2719
Email: mdg1@hidec.engr.uark.edu
------------------------------
Date: Mon, 23 Mar 1998 16:42:59 -0600
From: markfolse@rocketmail.com (Mark Folse)
Subject: Re: Calling all Newbies
Message-Id: <markfolse-2303981643000001@192.168.254.2>
Perhaps a start would be trying to identify issues that aren't addressed
in the pods, faq, and specific binary faqs, or which are not addressed
clearly enough for someone who is not a 10-year unix sysadmin (or perhaps
not even using unix. One beef I have with the pods with the GS binary for
NT is that the pods are just the unix docs. I was just checking a problem
I've having, and I'm pretty sure NT doesn't exactly "fork a child process"
to execute system("string"), at least not in the way the folks who wrote
the documentation meant.)
Perhaps something a bit more catholic and accessible might come out of it.
But the people who've put sweat and blood into the docs and faq(s) have a
right to say, well, if you have a specific problem with a
pod/faq/whatever, you write a better or different one.
In article <P5eR.285$eq6.623286@katana>, "Doug Evans" <doug@ccinet.com> wrote:
>Hi,
>
>I would like to propose, that we "Newbies" set up a mail list, designed to
>help each other. I am "all the way up" to p. 25, of Learning Perl on Win32
>systems-:), and have already run into a number of problems. By the way,
>virtually every question that I have asked, on this newsgroup, was answered,
>or led me to the answer, to my problem.
>
>It seemed's to me, that if we formed a list, we could create a usable faq,
>based on our experiences, as newbies, struggling to learn, that would serve
>as a learning tool, for future newbies.
>
>
>Any takers?
>
>Doug Evans
--
--
Mark Folse * IS Manager * DL Printing * Detroit Lakes, MN USA
www.dlprinting.co * mfolse at dlprinting dot com
abuse@localhost postmaster@localhost root@localhost
--------------------------------------------------------------------
------------------------------
Date: Mon, 23 Mar 1998 14:40:01 -0800
From: Larry Rosler <lr@hpl.hp.com>
To: Mike Stok <mike@stok.co.uk>
Subject: Re: checking for undefined elements in an array
Message-Id: <3516E4C1.EE2B4147@hpl.hp.com>
Mike Stok wrote:
>
> In article <6f66v4$h93@julius.ling.ohio-state.edu>,
> Kevin B Cohen <kcohen@julius.ling.ohio-state.edu> wrote:
> >greetings,
> >
> >i'm looking for an elegant way to see if there are any undefined
> >elements in an array.
...
> sub isFullyDefined {
> for (@_) {
> return unless defined;
> }
>
> return 1;
> }
...
Or even more straightforwardly,
sub isFullyDefined { grep !defined($_), @_ }
Larry Rosler
Hewlett-Packard Laboratories
lr@hpl.hp.com
------------------------------
Date: 23 Mar 1998 16:21:04 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: kcohen@julius.ling.ohio-state.edu (Kevin B Cohen)
Subject: Re: checking for undefined elements in an array
Message-Id: <8czpihj8nz.fsf@gadget.cscaper.com>
>>>>> "Kevin" == Kevin B Cohen <kcohen@julius.ling.ohio-state.edu> writes:
Kevin> greetings,
Kevin> i'm looking for an elegant way to see if there are any undefined
Kevin> elements in an array. the best thing i can thiink of to do is to
Kevin> write a subroutine, something like
Kevin> sub IsFullyDefined {
Kevin> my (@array) = @_;
Kevin> my $stop = $#array; # index of last element
Kevin> my $i; # counter
Kevin> for ($i = 0; $i <= $stop; $i++) {
Kevin> ($array[$i] == undef) && return;
"I do not think that means what you think it means" -- Princess Bride
that's like saying $array[$i] == 0, because undef is converted to 0 there.
Kevin> }
Kevin> return 1;
Kevin> }
Here's my cut at it:
$no_undef = do { eval { for (@list) { defined || die } }; not $@ };
Try that and see if it does what you want.
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 161 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 23 Mar 1998 22:11:11 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Creating a unique id number?
Message-Id: <6f6mlv$3ln$3@client2.news.psi.net>
Randal Schwartz (merlyn@stonehenge.com) wrote on MDCLXV September
MCMXCIII in <URL: news:8c1zvtnshq.fsf@gadget.cscaper.com>:
++ >>>>> "khaines" == khaines <khaines@oshconsulting.com> writes:
++
++ khaines> my $id = time() . '0' x (5 - length($$)) . $$;
++
++ That's scary. How about:
++
++ my $id = sprintf "%d%05d", time, $$;
Or even chop ($id = sprintf "%d%05d%s", time, $$, `hostname`);
Abigail
--
perl -wleprint -eqq-@{[ -eqw+ -eJust -eanother -ePerl -eHacker -e+]}-
------------------------------
Date: Mon, 23 Mar 1998 17:43:54 -0500
From: "Peter Perchansky" <fp@pmpcs.com>
Subject: Re: Going Rates for PERL Programming???
Message-Id: <6f6or3$o0s$2@usenet44.supernews.com>
Greetings:
Wef wrote in message <35179f1e.11959503@news>...
>Here's what my one and only client told me about the going rates for
>PERL/CGI scripting for the WWW.
>
>$45/hour for "tweaking" existing scripts. Meaning the client wants ou
>to change a few lines in a 'formmail.pl' script for instance...
>
>$100/hour for custom scripting... Meaning the client wants something
>entirely different than what he/she can find on the web...
I've seen rates from $35 per hour to $150 per hour; it depends on skill,
experience, specialization, etc.
What I question is the pricing disctinction between tweeking another
person's code and writing custom code.
If it is the same programmer, why is their time worth less when tweaking?
--
===========================================================
Peter Perchansky, Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Providing Dynamic Databases, Design, & Electronic Commerce Solutions
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm
------------------------------
Date: Mon, 23 Mar 1998 18:52:59 +0100
From: Normie <lars-n@hsr.no>
Subject: How to log input to different files in perl
Message-Id: <3516A17B.F01531A6@hsr.no>
I am writing a perl script and I want the input to be redirected to
different files.
The html-page is a quiz, which enables the users to deliver their
answers via internet.
The html-page contains basic form-items like textbox, password and a
drop-down list.
I need the answers to be put in different files based on the different
names in the drop-down list. For example: the names in the drop-down
list are Cats, Dogs and Horses.
I want the information submitted to be put in cats.log, dogs.log and
horses.log
How do I do this ????
I am quite new to Perl and need help on writing the source-code for
this.
Please help !
------------------------------
Date: 23 Mar 1998 14:40:18 -0800
From: jbc@west.net (John Callender)
Subject: Re: Im a dip so kill me ok!
Message-Id: <6f6oci$suh@acme.sb.west.net>
Chuck Stewart (cstewart@flash.net) wrote:
: I have a tab delimited file that is 1000 lines long. I want to be
: able to show 50 lines at a time via html with a "next 50" as an
: option.
The way I've implemented this in the past is to have some sort of
"counter" variable that gets incremented within the loop that processes
each line. when it gets to 50 it stops printing out the lines, and
prints out either a link of the form:
<A HREF="my_script.cgt?count=$counter">Read next 50 lines</A>
or a form with the following sort of stuff:
<FORM ACTION="my_script.cgi">
<INPUT TYPE="hidden" NAME="counter" VALUE=$counter>
<INPUT TYPE="submit" VALUE="Read next 50 lines">
</FORM>
This link (or form submission) calls the same script, which behaves the
same way it did the first time, except it checks the value of "counter"
and goes that far into the file before it starts printing lines. And once
it gets to $counter + 50, of course, it stops again, and prints out a
suitable link with "?counter=100" (or whatever) appended.
This is really awfully basic stuff, of course. And the cgi newsgroup
probably would be a better place to ask about it. Perlwise, check out the
CGI module, and the while and foreach functions.
Good luck!
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: 23 Mar 1998 23:33:58 +0100
From: Gisle Aas <aas@sn.no>
Subject: Re: LWP doesn't do HTTP keepalives!
Message-Id: <m3wwdl82ax.fsf@furu.g.aas.no>
spidaman@well.com (Ian Kallen) writes:
> So, has anybody written keep alive client code in Perl? I sure don't want
> to write it myself, I'm spoiled by LWP, I confess()!
LWPng-alpha does. It should be available from CPAN. It adds HTTP/1.1
support with persistent connections and pipelining. The "alpha" means
that class names and interfaces still change between releases.
--
Gisle Aas
------------------------------
Date: Mon, 23 Mar 1998 02:14:56 -0600
From: "Mark J. Danna" <mdanna@ghg.net>
Subject: Need help with Win32 File Functions
Message-Id: <35161c87.0@news.ghgcorp.com>
I am looking for a function(s) that returns Win32 file date and size as
displayed in a directory command or in Windows Explorer. I believe that a
dir filename.ext>>dir.txt can be used, but has anyone written any functions
that returns these values?
I am aware of the -x File Test (ref. page 121 "Learning Perl on Win32
Systems, O'Reilly & Assoc.) and the stat Function (page 123), but these user
Perl's Epoch age in the calculation for the creation/modification date. I
would imagine that there is a better way since the Win32 already knows the
date (and size). I also can't find any FAQ online that goes into detail
with file/directory listing info.
Any POSITIVE comment or suggestion is welcome and appreciated!!!
------------------------------
Date: Mon, 23 Mar 1998 21:43:55 GMT
From: Charles Margolin <cmargoli@world.northgrum.com>
Subject: Re: Passing reference to array of hashes: a better way?
Message-Id: <3516D79B.1F53@world.northgrum.com>
spamfree@yahoo.com wrote:
>
...
> After reading perlref, it seemed like I wanted an array of hashes, which I'm
> building like this:
...
>
> Then, when the %thisrecord has its key/value pairs all loaded up, I want to
> add it to the array I'm calling @pmdata, declared inside the function, like
> this:
>
> if(/^MACHDATA_OBJ_END_DEF/) {
> push @pmdata, %thisrecord;
> $inrecord = 0;
> next;
> }
>
Even before you have to worry about how to return the array, you have
to get the "array of hashes" right. Each element of an array can hold
one scalar value, not a whole hash. So to build an array of hashes,
you need to push a reference to the hash into the array:
push @pmdata, \%thisrecord;
You have to create a separate hash each time through the loop. You can
do this by ensuring that %thisrecord is created inside the loop as a
lexical:
my %thisrecord;
before you store anything into it.
Whether you pass in a reference to an array or create a 'my' array
inside the sub is a mostly matter of style, as long as you use the
correct notation to derefrence.
--
Charles G. Margolin DSSD Internal Information Services
cmargoli@world.northgrum.com Northrop Grumman Corp. 0624/23
margolin@acm.org Hawthorne, California 90250-3277
------------------------------
Date: Mon, 23 Mar 1998 22:03:44 GMT
From: Bill Lewis <Bill.Lewis@mci.com>
Subject: Perl Databases...
Message-Id: <3516DC12.6FBA@mci.com>
Ok, created just a simple script to input data to a DBM database. I
tie'd the hash function to the database file, which currently is empty.
Then in the script I assign keys and values like such:
%info = $key => $value;
where I interate over keys and assign different values to it.
Nothing appears to be getting into the database or the hash function.
What else do I need to do to "commit" the data to the DBM file?
Do I have to assign data all at once to the has function or can I do it
in increments like assign the hash, process some data, assign to hash
again and so on....
TIA,
--
Bill Lewis, Senior Unix System Administrator
MCI Telecommunications Corp.
email: Bill.Lewis@mci.com
------------------------------
Date: Mon, 23 Mar 1998 16:51:18 -0600
From: markfolse@rocketmail.com (Mark Folse)
Subject: Re: Perl system() calls on NT w/IIS
Message-Id: <markfolse-2303981651180001@192.168.254.2>
Same here. Just a newbie learning perk, but I thought it was time I lot
the 5.0 Resource Kit perl for a curent binary.
Went and downloaded GS 5.004 and both system() and backtick assignments
just aren't working right anymore in a cgi context.
In article <6em9nk$cb2$1@krypton.inbe.net>, "Tom Adriaenssen"
<tom@imagic.be> wrote:
>Charlie Hatton wrote in message <350E9A65.D7BF4890@dfdis.com>...
>>I'm having a problem getting Perl system() calls to return output on NT
>>4.0 using IIS. I can run my scripts from the command line and get
>>appropriate output, but nothing using a WWW browser. Other Perl
>>functions appear to be fine, including some DBI/DBD add-on modules.
>>Below are details; any help posted here or sent to me @ hatton@dfdis.com
>>would be *greatly* appreciated. Thanks in advance!
>
>
>Yeah, i've got the same problem. We were using Perl 5.003 (ActiveState) on
>our server (NT4, SP3, IIS4). Needing to upgrade perl to 5.004 (because 5.003
>choked on prog 'A'), i downed the Standard binary perl implementation
>(5.004_02), installed it.
>Prog A works fine, but a prog B that uses system( '' ) calls to another perl
>script fails now.
>
>Restoring the old perl stuff reinstates prog B but then prog A won't work.
>
>Our configuration is about the same as the one specified by Charlie.
>
>Help greatly appreciated.
--
--
Mark Folse * IS Manager * DL Printing * Detroit Lakes, MN USA
www.dlprinting.co * mfolse at dlprinting dot com
abuse@localhost postmaster@localhost root@localhost
--------------------------------------------------------------------
------------------------------
Date: 23 Mar 1998 18:43:46 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: sprintf rounding error
Message-Id: <6f6s3i$8sm$1@monet.op.net>
Keywords: beefy envelope jawbreak presentational
In article <3516AC4B.2A0@erols.com>, Kevin Miles <kmiles@erols.com> wrote:
> print "$_\t" . sprintf("%07.1f",$_) . "\n";
>14.85 00014.8
Well, I wouldn't want to rule out an error in {s}printf. But I rather
suspect that the error is in your computer, not in sprintf.
Maybe you've heard this speech before:
Not all fractions have a finite representation; 1/3 is the familiar
example; we write .3333333... with the understanding that no sequence
of `3's is exactly correct.
Your computer uses base 2 internally, not base 10, so that 1/3 looks
like .0101010101... to your computer, and the same caveats apply.
85/100 is one of those numbers that doesn't have a terminating
representation inside the computer; the computer wants to use
.110110011001100110011... . It has to do that because of the way it's
built.
Your computer also has to chop off that infinite representation at
some point, because it has only a finite amount of memory. That
introduces a small error, just like chopping off 1/3 to be `.333333333'
introduces a small error.
The result is that when you ask for 14.85, you probably get something
like
14.8499999999999996447286321199499070644378662109375
or thereabouts.
printf properly rounds this number to 14.8 instead of to 14.9.
That's my guess about what is happening here, anyway.
------------------------------
Date: Mon, 23 Mar 1998 17:16:17 -0500
From: "Dino Bozzo" <dbozz@istar.ca>
Subject: Unix Sendmail equivalent for Perl Win32 and NTMail
Message-Id: <6f6n0f$4du$1@client2.news.psi.net>
My mail server software is NTMail v3.0. How do I make my Perl scripts
access the mail server to send email?
Thanks,
Dino Bozzo
------------------------------
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 2167
**************************************