[13582] in Perl-Users-Digest
Perl-Users Digest, Issue: 992 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 5 15:06:38 1999
Date: Tue, 5 Oct 1999 12:05:19 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <939150318-v9-i992@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 5 Oct 1999 Volume: 9 Number: 992
Today's topics:
Re: ActivePerl Implementation Problem (subs mysteriousl <dove@synopsys.com>
bug or feature? <ak@dasburo.de>
Re: bug or feature? <uri@sysarch.com>
Re: bug or feature? (Craig Berry)
Re: Bug with localtime() in Perl 5.004 and 5.005 (Alan Curry)
Re: Bug with localtime() in Perl 5.004 and 5.005 (Ilya Zakharevich)
Re: Bug with localtime() in Perl 5.004 and 5.005 (Larry Rosler)
Converting 1.1.1.1 to blah.foo.com <brianpp@us.ibm.com>
Re: Converting 1.1.1.1 to blah.foo.com <emschwar@rmi.net>
Download Perl 5 <flash4@ukgateway.net>
help with fork needed <freaky.franky@gmx.de>
Re: Help! I'm having big trouble searching my database <nihad@yahoo.com>
How to avoid reading big file into array ? tvn007@my-deja.com
how write log files in Perl on NT?? acunet3278@my-deja.com
how write log files in Perl on NT?? acunet3278@my-deja.com
Re: Memory leak in assignment (Craig Berry)
Re: Memory leak in assignment (Ilya Zakharevich)
Re: Memory leak in assignment (Craig Berry)
Re: Need help with input verifier (Larry Rosler)
Re: Newbie question ! (Craig Berry)
Re: OS/2 and <$ARGV[0]/foo/*.bar>: will it work? (Ilya Zakharevich)
Re: PERL CGI script works in concole but not with IIS o <flavell@mail.cern.ch>
print errors otto_parts@my-deja.com
Redirecting with a SSI from perl jnoviell@my-deja.com
Re: Simple - yet won't work! <sariq@texas.net>
Re: tool to convert BMPs to GIFs programatically? (Mark A. Hershberger)
Re: tool to convert BMPs to GIFs programatically? (Hywel Jenkins)
Re: tool to convert BMPs to GIFs programatically? (Hywel Jenkins)
Re: tool to convert BMPs to GIFs programatically? <colinrei@oz.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 05 Oct 1999 10:28:11 -0700
From: David Amann <dove@synopsys.com>
Subject: Re: ActivePerl Implementation Problem (subs mysteriously redefined)
Message-Id: <37FA352B.4014B8DC@synopsys.com>
Hi Lee,
Thanks for the response. I figured this out.
Screen.pm is a perl module I wrote for my Screen object. Basically, it sets
the framework for my working environment that I populate with Panels.
Since Screen.pm can print out in HTML, I used the CGI module in it as follows:
use CGI qw/:all/;
What I didn't realize was that this imported the CGI's title function into the
Screen namespace. So when I defined a new title method for my string object,
I was redefining the subroutine.
I just went through and renamed my screen title method to screen_title and
everything was dandy.
Funny that UNIX perl didn't give me the warning. Maybe I didn't have -w
switch turned on in my UNIX implementation. (I know I know. Bad -=dav Bad
-=dav). :)
Thanks again,
-=dav
Lee Silver wrote:
> David:
>
> Courtesy e-mail reply sent.
>
> > In order to demo a web based application, I've been forced to move it to
> > a Windows NT environment. I've installed ActivePerl and all of the
> > various modules, but when I try to test my script from the command line
> > I get a lot of the following errors:
> >
> > Screen.pm: Subroutine title redefined at ../cm-lib Screen.pm line 37.
> >
> > The same module on UNIX gives me no such problem. Is there something
> > specific to the ActivePerl implementation I should be looking for? Does
> > it handle namespaces differently?
>
> I write scripts that I test under NT (with ActiveState) and that run
> unchanged under UNIX. These incorporate both standard modules and
> personal ones.
>
> Screen.pm doesn't appear to be part of the standard NT distribution. In
> what directory did you put that file (I keep my personal ones in
> \perl\site\lib and they get found automatically by Perl.) What is line
> 37 of Screen.pm?
>
> --
> // Lee Silver
> // Information Concepts Inc.
>
> WE LISTEN.
------------------------------
Date: Tue, 05 Oct 1999 18:58:14 +0200
From: Alexander Knack <ak@dasburo.de>
Subject: bug or feature?
Message-Id: <37FA2E26.7C5D8DFB@dasburo.de>
why does the following not work?
$x = '23.24.25';
@y = split '.', $x;
print (join " ", @y), "\n";
*shrug*
--
+--------------------------------------------------------------------+
| Alexander Knack ........Entropie erfordert keine Wartung .........|
| dasburo.de ..................................................|
+--------------------------------------------------------------------+
------------------------------
Date: 05 Oct 1999 13:23:30 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: bug or feature?
Message-Id: <x7u2o5sovh.fsf@home.sysarch.com>
>>>>> "AK" == Alexander Knack <ak@dasburo.de> writes:
AK> why does the following not work?
AK> $x = '23.24.25';
AK> @y = split '.', $x;
AK> print (join " ", @y), "\n";
newbies almost never find a real bug in perl. so please don't credit
yourself as doing that. you have run into a very common newbie bug in
your own code. read perlre to learn more about why that split doesn't do
what you expect.
AK> *shrug*
try shouldering more documentation before shrugging your shoulders.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Tue, 05 Oct 1999 17:37:56 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: bug or feature?
Message-Id: <rvkdrkftrad14@corp.supernews.com>
Alexander Knack (ak@dasburo.de) wrote:
: why does the following not work?
:
: $x = '23.24.25';
: @y = split '.', $x;
: print (join " ", @y), "\n";
First arg to split is a regex, even if you make it look like a string.
Rewrite it as
@y = split /\./, $x;
and all will be well.
--
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "There it is; take it." - William Mulholland
------------------------------
Date: Tue, 05 Oct 1999 17:33:39 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: Bug with localtime() in Perl 5.004 and 5.005
Message-Id: <TDqK3.17199$t%3.1261029@typ11.nn.bcandid.com>
In article <7tcs0n$qjq$1@pegasus.csx.cam.ac.uk>,
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
>>A patch to perlfunc is welcome.
>
>What patch is needed? perldoc -f time is quite explicit:
>
>=item time
>
>Returns the number of non-leap seconds since whatever time the system
Well of course time() doesn't care about leap seconds, it's just a counter.
If there are any days with 86401 seconds in them, it would be localtime() and
gmtime() that knew about it, since they actually deal with days. So if any
patch is needed it will say either:
The value of $sec returned by localtime is in the range 0-61.
or
The value of $sec returned by localtime is in the range 0-59.
Currently it says they come from struct tm. And localtime(3) says the tm_sec
field of a struct tm goes from 0 to 61. So with the present state of the
docs, I'd say that there _are_ leap seconds in perl.
--
Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
pacman@cqc.com|bigotries (should| [ | | ] / _> / _>
--------------+save some time): | \__/ \__/ \___: \___:
Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman
------------------------------
Date: 5 Oct 1999 17:47:55 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Bug with localtime() in Perl 5.004 and 5.005
Message-Id: <7tddkb$hq2$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to M.J.T. Guy
<mjtg@cus.cam.ac.uk>],
who wrote in article <7tcs0n$qjq$1@pegasus.csx.cam.ac.uk>:
> >The last part is a common misconception. There are no leap seconds in
> >time(). time() is 86400 * $d + $s. $d is the number of whole days
> >after the epoch, and $s is number of seconds during the last day.
> >
> >A patch to perlfunc is welcome.
>
> What patch is needed? perldoc -f time is quite explicit:
>
> =item time
>
> Returns the number of non-leap seconds since whatever time the system
> ^^^^^^^^
> considers to be the epoch.
I do not find a concept of a "non-leap second" a tiny bit clear. So
do not many posters to this thread. Call it a bias, but I find my
explanation much clearer.
Ilya
------------------------------
Date: Tue, 5 Oct 1999 11:04:40 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Bug with localtime() in Perl 5.004 and 5.005
Message-Id: <MPG.1263dd929c0da2be98a03a@nntp.hpl.hp.com>
In article <TDqK3.17199$t%3.1261029@typ11.nn.bcandid.com> on Tue, 05 Oct
1999 17:33:39 GMT, Alan Curry <pacman@defiant.cqc.com> says...
...
> Well of course time() doesn't care about leap seconds, it's just a counter.
> If there are any days with 86401 seconds in them, it would be localtime() and
> gmtime() that knew about it, since they actually deal with days. So if any
> patch is needed it will say either:
>
> The value of $sec returned by localtime is in the range 0-61.
No.
> or
>
> The value of $sec returned by localtime is in the range 0-59.
Yes.
> Currently it says they come from struct tm. And localtime(3) says the tm_sec
> field of a struct tm goes from 0 to 61. So with the present state of the
> docs, I'd say that there _are_ leap seconds in perl.
No, there aren't. Or even in Perl. With the present state of the docs,
I'd say that there _are_ incorrect docs in C (in fact, in the C
Standard). Which should probably be reported elsewhere.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 05 Oct 1999 13:06:11 -0500
From: Brian Preston <brianpp@us.ibm.com>
Subject: Converting 1.1.1.1 to blah.foo.com
Message-Id: <37FA3E13.DE14458E@us.ibm.com>
For a web cgi logger that I'm doing for out Help Desk, I have a CGI
script that logs some informatin. Is there a perl function that will
convert a dotted IP address to readable one?
I supposed I could do a system call to some AIX (unix) function but that
would take some looking up and I was wondering if someone knew off the
top of there heads.
Thanx
-Brian
brianpp@us.ibm.com
------------------------------
Date: 05 Oct 1999 12:50:38 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: Converting 1.1.1.1 to blah.foo.com
Message-Id: <xkf7ll1ej5t.fsf@valdemar.col.hp.com>
Brian Preston <brianpp@us.ibm.com> writes:
> I supposed I could do a system call to some AIX (unix) function but that
> would take some looking up and I was wondering if someone knew off the
> top of there heads.
"I could spend ~30 seconds looking in the manuals for the answer, but I'm
too lazy, so I'll waste the time and bandwidth of hundreds if not
thousands of people worldwide because I can't be arsed to do an even
pathetically small amount of work."
Gee, that's real motivating.
-=Eric
--
"Cutting the space budget really restores my faith in humanity. It
eliminates dreams, goals, and ideals and lets us get straight to the
business of hate, debauchery, and self-annihilation."
-- Johnny Hart
------------------------------
Date: Tue, 5 Oct 1999 19:47:47 +0100
From: "Paul Smith" <flash4@ukgateway.net>
Subject: Download Perl 5
Message-Id: <7tdh42$1pv$1@lure.pipex.net>
Hi,
Where can I download Perl 5.001?
Thanks, Paul
------------------------------
Date: Tue, 05 Oct 1999 20:16:57 +0200
From: Frank Boegner <freaky.franky@gmx.de>
Subject: help with fork needed
Message-Id: <37FA4099.BFF5C9EA@gmx.de>
I have been playing around with fork recently, but I can't solve this
problem:
I want to execute three subroutines simultaneously, like this:
sub1{
# do sth.
$var1 = "content1";
}
sub2{
# do sth.
$var2 = "content2";
}
sub3{
# do sth.
$var3 = "content3";
}
Then I want to wait until all subs have executed. Then I want to print
out $var1, $var2, $var3.
Is there a way to make this possible? Please give me a clue.
Frank Boegner
------------------------------
Date: Tue, 05 Oct 1999 18:00:04 GMT
From: <nihad@yahoo.com>
Subject: Re: Help! I'm having big trouble searching my database
Message-Id: <rvkf54mtrad82@corp.supernews.com>
You may want to take a look at your defualt.cfg file, Ensure that the
field names used in your html.pl form match your defualt,cfg file where the
pull down menu values are being pulled from...
Good luck
Clinton Pierce wrote:
>
> [poster cc'd in e-mail]
>
> On Mon, 04 Oct 1999 19:06:53 GMT, sleepernyc@my-deja.com wrote:
> >Might anyone be willing to look at this code and offer suggestions?
> >check out www.tasteofbrooklyn.com/tob/cgi-bin/dbman/main3.html
>
> There is no code here, only a stupid web page. You want is to look at
> your HTML or something?
>
> Begone! Next time show us some Perl we can look at.
>
>
>
>
> --
> Clinton A. Pierce "If you rush a Miracle Man, you get rotten
> clintp@geeksalad.org Miracles." -- Miracle Max, The Princess
Bride
> http://www.geeksalad.org
------------------ Posted via CNET Help.com ------------------
http://www.help.com/
------------------------------
Date: Tue, 05 Oct 1999 18:42:25 GMT
From: tvn007@my-deja.com
Subject: How to avoid reading big file into array ?
Message-Id: <7tdgqe$bpe$1@nnrp1.deja.com>
Hi,
This script wrote data into array. And I can
not use it when I have a big file.
Would someone help me so that
it does not have to write data into array ?
Thanks in advance for your help,
!/usr/local/bin/perl5 -w
my $first_path = "f.wsp";
my $second_path = "list";
my $comment_char = ";comment out";
my %remove_lines;
open (START, "+<$first_path") || die "Can't open $first_path: $!\n";
open (REMOVE, "$second_path") || die "Can't open $second_path:
$!\n";
@temp = <START>;
@list = <REMOVE>;
for ($i=0; $i< @temp; $i++) {
foreach $list (@list){
chomp $list;
$full_name_no_ext = (split /\./, $list)[0];
if ($temp[$i] =~ $full_name_no_ext) {
$temp[$i] = $comment_char . $temp[$i];
}
}
}
seek (START, 0, 0) || die "Can't seek: $!\n";
foreach $temp (@temp){
chomp $temp;
print START "$temp\n" ;
}
truncate (START,tell(START)) || die "Can't truncate: $!\n";
close START || die "Can't close: $!\n";
~
~
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 05 Oct 1999 17:03:13 GMT
From: acunet3278@my-deja.com
Subject: how write log files in Perl on NT??
Message-Id: <7tdb07$74j$1@nnrp1.deja.com>
How can I program a perl script for NT to open a text file?
The script prints a persistant error message:
"PerlScript: ERROR writing examp_logfile.txt"
Specificaly, I am trying to run the vote.pl perl script
at http://pucho.com/asp/vote/example.html
The snippet of vote.pl code that prints the error in question:
##Writing $logfile
if (!open(handle3, ">$logfile")) {printError("ERROR writing
$logfile\n");}
print handle3 "Total votes:" .+ $total .+ "\n";
for($k=0;$k<$i;$k++){
$j=0;
@tmp=();
while ($votes[$k][$j] ne ''){
push(@tmp,$votes[$k][$j]);
$j++;
}
$logtmp=join ' ', @tmp;
print handle3 "$logtmp\n";
}
About this freeware script. It can be found at:
http://www.datacomm.ch/atair/perlscript/
Can you kindly share your experience with me?
What has to be modified to make it work? Does NT require special
permissions for Perl scripts to write log files?
Does the vote.pl code have to be changed?
About this webserver:
pucho.com is a virtual MS IIS v4 webserver is running on NT.
The ISP is using the following Perl version:
C:\WINNT\system32\inetsrv\PERL\bin>perl -v
This is perl, version 5.003_07
Copyright 1987-1996, Larry Wall
+ suidperl security patch
Win32 port Copyright (c) 1995-1996 Microsoft Corporation.
All rights reserved.
Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
Perl for Win32 Build 310 - Built 19:24:08 Sep 4 1997
Perl may be copied only under the terms of either the Artistic License
or the GNU General Public License, which may be found in the Perl 5.0
source kit.
This server has no no problem running perl,
as there are already many other perl scripts being used.
Can you kindly share your experience with me?
Your comments, tips, suggestion are welcome.
Please advise. Thank you.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 05 Oct 1999 17:02:56 GMT
From: acunet3278@my-deja.com
Subject: how write log files in Perl on NT??
Message-Id: <7tdavl$74a$1@nnrp1.deja.com>
How can I program a perl script for NT to open a text file?
The script prints a persistant error message:
"PerlScript: ERROR writing examp_logfile.txt"
Specificaly, I am trying to run the vote.pl perl script
at http://pucho.com/asp/vote/example.html
The snippet of vote.pl code that prints the error in question:
##Writing $logfile
if (!open(handle3, ">$logfile")) {printError("ERROR writing
$logfile\n");}
print handle3 "Total votes:" .+ $total .+ "\n";
for($k=0;$k<$i;$k++){
$j=0;
@tmp=();
while ($votes[$k][$j] ne ''){
push(@tmp,$votes[$k][$j]);
$j++;
}
$logtmp=join ' ', @tmp;
print handle3 "$logtmp\n";
}
About this freeware script. It can be found at:
http://www.datacomm.ch/atair/perlscript/
Can you kindly share your experience with me?
What has to be modified to make it work? Does NT require special
permissions for Perl scripts to write log files?
Does the vote.pl code have to be changed?
About this webserver:
pucho.com is a virtual MS IIS v4 webserver is running on NT.
The ISP is using the following Perl version:
C:\WINNT\system32\inetsrv\PERL\bin>perl -v
This is perl, version 5.003_07
Copyright 1987-1996, Larry Wall
+ suidperl security patch
Win32 port Copyright (c) 1995-1996 Microsoft Corporation.
All rights reserved.
Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
Perl for Win32 Build 310 - Built 19:24:08 Sep 4 1997
Perl may be copied only under the terms of either the Artistic License
or
the
GNU General Public License, which may be found in the Perl 5.0 source
kit.
This server has no no problem running perl,
as there are already many other perl scripts being used.
Can you kindly share your experience with me?
Your comments, tips, suggestion are welcome.
Please advise. Thank you.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 05 Oct 1999 17:35:43 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Memory leak in assignment
Message-Id: <rvkdnfm0rad51@corp.supernews.com>
rob1234567@my-deja.com wrote:
: I have a problem with a perl program that fails
: with out-of-memory. At the end of this message a
: small script is attached that has this same
: problem. Wether or not the 'undef' line is
: commented out, in both cases the script fails.
The undef is irrelevant; even with all those passes
through the loop body, at most one instance of $a
gets created.
: I have checked the FAQ, but could find only one
: entry on memory leaks and that was supposedly
: fixed in 5.0.
It's not a memory leak.
: Does anyone have a fix or a workaround for me?
Yes...
: ## start of perl script
: $a = 0;
:
: for (1 .. 10000000)
The expression (1 .. 10_000_000) expands into a real, actual, in-memory
list of the integers from 1 to 10 million. At four bytes per integer,
that's a minimum of 40 megabytes of memory required, plus whatever
structural overhead the list itself imposes. Apparently your per-process
memory use limit is lower than this.
Instead, code it as:
for (my $i = 1; $i <= 10_000_000; $i++) {
: {
: #undef $a;
: $a = 1;
: }
: ## end of perl script
--
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "There it is; take it." - William Mulholland
------------------------------
Date: 5 Oct 1999 17:53:56 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Memory leak in assignment
Message-Id: <7tddvk$hrp$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Craig Berry
<cberry@cinenet.net>],
who wrote in article <rvkdnfm0rad51@corp.supernews.com>:
> The expression (1 .. 10_000_000) expands into a real, actual, in-memory
> list of the integers from 1 to 10 million.
No it does not. Upgrade.
Ilya
------------------------------
Date: Tue, 05 Oct 1999 18:58:26 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Memory leak in assignment
Message-Id: <rvkiiibirad24@corp.supernews.com>
Ilya Zakharevich (ilya@math.ohio-state.edu) wrote:
: who wrote in article <rvkdnfm0rad51@corp.supernews.com>:
: > The expression (1 .. 10_000_000) expands into a real, actual, in-memory
: > list of the integers from 1 to 10 million.
:
: No it does not. Upgrade.
It apparently does in his version. If he can, upgrading is better. Not
everyone has easy access to that option, in which case recoding is better.
--
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "There it is; take it." - William Mulholland
------------------------------
Date: Tue, 5 Oct 1999 10:30:49 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need help with input verifier
Message-Id: <MPG.1263d5a99b928c6998a039@nntp.hpl.hp.com>
In article <37f9f1c9.2777093@nntp.ix.netcom.com> on Tue, 05 Oct 1999
12:49:36 GMT, Jana Cole or John Sayre <quikscor@ix.netcom.com> says...
...
> I copied this verification code from Flanagan's JavaScript book, but I
> can't get it to work for me. Maybe the way I'm inbedding it in the
> Perl, I don't know. Also, I'm not sure if this should be posted here
> or on a JavaScript newsgroup.
...
> $month = (qw(1 2 3 4 5 6 7 8 9 10 11 12)) [(localtime)[4]];
> $day = (qw(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
> 22 23 24 25 26 27 28 29 30 31)) [(localtime)[3]];
> $year = (localtime)[5];
> if ($year > 99)
> {
> $year = year - 100;
> }
> $todays_date = "$month/$day/$year";
I'm not responding to your question, just commenting on the Perl code.
I don't know who deserves the credit, you or the book you refer to.
Words have never failed me before, so I'll try to express my admiration
clearly:
a. Three calls to localtime instead of one.
b. Two lookups in arrays of sequential integers, spelled out instead of
using ranges. (The brilliance of this might have been harder to spot if
there were ranges.) Probably the intent is to convert integers into
strings, which Perl does quite handily on its own.
c. Subtraction instead of mod. (This introduces a Y2.1K problem. :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 05 Oct 1999 17:16:39 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Newbie question !
Message-Id: <rvkcjn9drad95@corp.supernews.com>
Wise Guy (WiseGuy_73@go.com) wrote:
: I am pretty new to perl and would like some help. In Benchmark, what is
: the "iterations" ? From basic definition, I understand it is a loop.
Indeed. Specifically, the number of times to run the code snippet(s)
supplied.
: Why do I need iterations - can I not make do with only one iteration ?
: Or is it that the more the number of iterations, the more accurate is
: the result ?
Yes. Taking many samples helps guard against getting misleading readings
because (e.g.) your OS decided to play with the swap file in
mid-computation.
--
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "There it is; take it." - William Mulholland
------------------------------
Date: 5 Oct 1999 17:51:03 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: OS/2 and <$ARGV[0]/foo/*.bar>: will it work?
Message-Id: <7tddq7$hr2$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Thomas Hoffmann
<hoffmann@ehmgs2.et.tu-dresden.de>],
who wrote in article <u8ogeem5ub.fsf@ehmgs2.et.tu-dresden.de>:
> while(<$ARGV[0]/foo/*.bar>){
>
> $ARGV[0] =~ /([^\/]*)$/;
> Using HP-UX, I can access all the *.bar files, on OS/2 the while loop
> exits immediately.
It should not with a normal installation of Perl. Did you run
testperl.cmd?
> Has this something to do with "globbing" and is there a cure for OS/2?
> (I have fiddled around with different shell there).
If you fiddled with shells, you are on your own.
Ilya
------------------------------
Date: Tue, 5 Oct 1999 19:03:10 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: PERL CGI script works in concole but not with IIS or Apache
Message-Id: <Pine.HPP.3.95a.991005184700.29427E-100000@hpplus01.cern.ch>
On Tue, 5 Oct 1999, Bill Moseley wrote:
> > answered by BOTH of their FAQs.
>
> Actually, if you looked at the perl in the posting you might think it
> should have just been posted here in c.l.p.m ;)
Sorry, I never read it that far. The subject line showed it was an FAQ,
so I ignored the original posting entirely; I only looked at some of the
f'ups by respected usenauts.
> > But c.i.w.authoring.cgi is automoderated, and prohibits crossposting,
> Oh, I thought I'd seen crossposted articles.
I don't believe so, unless they forged an approval header. I've just
had a quick check through the group as seen here, and found no
crossposts.
> Maybe that's why people
> complain that their messages don't make it in???
AIUI the automoderator bot strips off any x-posted groups, but then
applies its usual have-I-seen-this-poster-before procedure.
However, it does seem that Tom Boutell has kind-of lost interest in the
procedure that he instituted, as there are several long-term problems
that don't seem to have been addressed in any way. More and more people
are using the group as if the only entry requirement was to insert the
not very secret handshake into a posting that otherwise completely
disregards the posting guidelines, so in the end one gets all the
disadvantages of robomoderation and few of the originally touted
advantages. Call me a sceptic but...
> Why doesn't that email hide some token in the faq and say "Find the
> magic key to gain access...." -- Why that could work here in c.l.p.m.
> Send the entire perlfaq by email with bits of the 'key' hidden through
> out the faq. What fun.
It's an amusing idea, but someone would be sure to post a regular
spoiler... and would imagine themselves to be providing a valuable
public service...
cheers
------------------------------
Date: Tue, 05 Oct 1999 17:18:32 GMT
From: otto_parts@my-deja.com
Subject: print errors
Message-Id: <7tdbsm$7vl$1@nnrp1.deja.com>
In our batch cycle we have developed a standard set of utilities to
process the input data and load our databases. We have a standard
output function that uses
the print statement to write to an open filehandle. Our standard open
routine and the output routine verify the success of the open and print
statements. We are experiencing intermittent problems where output
files
are created with 0 records even though the log and input files indicate
that the appropriate output had been created.
The system logs (UNIX) show no problems on the process and file servers
at the time of the errors
and rerunning the processes works correctly. Has anyone experienced
the situation where the print statement does not actually write to the
file? Should we be checking something else to determine if the output
files are created correctly?
Thanks
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 05 Oct 1999 18:16:48 GMT
From: jnoviell@my-deja.com
Subject: Redirecting with a SSI from perl
Message-Id: <7tdfa1$ao2$1@nnrp1.deja.com>
Greetings All,
I'm using a SSI directive in my html page the executes a script (perl)
and redirect a user if he/she had never login before.
In the script I verify the users IP address, and if it's not part of my
lists, I want him redirected to a sign in page (another html document),
else let him/her through.
The problem is I can't seem to redirect it to the sign in page, it
somehow goes into a loop.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 05 Oct 1999 12:50:52 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: Simple - yet won't work!
Message-Id: <37FA3A7C.6A18A245@texas.net>
nihad@yahoo.com wrote:
>
> Randal L. Schwartz wrote:
> >
> >
> > >>>>> "Anon" == <nihad@yahoo.com> writes:
> >
> > Anon> flock(INF, 8);
> >
> > That line is pointless where it is, and dangerous if moved.
> > Delete it. And distrust any place that you got it from.
> >
>
> Randal,
I'm not Randal. I hope you don't mind if I answer.
> Why is unlocking the file dangerous?
A) Don't post Jeopardy style!
B) Don't quote sigs!
C) Unlocking the file will open the same holes as not locking it in the
first place. I.e., you've just defeated the purpose of locking.
D) The close function unlocks the file for you.
- Tom
------------------------------
Date: 05 Oct 1999 12:10:15 -0500
From: mah@everybody.org (Mark A. Hershberger)
Subject: Re: tool to convert BMPs to GIFs programatically?
Message-Id: <49ln9hvimg.fsf@playpen.baileylink.net>
scott@aravis.softbase.com (Scott McMahan) writes:
> But GIFs are patent-protected, or something, and require a license
> from whoever has the legal rights to them, aren't they?
Unisys has a patent on the compression algorithm. GIFs themselves
(w/o compression) are not patented.
> Can you make freeware that supports GIFs without having to pay for
> the rights to them?
Yes. Check out libungif
(http://prtr-13.ucsc.edu/~badger/software/libungif.shtml). The
maintainer also maintains libgif.
Mark.
--
------------------------------
Date: Tue, 5 Oct 1999 19:13:20 +0100
From: hyweljenkins@hotmail.com (Hywel Jenkins)
Subject: Re: tool to convert BMPs to GIFs programatically?
Message-Id: <MPG.1264501b1fb30c0e989c06@news.freeserve.net>
In article <rvk62rh1rad28@corp.supernews.com>, Colin Reinhardt
(colinrei@oz.net) said...
> I want to convert some BMPs to GIFs using code, without any user
> interaction.
> Is there a utility that is scriptable, or batchable, or supports automation
> to do this?
> Ideally it would be freeware and re-distributable...
Why is this in comp.lang.javascript? CLPM I can just about understand,
but come on Colin, how off-topic can you get?
--
Hywel
http://hyweljenkins.com/
EMail Reply Form:
http://hyweljenkins.com/support/replyform.htm
------------------------------
Date: Tue, 5 Oct 1999 19:14:55 +0100
From: hyweljenkins@hotmail.com (Hywel Jenkins)
Subject: Re: tool to convert BMPs to GIFs programatically?
Message-Id: <MPG.1264507d47949865989c08@news.freeserve.net>
In article <rvk62rh1rad28@corp.supernews.com>, Colin Reinhardt
(colinrei@oz.net) said...
> I want to convert some BMPs to GIFs using code, without any user
> interaction.
> Is there a utility that is scriptable, or batchable, or supports automation
> to do this?
> Ideally it would be freeware and re-distributable...
If you got my last response, ignore it, I just had a thought.
http://www.olympus.com/ has an OCX called ImageKnife, which you could
possibly use from ASP. If I recall correctly, you'll need to write a DLL
(VB, VC++, etc) that the JavaScript/ASP can interact with.
--
Hywel
http://hyweljenkins.com/
EMail Reply Form:
http://hyweljenkins.com/support/replyform.htm
------------------------------
Date: Tue, 5 Oct 1999 11:52:51 -0700
From: "Colin Reinhardt" <colinrei@oz.net>
Subject: Re: tool to convert BMPs to GIFs programatically?
Message-Id: <rvki22lgrad65@corp.supernews.com>
Imagine that! You actually helped me out. See, I wasn't so far off-track
after all. It's the best suggestion I've yet received. I'm doing this from
an MFC app so an OCX should be workable. much obliged,
- Colin
Hywel Jenkins wrote in message ...
>In article <rvk62rh1rad28@corp.supernews.com>, Colin Reinhardt
>(colinrei@oz.net) said...
>> I want to convert some BMPs to GIFs using code, without any user
>> interaction.
>> Is there a utility that is scriptable, or batchable, or supports
automation
>> to do this?
>> Ideally it would be freeware and re-distributable...
>If you got my last response, ignore it, I just had a thought.
>
>http://www.olympus.com/ has an OCX called ImageKnife, which you could
>possibly use from ASP. If I recall correctly, you'll need to write a DLL
>(VB, VC++, etc) that the JavaScript/ASP can interact with.
>--
>Hywel
>http://hyweljenkins.com/
>EMail Reply Form:
> http://hyweljenkins.com/support/replyform.htm
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 992
*************************************