[25297] in Perl-Users-Digest
Perl-Users Digest, Issue: 7542 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 20 14:05:44 2004
Date: Mon, 20 Dec 2004 11:05:07 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 20 Dec 2004 Volume: 10 Number: 7542
Today's topics:
Re: [Q] $ARGV, <>, and command-line Perl chris-usenet@roaima.co.uk
Re: Comparing 2 dates ? <tadmc@augustmail.com>
Re: How to tell what is using memory xhoster@gmail.com
Re: inserting a line into the body of an eMail before f <dlr93612@yahoo.com>
Re: inserting a line into the body of an eMail before f <noreply@gunnar.cc>
Re: Is zero even or odd? <thegreatone@example.com>
Re: Is zero even or odd? <random.expqlr@fvadan.invalid.com>
Re: Is zero even or odd? <notfranz.heymann@btopenworld.com>
Re: Is zero even or odd? <dummy@dummy.net>
Re: Is zero even or odd? <dak@gnu.org>
Re: Is zero even or odd? <newage@sendarico.net>
Re: Is zero even or odd? <jmw@jmwa.demon.contraspam.yuk>
Re: Is zero even or odd? <jwkenne@attglobal.net>
Re: Is zero even or odd? <dummy@dummy.net>
Re: Is zero even or odd? <dak@gnu.org>
Re: Is zero even or odd? <jfields@austininstruments.com>
Re: Length of Array of Array of Array <sudhirx@gmail.com>
Re: MS Perl question -- how to use hacked script to wor <djcameron60616@yahoo.com>
Re: pcap -> sniffer <randy.nash@gmail.com>
Re: selecting STDOUT AND STDERR <tadmc@augustmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 20 Dec 2004 17:32:30 +0000
From: chris-usenet@roaima.co.uk
Subject: Re: [Q] $ARGV, <>, and command-line Perl
Message-Id: <euej92-qrc.ln1@moldev.cmagroup.co.uk>
l v <lv@aol.com> wrote:
> By changing perl -ane to perl -alne you can eliminate the chomp and the
> newlines from your code.
Ah. I had briefly wondered if that was possible, but hadn't even
considered the -l flag. Thanks for the heads up - it suddenly becomes
so much neater.
Chris
------------------------------
Date: Mon, 20 Dec 2004 10:19:03 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Comparing 2 dates ?
Message-Id: <slrncsdurn.mg8.tadmc@magna.augustmail.com>
Lance Hoffmeyer <lance-news@augustmail.com> wrote:
> I wish to compare the birthdays with the current day's date.
There are many modules on CPAN that work with Dates, I'd use one of them.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 20 Dec 2004 16:51:18 GMT
From: xhoster@gmail.com
Subject: Re: How to tell what is using memory
Message-Id: <20041220115118.790$6g@newsreader.com>
nikki5+@notspamar.com.au (Nikki R) wrote:
> Hi,
>
> I'm running a Perl script on Linux Red Hat 7.3 (in a company - I can't
> upgrade).
> My script uses up a lot of memory because it is reading large data files.
> The largest file is about 10MB.
And to what size does this 10MB file cause the script to grow? What
size would you find acceptable?
> The data files were stored by using Data::Dumper, and my script reads
> each data file one at a time:
>
> foreach .... {
> my $var1;
> # Suck in the entire Data::Dumper'd file.
> my $filestr = join('', <SOMEFILE>);
I think this first reads the entire file into an anonymous array or list
(taking one file-size worth of memory plus overhead) and then joins that
list into one string, requiring a second file-size worth of memory.
The array part can be freed as soon as the join is done. If you are going
to go this route, You should slurp it directly into a scalar.
> # The Data::Dumper file consists of a statement like:
> # $var1 = {....} ; # Large hash reference.
> eval $filestr;
> # That sets $var1 which is a hash reference. Now do something with
> $var1.
> ....
> }
>
> As the script runs, memory grows fairly quickly. I don't think have a
> memory leak anywhere - I think that Perl allocates new memory whenever
> it sees a larger data file than previously.
Well, then arrange for it process the largest data file first. If your
theory is correct, there should be no (or at least little) futher increase
in memory use as it goes on to tackle the smaller files. Then at least you
will know, one way or the other.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 20 Dec 2004 10:45:44 -0800
From: "Lisa" <dlr93612@yahoo.com>
Subject: Re: inserting a line into the body of an eMail before forwarding
Message-Id: <1103568344.265175.301700@z14g2000cwz.googlegroups.com>
Nope.
Returns;
Can't modify non-lvalue subroutine call at pop_the_box.cgi line 163,
<GEN0> line 136.
Lisa
------------------------------
Date: Mon, 20 Dec 2004 19:32:38 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: inserting a line into the body of an eMail before forwarding
Message-Id: <32olo3F3pf7s4U1@individual.net>
Lisa wrote:
> Does anyone know how to insert a line into the body of an eMail b4 your
> forward it?
<snip>
> #$EmailHeader{'Envelope-to'} <-now containes original addressee, and
> this is what I want to insert into the TOP of the body prior to sending
> it (below)
>
> my $Msg =
> Mail::MboxParser::Mail->new([$pop->Head($i)],[$pop->Body($i)]);
Maybe you can simply do:
my $Msg = Mail::MboxParser::Mail->new( [ $pop->Head($i) ],
[ "Original addressee: $EmailHeader{'Envelope-to'}\n\n",
$pop->Body($i) ] );
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Mon, 20 Dec 2004 09:07:37 -0700
From: Jim Thompson <thegreatone@example.com>
Subject: Re: Is zero even or odd?
Message-Id: <51uds05a87dvrsfsevr4662265e9dfsf22@4ax.com>
On Mon, 20 Dec 2004 14:34:03 -0000, BB <BB@BB.BB> wrote:
>Josef Moellers wrote:
>>
>> Gactimus wrote:
>> > I know 0 is neither negative or positive but what about odd/even? I think
>> > it's even.
>> >
>> > Odd numbers start at 1 and go every other number 1,3,5,7;1,-1,-3,-5,-7
>> > Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
>>
>> As it can be divided by 2 without a remainder, it is obviously even.
>
>The divisor would have to be something smaller than 0 like -2.
>Therefore zero is both even and negative.
>
>>
>> --
>> Josef Möllers (Pinguinpfleger bei FSC)
>> If failure had no penalty success would not be a prize
>> -- T. Pratchett
>
PSpice uses...
+1 if x>0
SGN(x) = 0 if x=0
-1 if x<0
which matches up with what is shown on Wolfram's site...
http://mathworld.wolfram.com/Sign.html
A real royal nuisance when applying SGN(x) to system behavioral
modeling.
...Jim Thompson
--
| James E.Thompson, P.E. | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona Voice:(480)460-2350 | |
| E-mail Address at Website Fax:(480)460-2142 | Brass Rat |
| http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
------------------------------
Date: Mon, 20 Dec 2004 16:16:41 +0000 (UTC)
From: "Mr. 4X" <random.expqlr@fvadan.invalid.com>
Subject: Re: Is zero even or odd?
Message-Id: <Xns95C5B02FB49E6mr4x@195.228.240.20>
BB <BB@BB.BB> wrote in message news:10sdomrcqe6qt0e@corp.supernews.com:
> Josef Moellers wrote:
>>
>> Gactimus wrote:
>> > I know 0 is neither negative or positive but what about odd/even? I
>> > think it's even.
>> >
>> > Odd numbers start at 1 and go every other number
>> > 1,3,5,7;1,-1,-3,-5,-7 Even starts at 2 and go every other number
>> > 2,4,6,8;2,0,-2,-4,-6,-8
>>
>> As it can be divided by 2 without a remainder, it is obviously even.
>
> The divisor would have to be something smaller than 0 like -2.
> Therefore zero is both even and negative.
Really? Is [positive number]*0 negative?
>>
>> --
>> Josef Möllers (Pinguinpfleger bei FSC)
>> If failure had no penalty success would not be a prize
>> -- T. Pratchett
>
>
------------------------------
Date: Mon, 20 Dec 2004 16:24:42 +0000 (UTC)
From: "Franz Heymann" <notfranz.heymann@btopenworld.com>
Subject: Re: Is zero even or odd?
Message-Id: <cq6uca$6nt$1@sparta.btinternet.com>
"BB" <BB@BB.BB> wrote in message
news:10sdomrcqe6qt0e@corp.supernews.com...
> Josef Moellers wrote:
> >
> > Gactimus wrote:
> > > I know 0 is neither negative or positive but what about
odd/even? I think
> > > it's even.
> > >
> > > Odd numbers start at 1 and go every other number
1,3,5,7;1,-1,-3,-5,-7
> > > Even starts at 2 and go every other number
2,4,6,8;2,0,-2,-4,-6,-8
> >
> > As it can be divided by 2 without a remainder, it is obviously
even.
>
> The divisor would have to be something smaller than 0 like -2.
> Therefore zero is both even and negative.
Oh, dear.
Franz
------------------------------
Date: Mon, 20 Dec 2004 16:25:14 GMT
From: "Androcles" <dummy@dummy.net>
Subject: Re: Is zero even or odd?
Message-Id: <K1Dxd.43429$Rf4.21221@fe2.news.blueyonder.co.uk>
"Tam/WB2TT" <t-tammaru@c0mca$t.net> wrote in message
news:uLadna6l--ViclvcRVn-qA@comcast.com...
>
> "BB" <BB@BB.BB> wrote in message
> news:10sdomrcqe6qt0e@corp.supernews.com...
>> Josef Moellers wrote:
>>>
>>> Gactimus wrote:
>>> > I know 0 is neither negative or positive but what about odd/even?
>>> > I think
>>> > it's even.
>>> >
>>> > Odd numbers start at 1 and go every other number
>>> > 1,3,5,7;1,-1,-3,-5,-7
>>> > Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
>>>
>>> As it can be divided by 2 without a remainder, it is obviously even.
>>
>> The divisor would have to be something smaller than 0 like -2.
>> Therefore zero is both even and negative.
>>
>>>
>>> --
>>> Josef Möllers (Pinguinpfleger bei FSC)
>>> If failure had no penalty success would not be a prize
>>> -- T. Pratchett
>>
>>
> I seeem to recall 0 coming up negative in some old IBM mainframes.
> That was an artifact of the way signed numbers were converted to
> binary.
>
> Tam
Not quite, but close. The ones-complement is to convert all zeroes to
one
and all ones to zero.
The twos-complement is the same as the ones-complement but then one is
added.
Thus a negative zero is created by from binary 00000000 to become
11111111 which represents -1. By adding 1, we obtain (1)00000000
and the register, being unable to hold the 9th digit, is said to
overflow,
leaving 00000000.
This is a software matter that is independent of IBM.
When the numbers are fractional, as would be needed for sines
and cosines, etc, the difference between 0.999 and 1.0 is seldom
significant, but the difference between -1 and 0 is a catastrophe.
When I was test engineering for flight simulators, the DC9 sits
on the runway with the nose pitched down by 0.5 degrees. Upon
take off, it passes through zero and the pitch becomes positive.
Exacly a zero degrees, the image flipped upside down and displayed
the runway from the tail, going away, instead of the forward view,
then flipped back to normal. Failing to use the 2's complement
was the cause.
Androcles.
------------------------------
Date: Mon, 20 Dec 2004 17:59:14 +0100
From: David Kastrup <dak@gnu.org>
Subject: Re: Is zero even or odd?
Message-Id: <x5d5x4nbx9.fsf@lola.goethe.zz>
John Woodgate <jmw@jmwa.demon.contraspam.yuk> writes:
> I read in sci.electronics.design that Gactimus <gactimus@xrs.net> wrote
> (in <10sdnunotbnere2@corp.supernews.com>) about 'Is zero even or odd?',
> on Mon, 20 Dec 2004:
>>I know 0 is neither negative or positive but what about odd/even? I think
>>it's even.
>>
>>Odd numbers start at 1 and go every other number 1,3,5,7;1,-1,-3,-5,-7
>>Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
>
> There is other evidence. Even powers of negative numbers are positive,
> and (-x)^0 = 1, which is usually positive. (;-)
(-0)^2 = -0
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
------------------------------
Date: Mon, 20 Dec 2004 17:21:20 GMT
From: "Morituri-|-Max" <newage@sendarico.net>
Subject: Re: Is zero even or odd?
Message-Id: <kSDxd.34179$jf5.6646@fe1.texas.rr.com>
Gactimus wrote:
> I know 0 is neither negative or positive but what about odd/even? I think
> it's even.
It's a placeholder you twit.
------------------------------
Date: Mon, 20 Dec 2004 17:31:38 +0000
From: John Woodgate <jmw@jmwa.demon.contraspam.yuk>
Subject: Re: Is zero even or odd?
Message-Id: <HDKkWBH6xwxBFwWS@jmwa.demon.co.uk>
I read in sci.electronics.design that David Kastrup <dak@gnu.org> wrote
(in <x5d5x4nbx9.fsf@lola.goethe.zz>) about 'Is zero even or odd?', on
Mon, 20 Dec 2004:
>(-0)^2 = -0
>
>--
>David Kastrup, Kriemhildstr. 15, 44793 Bochum
Not even in Bochum. (;-)
Lim{x->0}[(-x^)2] = 0
--
Regards, John Woodgate, OOO - Own Opinions Only.
The good news is that nothing is compulsory.
The bad news is that everything is prohibited.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
------------------------------
Date: Mon, 20 Dec 2004 13:08:13 -0500
From: "John W. Kennedy" <jwkenne@attglobal.net>
Subject: Re: Is zero even or odd?
Message-Id: <1EExd.8182$b52.2147@fe12.lga>
Androcles wrote:
> "Tam/WB2TT" <t-tammaru@c0mca$t.net> wrote in message
> news:uLadna6l--ViclvcRVn-qA@comcast.com...
>
>>"BB" <BB@BB.BB> wrote in message
>>news:10sdomrcqe6qt0e@corp.supernews.com...
>>
>>>Josef Moellers wrote:
>>>
>>>>Gactimus wrote:
>>>>
>>>>>I know 0 is neither negative or positive but what about odd/even?
>>>>>I think
>>>>>it's even.
>>>>>
>>>>>Odd numbers start at 1 and go every other number
>>>>>1,3,5,7;1,-1,-3,-5,-7
>>>>>Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
>>>>
>>>>As it can be divided by 2 without a remainder, it is obviously even.
>>>
>>>The divisor would have to be something smaller than 0 like -2.
>>>Therefore zero is both even and negative.
>>>
>>>
>>>>--
>>>>Josef Möllers (Pinguinpfleger bei FSC)
>>>> If failure had no penalty success would not be a prize
>>>> -- T. Pratchett
>>>
>>>
>>I seeem to recall 0 coming up negative in some old IBM mainframes.
>>That was an artifact of the way signed numbers were converted to
>>binary.
>>
>>Tam
>
> Not quite, but close. The ones-complement is to convert all zeroes to
> one
> and all ones to zero.
> The twos-complement is the same as the ones-complement but then one is
> added.
> Thus a negative zero is created by from binary 00000000 to become
> 11111111 which represents -1. By adding 1, we obtain (1)00000000
> and the register, being unable to hold the 9th digit, is said to
> overflow,
> leaving 00000000.
> This is a software matter that is independent of IBM.
Before 1964, twos-complement was not at all universal. Both
ones-complement (-1 = 111110) and sign/absolute (-1 = 100001) were to be
seen. (Some machines weren't even binary.) Unique representation of zero
was one reason that twos-complement eventually won out.
--
John W. Kennedy
"You can, if you wish, class all science-fiction together; but it is
about as perceptive as classing the works of Ballantyne, Conrad and W.
W. Jacobs together as the 'sea-story' and then criticizing _that_."
-- C. S. Lewis. "An Experiment in Criticism"
------------------------------
Date: Mon, 20 Dec 2004 18:37:27 GMT
From: "Androcles" <dummy@dummy.net>
Subject: Re: Is zero even or odd?
Message-Id: <HZExd.5050$ef5.3557@fe1.news.blueyonder.co.uk>
"John W. Kennedy" <jwkenne@attglobal.net> wrote in message
news:1EExd.8182$b52.2147@fe12.lga...
> Androcles wrote:
>> "Tam/WB2TT" <t-tammaru@c0mca$t.net> wrote in message
>> news:uLadna6l--ViclvcRVn-qA@comcast.com...
>>
>>>"BB" <BB@BB.BB> wrote in message
>>>news:10sdomrcqe6qt0e@corp.supernews.com...
>>>
>>>>Josef Moellers wrote:
>>>>
>>>>>Gactimus wrote:
>>>>>
>>>>>>I know 0 is neither negative or positive but what about odd/even?
>>>>>>I think
>>>>>>it's even.
>>>>>>
>>>>>>Odd numbers start at 1 and go every other number
>>>>>>1,3,5,7;1,-1,-3,-5,-7
>>>>>>Even starts at 2 and go every other number 2,4,6,8;2,0,-2,-4,-6,-8
>>>>>
>>>>>As it can be divided by 2 without a remainder, it is obviously
>>>>>even.
>>>>
>>>>The divisor would have to be something smaller than 0 like -2.
>>>>Therefore zero is both even and negative.
>>>>
>>>>
>>>>>--
>>>>>Josef Möllers (Pinguinpfleger bei FSC)
>>>>> If failure had no penalty success would not be a prize
>>>>> -- T. Pratchett
>>>>
>>>>
>>>I seeem to recall 0 coming up negative in some old IBM mainframes.
>>>That was an artifact of the way signed numbers were converted to
>>>binary.
>>>
>>>Tam
>>
>> Not quite, but close. The ones-complement is to convert all zeroes to
>> one
>> and all ones to zero.
>> The twos-complement is the same as the ones-complement but then one
>> is added.
>> Thus a negative zero is created by from binary 00000000 to become
>> 11111111 which represents -1. By adding 1, we obtain (1)00000000
>> and the register, being unable to hold the 9th digit, is said to
>> overflow,
>> leaving 00000000.
>> This is a software matter that is independent of IBM.
>
> Before 1964, twos-complement was not at all universal. Both
> ones-complement (-1 = 111110) and sign/absolute (-1 = 100001) were to
> be seen. (Some machines weren't even binary.) Unique representation of
> zero was one reason that twos-complement eventually won out.
Egads... Aircraft flew on analogue machines then. Concorde was using DTL
for self-test only in 1977, I designed the test for the self test
computer using
state of the art EPROM.
Androcles.
>
> --
> John W. Kennedy
> "You can, if you wish, class all science-fiction together; but it is
> about as perceptive as classing the works of Ballantyne, Conrad and W.
> W. Jacobs together as the 'sea-story' and then criticizing _that_."
> -- C. S. Lewis. "An Experiment in Criticism"
------------------------------
Date: Mon, 20 Dec 2004 19:56:40 +0100
From: David Kastrup <dak@gnu.org>
Subject: Re: Is zero even or odd?
Message-Id: <x5oegolrx3.fsf@lola.goethe.zz>
John Woodgate <jmw@jmwa.demon.contraspam.yuk> writes:
> I read in sci.electronics.design that David Kastrup <dak@gnu.org> wrote
> (in <x5d5x4nbx9.fsf@lola.goethe.zz>) about 'Is zero even or odd?', on
> Mon, 20 Dec 2004:
>>(-0)^2 = -0
>>
>
> Not even in Bochum. (;-)
>
> Lim{x->0}[(-x^)2] = 0
Either you mangled your parentheses, or this is a insidious way of
sneaking in a smilie.
If the former: in what respect does this negate my statement? While
the limit need not necessarily be the same as the value itself (a
frequent mistake when talking about 0^0), we actually _do_ arrive at
the same result even in the limit here.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
------------------------------
Date: Mon, 20 Dec 2004 12:59:46 -0600
From: John Fields <jfields@austininstruments.com>
Subject: Re: Is zero even or odd?
Message-Id: <i38es0hm84fs7esii5go3qgo7lodeh7n5e@4ax.com>
On Mon, 20 Dec 2004 15:50:04 GMT, "Androcles" <dummy@dummy.net> wrote:
>> Zero has no sign. Consider:
>>
>> If zero was positive, 1+0 > 1, but 1+0 = 0
>> If zero was negative, 1+0 < 1, but 1+0 = 0
>
>I thought 1+0 = 1, but I guess I can't do hard sums.
>Androcles.
---
Aaargghhh!!!
LOL!, Neither can I, obviously!
--
John Fields
------------------------------
Date: 20 Dec 2004 09:23:13 -0800
From: "salsablr" <sudhirx@gmail.com>
Subject: Re: Length of Array of Array of Array
Message-Id: <1103563393.117080.289880@z14g2000cwz.googlegroups.com>
Thanks for the Info, I figured out and its working
$# {$g_Ao_TEList[$index]{$teIt}[0][0]} yields the last index of the
array.
salsablr wrote:
> Well, I'm yet to figure out what is causing the problem.
> My data structure is a little complex (atleast complex for me)
>
> $# {$g_Ao_TEList[$index]{$teIt}[0][0]}
> <=== This doesn't works; infact i tried to store the count in
> $lines which results nothing.
>
> I have an "Array(1)" which references to "Array of Hashes" and the
> value of each of the keys in the array references to an "Array of
Array
> of Array"
>
> Now 'm trying to get the last index of the Array from "Array of Array
> of Array".... Any pointers..
>
>
> Tad McClellan wrote:
> > Tom <sudhirx@gmail.com> wrote:
> >
> > > How to find the length of an "Array of Array of Array"
> > >
> > > I get syntax error when i say $#fx[0][0][0]
> >
> >
> > Well first off, the $#array syntax does NOT give you the length
> > of the array, it gives you the last index in the array.
> >
> > The @array syntax in a scalar context gives you the length of the
> array.
> >
> >
> > To find the length of your multi-dim array, simply apply "Use Rule
1"
> from:
> >
> > perldoc perlreftut
> >
> >
> > I usually do it in 3 steps:
> >
> > my $length = @array; # pretend it is a regular old array
> >
> > my $length = @{ }; # replace the _name_ of the array with a
> block
> >
> > my $length = @{ $fx[0][0][0] }; # fill in the block with code
> that
> > # returns a reference to the
> > # right kind of thingy
> >
> > --
> > Tad McClellan SGML consulting
> > tadmc@augustmail.com Perl programming
> > Fort Worth, Texas
------------------------------
Date: 20 Dec 2004 08:15:56 -0800
From: "James" <djcameron60616@yahoo.com>
Subject: Re: MS Perl question -- how to use hacked script to work correctly(was Question on loops and return values or sumpin)
Message-Id: <1103559356.298808.19390@z14g2000cwz.googlegroups.com>
Sinan, thank you for taking the time to look over my question and reply
to it. I believe the errors were from (not required in Windows, but
someone made a point of it (for whatever reason) to be like a unix-perl
scripter and use a #! perl -w in the first line, like on unix would be
as you say .. #! /usr/bin/perl -w) my ignorance of not putting a bang
sign on the first line, #! perl -w
The integer bounds question is as growth drops or rises, if it reaches
a point to change sign, is it just a metter of handling exceptions of
variable types in the script, or is it a matter of using any math
functions in your opinion?
Growth-rate is supposed to mark the points/change in values from
current freespace and lastfreespace, and I thought that was a correct
formula. I'll have to play with it and see if it is.
>> my $server=our @Driveinfo;
> What on earth do you think this does?
I thought this would assign the array to the next server in the list,
where the drive array would be filled/manipulated later in the loop(s).
In a case such as this:
> The rest of your code, for example,
>> for my $k (keys %drive)
>> {
>> my $string = ($k => $drive{$k});
>> print "\t$k => $drive{$k}\n";
>> if ($k eq "DriveSpaceQuotaFree")
> {
>> my $nada = scalar($drive{$k});
>> next;
>> }
> can only be described as insanity-inducing. It looks like you have
not even made an attempt to actually read any Perl documentation.
I thought was all right in terms of tossing quotaspace away, I suppose
I could only let is search for the other two cases and omit this key.
I have tried to undestand the $whatnot names. Some of them I
understand, some of them I keep reading over and over to make sense of
them.
The variable growth could be omitted .. if it was necessary to keep
this for a better formula I guess its laziness keeping it here.
Thank you for your help.
James
------------------------------
Date: 20 Dec 2004 08:12:27 -0800
From: "Randy Nash" <randy.nash@gmail.com>
Subject: Re: pcap -> sniffer
Message-Id: <1103559147.151725.4780@z14g2000cwz.googlegroups.com>
Y3J1eG5vciwKCkkndmUgYmVlbiBkZXZlbG9waW5nIG15IG93biBwZXJsIHNuaWZmZXIuICBIb3cg
ZmFyIGFsb25nIGFyZSB5b3Ugbm93CihpdCdzIGJlZW4gc29tZSB0aW1lIHNpbmNlIHlvdXIgb3Jp
Z2luYWwgcG9zdGluZykuICBQbGVhc2UgZmVlbCBmcmVlIHRvCmNvbnRhY3QgbWUgYW5kIHdlIGNh
biBjb21wYXJlIG5vdGVzLgoKUmFuZHkKCmNydXhub3Igd3JvdGU6Cj4gSGVsbG8sCj4KPiBJJ20g
dHJ5aW5nIHRvIGNvZGUgYSBzaW1wbGUgc25pZmZlciBpbiBwZXJsLCBidXQgdGhlIHJlc3VsdHMg
SSBnZXQKPiBmcm9tIHBjYXAgYXJlbid0IHRob3NlIEkgaGFkIGV4cGVjdGVkIQo+IE15IHByb2Nl
c3Mgc3ViIGxvb2tzIGxpa2UgdGhpczoKPgo+IHN1YiBwcm9jZXNzX3BrdCB7Cj4gICBteSgkdXNl
cl9kYXRhLCAkaGRyLCAkcGt0KSA9IEBfOwo+Cj4gICBwcmludCAiJHBrdFxuIjsKPiB9Cj4KPiBB
bmQgdGhlIHJlc3VsdHMgaXMgc29tZXRoaW5nIGxpa2UgdGhpczoKPgo+IED4N8CoSzjAqEvdbmfz
Qc1zUPrwXjMKPiBA+TfAqEs4wKhL3W5n80HNc1D68F4zCj4g4m379HXz2kU260D4JMCoSzjAqEvd
bmfzQc1Q+sVCwFVTRVIgWFhYWAo+Cj4gdfNR4m37RTbrQPkkwKhLOMCoS91uZ/NBzVD6xULAVVNF
UiBYWFhYCj4KPiDibfv0dfPaRTTrQPghwKhLOMCoS91uZ/OhQc3EUPq2P1BBU1MgWFhYWAo+Cj4g
dfNR4m37RTTrQPkhwKhLOMCoS91uZ/OhQc3EUPq2P1BBU1MgWFhYWAo+Cj4g4m379HXz2kUu60D4
IsCoSzjAqEvdbmfzrUHN8lD6cbxYU1RBVAo+Cj4gdfNR4m37RS7rQPkiwKhLOMCoS91uZ/OtQc3y
UPpxvFhTVEFUCj4KPiDibfv0dfPaRS7rIUD4wKhLOMCoS91uZ/OzQc5Q+mOxXUxJU1QKPgo+IFdo
ZW4gSSBzbmlmZiB0aGUgbmV0d29yayB3aXRoIG5ncmVwLCB0aGUgcmVzdWx0IGlzIG11Y2ggbW9y
ZQo+IHJlYWRhYmxlIQo+IFRoZSBpbml0aWFsaXphdGlvbiBvZiBwY2FwIGlzIHRoZSBzYW1lIGFz
IGluIHRoZSBkb2N1bWVudGF0aW9uLgo+Cj4gRG9lcyBhbnlib2R5IGhhcyBhbiBpZGVhIGZvciB0
aGlzIHByb2JsZW0/Cj4gSSdtIGxvb2tpbmcgZm9yIGEgc25pZmZlciBsaWtlIG5ncmVwIG91dHB1
dC1zdHlsZS4KPiAKPiBjaWF1LCBjcnV4bm9yCg==
------------------------------
Date: Mon, 20 Dec 2004 08:31:32 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: selecting STDOUT AND STDERR
Message-Id: <slrncsdoi4.m4b.tadmc@magna.augustmail.com>
Bill Parker <bill@gites.org.uk> wrote:
> $stdout = select(LOG)
> print "something\n";
> select($stdout);
What does that get you?
Why not just
print LOG "something\n";
instead, with no select()ing required?
> But can I exactly mimic the ksh/bash redirect of stderr as well as stdout?
^^^^^^
perldoc -q stderr
How can I capture STDERR from an external command?
> And do I need to?
Only you can answer that, as it depends on what you *want* to happen...
> Does perl distinguish betwixt stdout and stderr?
Of course it does.
> What does
> "die" write to?
The very first sentence of
perldoc -f die
answers that.
You should read the documentation for the functions that you use.
> (s'pose I ought to test that out and find out for myself) -
No, you should rather read the documentation for the software that you use.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 7542
***************************************