[16489] in Perl-Users-Digest
Perl-Users Digest, Issue: 3901 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 3 14:05:32 2000
Date: Thu, 3 Aug 2000 11:05:17 -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: <965325916-v9-i3901@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 3 Aug 2000 Volume: 9 Number: 3901
Today's topics:
Re: $query->can() and cgi.pm (M.J.T. Guy)
(2nd attempt) I NEED HELP! <tarheel@sierratel.com>
Re: (2nd attempt) I NEED HELP! <care227@attglobal.net>
Re: (2nd attempt) I NEED HELP! <Allan@due.net>
5.005 to 5.6.0 migration- need help with some problems <anthonyc@blarg.net>
Re: 5.005 to 5.6.0 migration- need help with some probl <godzilla@stomp.stomp.tokyo>
Re: 5.005 to 5.6.0 migration- need help with some probl <care227@attglobal.net>
Re: bitwise and decimal number... <lr@hpl.hp.com>
Database access <charles@betman.demon.nl>
Re: date manipulation (Greg Bacon)
Re: date manipulation nobull@mail.com
Re: DBI: Same data accessed twice? (Jon Drukman)
error message with mod_perl thomaskoehn@my-deja.com
Re: Excessive memory use under OSF1 (was: numeric stora <cawlfiel@uiuc.edu>
Re: Excessive memory use under OSF1 (was: numeric stora <iltzu@sci.invalid>
Re: File IO nobull@mail.com
Re: five lines of NQL or 45 lines of Perl hmmmm...... <gellyfish@gellyfish.com>
Re: five lines of NQL or 45 lines of Perl hmmmm...... <care227@attglobal.net>
Re: Here's a tough one (relating to 500 error) <mauldin@netstorm.net>
How to send values to another Server ??? hugo.b@derivs.com
HTML::Template brainmuffin@excite.com
Re: Interpolating strings--special characters, _not_ va <iltzu@sci.invalid>
Re: Is Learning Perl worth buying? <samara_biz@hotmail.com>
Re: newb Q, Our perl guy left!! <russ_jones@rac.ray.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 3 Aug 2000 16:32:57 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: $query->can() and cgi.pm
Message-Id: <8mc6rp$lgg$1@pegasus.csx.cam.ac.uk>
Mark-Jason Dominus <mjd@plover.com> wrote:
>In article <1ee39co.79cwgullzptkN%kpreid@attglobal.net>,
>Kevin Reid <kpreid@attglobal.net> wrote:
>>A thought: can() is a method. Therefore it can be overriden. Couldn't
>>CGI.pm (and other modules that use AUTOLOAD) override it to make it work
>>as expected?
>
>Yes, and CGI.pm's failure to do this should be construed as a bug.
Nope. The proper answer is to fix AUTOLOAD. I'm looking into this
at the moment.
Mike Guy
------------------------------
Date: Thu, 03 Aug 2000 10:23:08 -0700
From: Phil Hawkins <tarheel@sierratel.com>
Subject: (2nd attempt) I NEED HELP!
Message-Id: <3989AA7C.D9EFE7E5@sierratel.com>
This is a multi-part message in MIME format.
--------------A43B6DE07108B489D3808376
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I give up. I bought a self-learning book on "Perl 5" and come to find
out I must download Perl, but I go to the perl.com site and it get's
more confusing.
My host is Unix, so I tried to download the Perl 5.6.00... and it just
froze my browser. It appears that there are two versions? One for NT
and the other for
Unix? Huh? I have to write two different scripts for each server
type? And what about the compiler?
I'm brand new to this, so someone please tell me what to do to get the
right version of Perl on my (local) machine... I'm dazed and confused.
The CD that came
with the book loaded the "source code" but when I started to write my
first scripts, it went belly up. I got wierd "Bare word found where
operator expected"
notice when all I tried to do is "% perl hello". Christ. Can't even
get out of the starting block.
Java was easier than this...
Phil
--------------A43B6DE07108B489D3808376
Content-Type: text/x-vcard; charset=us-ascii;
name="tarheel.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Phil Hawkins
Content-Disposition: attachment;
filename="tarheel.vcf"
begin:vcard
n:Hawkins;Phil
tel;pager:559-437-8951
tel;fax:559-683-4309
x-mozilla-html:FALSE
url:http://website-provisions.com
adr:;;;;;;
version:2.1
email;internet:ph@website-provisions.com
x-mozilla-cpt:;-1
fn:WebSite ProVisions
end:vcard
--------------A43B6DE07108B489D3808376--
------------------------------
Date: Thu, 03 Aug 2000 13:48:35 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: (2nd attempt) I NEED HELP!
Message-Id: <3989B073.ED6093CB@attglobal.net>
Phil Hawkins wrote:
>
> with the book loaded the "source code" but when I started to write my
> first scripts, it went belly up. I got wierd "Bare word found where
> operator expected"
> notice when all I tried to do is "% perl hello". Christ. Can't even
> get out of the starting block.
>
if you got that error, then you likely already have a working
perl installation. The obvious problem is you need to give the
perl interpreter a file to interpret, not just the word hello.
If you know Java, then you should be familiar with basic
programming constructs and ideas like source code files.
Take a step back, follow the examples and have fun. If you have
some questions, take a few moments and read the FAQ's at
www.perl.com, lots of your questions are answered there for you.
------------------------------
Date: Thu, 3 Aug 2000 13:52:49 -0400
From: "Allan M. Due" <Allan@due.net>
Subject: Re: (2nd attempt) I NEED HELP!
Message-Id: <8mcbiv$tn$1@slb7.atl.mindspring.net>
Phil Hawkins <tarheel@sierratel.com> wrote in message
news:3989AA7C.D9EFE7E5@sierratel.com...
: I give up.
Well, I would have thought that would have been the end of the message then
<g>.
:I bought a self-learning book on "Perl 5" and come to find
: out I must download Perl, but I go to the perl.com site and it get's
: more confusing.
: My host is Unix, so I tried to download the Perl 5.6.00
Well, I can't make sense of that.
:... and it just
: froze my browser. It appears that there are two versions? One for NT
: and the other for
: Unix? Huh?
There are different perl version for different opperating systems because,
well they are different.
:I have to write two different scripts for each server
: type?
For many purposes the scripts will be identical. Some changes may need to be
made but for the most part scripts will run on both. You run into
difficulties when the script relies on a feature of the OS or a program the is
platform dependent.
: I'm brand new to this, so someone please tell me what to do to get the
: right version of Perl on my (local) machine... I'm dazed and confused.
You never actually say what your local machine is but, lets check the headers
X-Mailer: Mozilla 4.74 [en]C-DIAL (Win98; U)
Ah, Win98.
So go to www.activestate.com and download the version for windows. I would
suggest installing it into the same directory structure as is found on your
host (for example, I use usr/local/bin) rather than using the default path.
Then right your scripts. I am guessing that HTML and CGI are involved so you
will need to install a web server. I like Apache, www.apache.org.
Once your scripts are running fine on your system, make any platform dependent
changes and then upload them to your host as ASCII files.
: The CD that came
: with the book loaded the "source code" but when I started to write my
: first scripts, it went belly up. I got wierd "Bare word found where
: operator expected"
Hmm, that suggests you did get Perl installed. It also suggests you have a
Bare word where perl expects to find an operator. Would have to see the
actual script before I could comment further.
Good luck
HTH
AmD
PS please don't attach your "personal buisness card" when posting to
newsgroups. It is generally considered poor form.
--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--random quote --
Numbers are symbols for things; the number and the thing are not the same.
- Ashley-Perry Statistical Axioms[1]
------------------------------
Date: Thu, 03 Aug 2000 09:47:17 -0700
From: Anthony Christopher <anthonyc@blarg.net>
Subject: 5.005 to 5.6.0 migration- need help with some problems
Message-Id: <3989A215.5B38ED91@blarg.net>
We have encountered a few problems in moving from perl 5.005 to
perl 5.6.0 on Solaris on a Sparc workstation.
In one of these we were actually getting behavior from version 5.005
which was different from what "Programming Perl, Edition 2", said it
would do. This had to do with a 'close on exec" flag. Behavior is now
consistent with the documentation, but it broke our code :-(
In another, we assumed that a reference to STDIN was associated with
IO::Handle. Now that I realize we were making such an assumption, it
does not seem like a good one.
The problems mentioned above are now fixed.
But alas, this was not the end of our problems. The following two
examples were created in an attempt to have simplified examples of
problems we were encountering in our code, but these examples produce
the expected results using both 5.005 and 5.6.0
#!/usr/local/bin/perl -w
my $message = {};
my $packed_session_id = pack "H8", "7FFFFFFE";
$message->{len} = 7;
$message->{data} = pack "H14", "010ACCCCCCCCCC";
$message->{data} = $packed_session_id . $message->{data};
my $hexdump = &StringToHex($message->{data});
print $hexdump, "\n";
exit 0;
sub
StringToHex
{
my ($string,$linelen) = @_;
unless ( defined $linelen ) {
$linelen = 60;
}
my $hexstr = "";
my $len = 0;
for ( my $i = 0; $i < length($string); ++$i ) {
$hexstr .= sprintf("%02X",ord(substr($string,$i,1)));
$len += 2;
if ( $len >= $linelen ) {
$hexstr .= "\n";
$len = 0;
}
}
return $hexstr;
}
#!/usr/local/bin/perl -w
my $message = pack "H32", "7E02000B7FC3C3C3010ACCCCCCCCCC7E";
open FILE, ">binary_struct_out";
print FILE $message;
close FILE;
my $hexdump = &StringToHex($message);
print $hexdump, "\n";
exit 0;
sub
StringToHex
{
my ($string,$linelen) = @_;
unless ( defined $linelen ) {
$linelen = 60;
}
my $hexstr = "";
my $len = 0;
for ( my $i = 0; $i < length($string); ++$i ) {
$hexstr .= sprintf("%02X",ord(substr($string,$i,1)));
$len += 2;
if ( $len >= $linelen ) {
$hexstr .= "\n";
$len = 0;
}
}
return $hexstr;
}
In our code, and there is a lot of it, an equivalent of the first
example, using 5.6.0, prints:
7FC3C3C3010ACCCCCCCCCC
the expected result being:
7FFFFFFE010ACCCCCCCCCC
using version 5.005 the value that first gets packed into
$message->{data} is
010A0000000010
and the result seen is
7FFFFFFE010A0000000010
The presence of 'CCCCCCCCCC' rather than '0000000010' is indicative of
yet another problem introduced by the update, which I have not tracked
down.
substitution of the line:
$message->{data} = join '', ($packed_session_id, $message->{data});
for the concatination had no effect; produced the same result using
5.6.0
Using the StringToHex routine to convert the structures for printing
just before the concatination confirms that the two variables contain
the values in the example.
Now, for the other problem:
In our code, an equivalent of the second example, using 5.6.0 prints:
7E02000B7FC3C3C3010ACCCCCCCCCC7E
which given the input is the expected result, but examining the file
produced by our code gives the following result:
$ od -x binary_struct_out
0000000 7e02 000b 7fc3 bfc3 bfc3 be01 0acc 80cc
0000020 80cc 80cc 80cc 907e
0000030
$
Using 5.005 the packed string for the second example, in our code, is
actually (in hex):
7E02000B7FFFFFFE010A00000000107E
and the result of examining the file is as expected;
$ od -x binary_struct_out
0000000 7e02 000b 7fff fffe 010a 0000 0000 107e
0000020
$
The second problem was actually first discovered when the binary
structure was written to a socket using TCP/IP. We were only expecting
16 (Ox0B + 5) bytes on the other end, but those bytes were corrupted
in the exact same manner as the print to file which was later
introduced for debugging purposes. The write to the socket was also
using perl.
One other peice of the puzzle when I use a session ID of '00000001'
instead of '7FFFFFFE' the first problem does not occur and the
second problem still occurs but there are fewer corrupting bytes.
Unfortunately our customer wishes to update perl to perl 5.6.0
Attempts to reproduce these problems in simple terms have been
unsuccessful. The nature of these problems suggests to me that there
is some kind of pointer or memory problem with perl version 5.6.0
Any suggestions, other than persuading our customer not to update
perl, are welcome at this point.
As I am not a regular reader of this news group, would you be
so kind as to send responses to anthon(no spam)y@netleaf.com
Note : my email address does not include parentheses nor what's
between them.
TIA,
--
Anthony Christopher \\
NetLeaf Technologies, Inc. \\ "With what? Your bare hands?"
------------------------------
Date: Thu, 03 Aug 2000 10:35:04 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: 5.005 to 5.6.0 migration- need help with some problems
Message-Id: <3989AD48.3F6750E0@stomp.stomp.tokyo>
Anthony Christopher wrote:
(snippage)
> We have encountered a few problems in moving from
> perl 5.005 to perl 5.6.0 on Solaris on a Sparc
> workstation.
Buggy Perl 5.6 strikes again!
> Any suggestions, other than persuading our customer
> not to update perl, are welcome at this point.
Why would a person suggest you persuade your customer not
to upgrade with your having already upgraded?
So you expect free help but only per your rules?
This single customer must be generating black ink income
for you, in the range of tens of thousands to make this
a worthwhile venture. Reads you are investing a lot of
man hour monies for this customer.
You have upgraded to buggy Perl 5.6 and, you have no choice
but to deal with these problems, logically, one at a time.
Certainly there are easy answers to some problems, however,
you will generate more problems in cure and, you will most
certainly discover more problems as you move along.
As harsh as this sounds, if not rude in nature, roll up
your sleeves, get to work and start resolving your problems
one at a time through effective research of your installation
manual, online reference sources and resources available to
you via online documentation. Certainly you will receive a
myriad answers here and, will return with myriad questions
as you discover more problems. You are using a shotgun
approach as cure; blast away and hope to hit something.
Effective research will arm you with a scope equipped 22
caliber target rifle. One shot, one bull's-eye. Just don't
shoot any of Mother Nature's living creatures. This is
not nice these days; it's Bad Karma.
As an English major, a hyphen within bull's-eye is rather
annoying for me.
There is an easy cure. Uninstall buggy Perl 5.6 and go back
to an older more stable and reliable version. Somehow I suspect
satiation for this single customer is truly not a wise investment.
> As I am not a regular reader of this news group, would you be
> so kind as to send responses to anthon(no spam)y@netleaf.com
Would you like your responses gift wrapped or served upon
a well polished silver platter? How very arrogant of you
to drop in here seeking free help and expect those who would
help you, to deliver their services, for free, to your
very doorstep, packaged per your rules.
Godzilla!
--
And you can't always get what you want, honey.
You can't always get what you want.
You can't always get what you want,
But if you try sometime, yeah,
You just might find you get what you need!
http://la.znet.com/~callgirl3/cantget.mid
------------------------------
Date: Thu, 03 Aug 2000 13:56:31 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: 5.005 to 5.6.0 migration- need help with some problems
Message-Id: <3989B24F.8A28ABC0@attglobal.net>
"Godzilla!" wrote:
>
> Anthony Christopher wrote:
>
> (snippage)
>
> > We have encountered a few problems in moving from
> > perl 5.005 to perl 5.6.0 on Solaris on a Sparc
> > workstation.
>
> Buggy Perl 5.6 strikes again!
>
Can you please cite 5 bugs you have discovered? Can you
cite 3? How about 1?
------------------------------
Date: Thu, 3 Aug 2000 10:34:06 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: bitwise and decimal number...
Message-Id: <MPG.13f34ce5e46a374398ac2d@nntp.hpl.hp.com>
In article <8mbr1l$mh4$1@nnrp1.deja.com> on Thu, 03 Aug 2000 13:11:21
GMT, JMarsan <jmarsan@my-deja.com> says...
Please leave attributions in your quotes, so readers can know who said
what. In this case, I said:
> > print unpack C => pack B8 => $c;
...
> I tried your solution and instead of printing 3, which is the decimal
> value of $c that contains 11000000, it prints 192.
>
> I am missing something here?
Yes. One of the capabilities of pack(). If you want the bits to be
interpreted in the reverse order, replace 'B8' by 'b8' in the above
example.
perldoc -f pack
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 3 Aug 2000 19:28:24 +0200
From: "Charles Betman" <charles@betman.demon.nl>
Subject: Database access
Message-Id: <965323458.26946.0.pluto.d4ee0b73@news.demon.nl>
Hi there,
What I'm looking for is a way to use a real database (in stead of flat
files), accessing it through SQL / ODBC under the following conditions:
- I can use a standard account with an ISP that allows executing CGI-scripts
- I don't need a database- or applicationserver
- the database consists out of one or more files that contain the data
(managed through SQL); no other processes or programmes are necessary
I've heard about MySQL, but I guess I need a provider that support a
database like that.
I hope I made myself clear (always difficult in another language) and that
somebody can tell me which tools / techniques to use, where to find
documentation, whatever.
--
Met vriendelijke groet,
Charles
http://www.betman.demon.nl/
charles@betman.demon.nl
------------------------------
Date: Thu, 03 Aug 2000 15:25:22 GMT
From: gbacon@HiWAAY.net (Greg Bacon)
Subject: Re: date manipulation
Message-Id: <soj3n23sdbm158@corp.supernews.com>
In article <8mc0r5$r9e$1@nnrp1.deja.com>,
<jponder9@my-deja.com> wrote:
: As a bit of a newbie to perl programming, I was wondering if there
: is a tried and tested way of calculating dates (day/month/year) in the
: future from a given date. e.g. given todays date what will the date be
: 364 days from now.
Use the Date::Calc module (available on the CPAN):
use Date::Calc qw/ Add_Delta_Days /;
my($y,$m,$d) = Add_Delta_Days 2000, 08, 03 => 364;
Greg
--
Give a man a fish and he will eat for a day. Teach him how to fish,
and he will sit in a boat and drink beer all day.
-- George Carlin
------------------------------
Date: 03 Aug 2000 17:39:11 +0100
From: nobull@mail.com
Subject: Re: date manipulation
Message-Id: <u9zomu2tao.fsf@wcl-l.bham.ac.uk>
jponder9@my-deja.com writes:
> It occured to me that this type of problem must occur quite often,
> often enough for there to be a formula or generic code to solve it.
In fact there's a generic formula that stands a good chance of solving
_any_ problem that "must occur quite often" in Perl.
It goes like this:
Look to see if there's an question in the FAQ. (perldoc perlfaq)
Look to see if there's a builtin function. (perldoc perlfunc)
Look for a module on CPAN. (http://www.cpan.org/)
I think you need to look into the Date::* modules on CPAN.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 03 Aug 2000 17:28:46 GMT
From: jsd@cluttered.com (Jon Drukman)
Subject: Re: DBI: Same data accessed twice?
Message-Id: <slrn8ojav1.ne6.jsd@cluttered.com>
On Thu, 03 Aug 2000 05:29:00 GMT, Paul King <pking@idirect.com> wrote:
>> also, don't you want to ORDER BY partnum?
>
>Messages were placed in the db in order of partnum. So, it makes
>sense that I would get them out in that order, since they should at
>least come out in the same order I put them in. There will only ever
>be one process writing to the database.
yeah, but you don't want to rely on that. relational databases are
never required to give you anything in any particular order (unless you
specify an ORDER BY clause). it's just a convention that they generally do.
program defensively! :)
>Thanks for your input.
you're welcome.
-jsd-
------------------------------
Date: Thu, 03 Aug 2000 15:38:04 GMT
From: thomaskoehn@my-deja.com
Subject: error message with mod_perl
Message-Id: <8mc3ks$tn5$1@nnrp1.deja.com>
Hi,
I have compiled mod_perl and apacge with no problems.
Now I want to use the NT Domain authentication .
I installed Apache-AuthenSMB-0.60, Authen-Smb-0.91 - also no problems.
But I still get errors in the apache error log.
Can't locate object method "get_handlers" via package "Apache" at
/usr/local/lib/perl5/site_perl/5.005/Apache/AuthenSmb.pm line 45.
can anybody help me ?
Thomas
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 10:21:08 -0500
From: Topher Cawlfield <cawlfiel@uiuc.edu>
Subject: Re: Excessive memory use under OSF1 (was: numeric storage efficiency)
Message-Id: <39898DE4.6E843CE1@uiuc.edu>
Hi, and thanks for following up on this. I'm sorry I didn't have the time
to reply yesterday. Too busy preparing for my "prelim" exam in physics.
What results are you getting with Perl on Solaris and Linux? Are they
similar to what I found running under Linux? Although the memory usage
under Linux was much less than under OSF1, it was still much greater than I
would naively expect. Perhaps the scalar can hold both a string and a
numeric representation simultaneously, if Perl deems it convienient. In
that case, the numeric representation should only add maybe 12 or so (at
most!) more bytes to the value, which is 8 for the double precision number
and maybe another four for some kind of flag or pointer. Instead, it's
using an extra 32 bytes! What for?
OSF1 is much worse, adding about 64 extra bytes for the additional numeric
representation. Whew, those numbers are expensive!
I guess I'm not sure why you are identifying this as a bug in the OSF1
port. In some sense it's not a bug since the interpreter isn't really
failing in any way. But it looks like there could be room for improvement
even so. You do not consider this to be a bug in Perl on Solaris or Linux,
which makes me think that you understand this behavior much better than I
do. I suppose the doubling of the memory requirements for OSF1 is related
to some default word size. I thought that integers and pointers in both
OSF1 and Linux were 32 bits, but maybe I'm wrong. I heard from someone
that Linux was a "32-bit" operating system, whereas OSF1 was a "64-bit"
OS. They said that one consequence of this is that you can't have files
larger than 4GB in Linux, but they can be much larger in OSF1. Since I've
never dealt with any files larger than maybe 2 GB I filed that comment
under "almost useless trivia".
Hmm, are 32 and 64 bytes the addressable word sizes on the two OS'es?
- Topher
Ilmari Karonen wrote:
>
...
>
> This seems to be architecture dependent: I can reproduce the problem
> on "perl, v5.6.0 built for alpha-dec_osf", but not with the exact same
> code run on either "perl, version 5.004_04 built for sun4-solaris" or
> "perl, version 5.005_03 built for i386-linux".
>
> I'd say you've hit a bug in the OSF1 port.
>
------------------------------
Date: 3 Aug 2000 17:09:28 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Excessive memory use under OSF1 (was: numeric storage efficiency)
Message-Id: <965322124.5062@itz.pp.sci.fi>
In article <39898DE4.6E843CE1@uiuc.edu>, Topher Cawlfield wrote:
>that case, the numeric representation should only add maybe 12 or so (at
>most!) more bytes to the value, which is 8 for the double precision number
>and maybe another four for some kind of flag or pointer. Instead, it's
>using an extra 32 bytes! What for?
Well, let me quote from "perldoc perldebug":
Debugging Perl memory usage
Perl is very frivolous with memory. There is a saying
that to estimate memory usage of Perl, assume a reasonable
algorithm of allocation, and multiply your estimates by
10. This is not absolutely true, but may give you a good
grasp of what happens.
Say, an integer cannot take less than 20 bytes of memory,
a float cannot take less than 24 bytes, a string cannot
take less than 32 bytes (all these examples assume 32-bit
architectures, the result are much worse on 64-bit
architectures). If a variable is accessed in two of three
different ways (which require an integer, a float, or a
string), the memory footprint may increase by another 20
bytes. A sloppy malloc() implementation will make these
numbers yet more.
And now that I look at it again, it seems the OSF1 results aren't that
far from the others after all - I'd simply misinterpreted the slightly
different output of ps(1) on that platform. I blame lack of coffee..
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method." -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: 03 Aug 2000 17:42:07 +0100
From: nobull@mail.com
Subject: Re: File IO
Message-Id: <u9ya2e2t5s.fsf@wcl-l.bham.ac.uk>
"Robert Lee" <robert99@maine.rr.nodamnspam.com> writes:
> Hi, I'm new to Perl
See FAQ. I don't know what you are about to say but 99% of the time
"Hi, I'm new to Perl" means "I need to be told to read the FAQ".
> and I was wondering if anyone could either explain how
> to do file IO or point me in the right direction (a tutorial or
> FAQ).
perldoc perlopentut
For a more modern approch see also perldoc IO::File
> Right now its opening the file for OUTPUT and I wanted APPEND mode.
No need to read the whole tutorial for that, just read the manual page
for the open function ("perldoc -f open") and note the bit about
opening for appending.
> Also, am I using that break correctly? I want to jump out of the
> WHILE after it finds the correct field.
Senamtically your use of 'break' is correct except in perl it's
spelled 'last'.
> while( ($key, $value) = each%in) {
> if ($key='opinion') {
Your attempt to use "while", "each" and "if" to extract the data
associated with a known key from a hash is just plain perverse.
$value = $in{opinion};
Learn about hashes and how to access them in "perldoc perldata".
Your use of then assignment '=' operator rather than string equality
'eq' operator in the 'if' condition will mean your code won't do what
you intend anyhow. Perl would have told you of this mistake if you'd
allow it.
Your refusal to follow all the standard advice given to all newbies
who come here[*] is frustrating and insulting because it means you
think we should take time to answer your questions when you've not
taken the time to lurk and get the feel of the group.
[*] enable warnings, use strict, check return values from functions
that can often fail.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 03 Aug 2000 16:15:12 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: five lines of NQL or 45 lines of Perl hmmmm......
Message-Id: <kUgi5.990$82.58611@news.dircon.co.uk>
On Wed, 2 Aug 2000 14:23:01 -0500, Doug Manney Wrote:
> Scripters and Programmers,
>
I dont buy things from spammers.
/J\
------------------------------
Date: Thu, 03 Aug 2000 12:20:45 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: five lines of NQL or 45 lines of Perl hmmmm......
Message-Id: <39899BDD.148F2981@attglobal.net>
Jonathan Stowe wrote:
>
> On Wed, 2 Aug 2000 14:23:01 -0500, Doug Manney Wrote:
> > Scripters and Programmers,
> >
>
> I dont buy things from spammers.
But do you eat spam sandwiches?
------------------------------
Date: Thu, 03 Aug 2000 16:01:13 GMT
From: Jim Mauldin <mauldin@netstorm.net>
Subject: Re: Here's a tough one (relating to 500 error)
Message-Id: <398996C7.FAA1E1AA@netstorm.net>
jcrist@my-deja.com wrote:
>
> Now I edit it again and delete some of the code (more than just a space
^^^^
> or two) from one of those really long lines. Upload to the server in
> ASCII mode. I get a 500 Internal Server Error now.
Gee, I wonder if there could be a relationship between the deleted code
and the error?
-- Jim
------------------------------
Date: Thu, 03 Aug 2000 15:36:25 GMT
From: hugo.b@derivs.com
Subject: How to send values to another Server ???
Message-Id: <8mc3ho$tm0$1@nnrp1.deja.com>
Hi.
I have a Form that sends its values to a cgi-bin on my webserver.
How can send this values received in my perl script on a Linux server
to a NT Spreadsheet server that will use these valeus in excel to do
some calculations on these values and send them back to the perl script
which will display the answers on the HTML Page.
I need the code to actually send the $form{$Fields} to the NT
Spreadsheet server into Excel ......
Any Help ???
hugo.b@derivs.com
Thank you
HUGO
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 03 Aug 2000 15:11:04 GMT
From: brainmuffin@excite.com
Subject: HTML::Template
Message-Id: <8mc223$s96$1@nnrp1.deja.com>
If anyone has experience using imbedded loops with HTML:Template,
please e-mail me. Thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 3 Aug 2000 17:34:44 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Interpolating strings--special characters, _not_ variables
Message-Id: <965323582.10200@itz.pp.sci.fi>
In article <p54s53m6jm.fsf@nortelnetworks.com>, Paul D. Smith wrote:
>I've read FAQ4 but it talks about how to substitute variable values into
>constant strings. What I want to do is do all the special character
>expansion (\n, \t, etc.) on a constant string. It seems like this
>should be simple, but I can't find any way to do it.
I just recently wrote a module to do what you want. It's not on CPAN
yet, as it's not quite finished, but you can download it from:
http://www.sci.fi/~iltzu/Text-Substitute.pm
The interpolate() function is still buggy, but substitute(), which
does what you want, should work fine. Just say "NO" to eval.
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method." -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Thu, 03 Aug 2000 11:50:08 -0400
From: "Alex T." <samara_biz@hotmail.com>
Subject: Re: Is Learning Perl worth buying?
Message-Id: <398994AF.E540E9D2@hotmail.com>
> I'm also influenced a bit by the fact that there are no spelling or
> grammatical errors in your post, which makes you look a bit more
> intelligent that the typical poster here. ;-)
That's right. Not to forget the fact though, that maybe for half of the
people who post here English is NOT their native language.
------------------------------
Date: Thu, 03 Aug 2000 11:10:47 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: newb Q, Our perl guy left!!
Message-Id: <39899987.C7F6C8F1@rac.ray.com>
Nick Condon wrote:
>
> Russ Jones wrote:
> > president@whitehouse.gov wrote:
> > > Oh for fucks sake!
> > Pretty brave words for someone that's afraid to post under his own
> > name.
> How do you know Clinton doesn't hang out here, when he's finished at
> alt.binaries.pictures.erotica.interns?
I think he hangs out at whitehouse.com.
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
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 3901
**************************************