[23602] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 5809 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 15 18:05:56 2003

Date: Sat, 15 Nov 2003 15:05:08 -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           Sat, 15 Nov 2003     Volume: 10 Number: 5809

Today's topics:
        access win32 from unix? <mikee@mikee.ath.cx>
    Re: access win32 from unix? <nospam@bigpond.com>
    Re: access win32 from unix? <mikee@mikee.ath.cx>
    Re: accuracy (er, precision) problem <ewilhelm@somethinglike.sbcglobalDOTnet>
        accuracy problem <ewilhelm@somethinglike.sbcglobalDOTnet>
    Re: accuracy problem <jurgenex@hotmail.com>
        Chomp doesn't work for me <mikeflan@earthlink.net>
    Re: function to return its argument literally - possibl <es@fruitcom.com>
        function to return its argument literally <es@fruitcom.com>
    Re: function to return its argument literally <jurgenex@hotmail.com>
    Re: Giving back <tcurrey@no.no.i.said.no>
    Re: Giving back <tcurrey@no.no.i.said.no>
    Re: Giving back <lord-jacob@comcast.net>
    Re: Help (Jay Tilton)
    Re: installing a perl module <kingja2990@yahoo.com.>
    Re: long running perl programs & memory untilization <stanb@panix.com>
    Re: lydia, slap him onto the mat <tejqeda@gacbis.org>
    Re: ParseRecur  from Date::Manip <lord-jacob@comcast.net>
    Re: regex to convert 1000000 -> 1,000,000 ? <wsanford@wallysanford.com>
    Re: regex to convert 1000000 -> 1,000,000 ? (Sam Holden)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 15 Nov 2003 22:05:42 -0000
From: Mike <mikee@mikee.ath.cx>
Subject: access win32 from unix?
Message-Id: <vrd8pm93hh79ac@corp.supernews.com>

Given the need to monitor win32 (win2k and winxp) boxes from unix,
and given that there are modules to access win32 performance
and other data, and given that this data can be accessed accross
the network, is there a way using perl to access this data
from unix (i.e. a unix box asks a windows box how much disk
space remains, etc)?

Mike


------------------------------

Date: Sun, 16 Nov 2003 08:35:35 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: access win32 from unix?
Message-Id: <3604003.zbEyzpW81I@gregs-web-hosting-and-pickle-farming>

It was a dark and stormy night, and Mike managed to scribble:

> Given the need to monitor win32 (win2k and winxp) boxes from unix,
> and given that there are modules to access win32 performance
> and other data, and given that this data can be accessed accross
> the network, is there a way using perl to access this data
> from unix (i.e. a unix box asks a windows box how much disk
> space remains, etc)?
> 
> Mike

You can run most of the CPAN modules on Win2k/winxp.

I was at a linux workshop yesterday & the sysdamin of a large retailer had http://cygwin.com/ installed on every windows PC.
Cygwin has most of the unix tools available under windows & allows him to do all sorts of remote admin.

gtoomey



------------------------------

Date: Sat, 15 Nov 2003 22:48:52 -0000
From: Mike <mikee@mikee.ath.cx>
Subject: Re: access win32 from unix?
Message-Id: <vrdbak1rgnkfd3@corp.supernews.com>

In article Toomey wrote:
> It was a dark and stormy night, and Mike managed to scribble:
> 
>> Given the need to monitor win32 (win2k and winxp) boxes from unix,
>> and given that there are modules to access win32 performance
>> and other data, and given that this data can be accessed accross
>> the network, is there a way using perl to access this data
>> from unix (i.e. a unix box asks a windows box how much disk
>> space remains, etc)?
>> 
>> Mike
> 
> You can run most of the CPAN modules on Win2k/winxp.
> 
> I was at a linux workshop yesterday & the sysdamin of a large retailer had http://cygwin.com/ installed on every windows PC.
> Cygwin has most of the unix tools available under windows & allows him to do all sorts of remote admin.
> 
> gtoomey
> 

What I'm searching for is a way to query a windows registery,
or the performance stats, or the services from unix across
the network. I'm not searching for cygwin or if I can run
a CPAN module on win32 itself.

Mike


------------------------------

Date: Sat, 15 Nov 2003 21:21:32 GMT
From: Eric Wilhelm <ewilhelm@somethinglike.sbcglobalDOTnet>
Subject: Re: accuracy (er, precision) problem
Message-Id: <pan.2003.11.15.15.22.11.554324.1618@somethinglike.sbcglobalDOTnet>

On Sat, 15 Nov 2003 15:12:32 -0600, Eric Wilhelm wrote:

I just realized that I had the wrong terminology, though that doesn't
change the problem.

> I'm running into some problems where 1+1 != 2.
> 
> I've tried compiling 5.8.0 and 5.9.0 with -Duselongdouble and
> XS::APItest::have_long_double() returns true, but I still cannot get the
> following code to perform correctly:

Forgot to mention that this in on an AMD MP2200 running Linux 2.4.21.

--Eric


------------------------------

Date: Sat, 15 Nov 2003 21:12:32 GMT
From: Eric Wilhelm <ewilhelm@somethinglike.sbcglobalDOTnet>
Subject: accuracy problem
Message-Id: <pan.2003.11.15.15.13.11.640507.1618@somethinglike.sbcglobalDOTnet>

I'm running into some problems where 1+1 != 2.  

I've tried compiling 5.8.0 and 5.9.0 with -Duselongdouble and 
XS::APItest::have_long_double() returns true, but I still cannot 
get the following code to perform correctly:

# test floating-point accuracy
@a = (40.23445,10.7784);  # this will fail
# @a = (0,0); # this will succeed
$r = 3/16;
$pi = atan2(1,1) * 4;
$ang = 12 * $pi / 180;

@s = ( $a[0] + $r * cos($ang), $a[1] + $r * sin($ang) );
@f = ( $a[0] - $r * cos($ang), $a[1] - $r * sin($ang) );

$dist = sqrt( ($f[0] - $s[0])**2 + ($f[1] - $s[1])**2);
$d = 2 * $r;
if($dist != $d) {
	print "failed:  $dist != $d\n";
	}
else {
	print "okay:  $dist == $d\n";
	}
# end 

this gives:
	failed:  0.374999999999999998 != 0.375

unless @a is set to (0,0)

Recreating the process in C and declaring everything as double gives the
same results, but if you declare as long double it will come up with
matching numbers, thus the quest to get a Perl working with long doubles.

Anyone have similar experiences?  Any way to fix this?  Rounding is not
a solution, because the contents of @s and @f are the desired product,
and the distance between them needs to be 2 * $r when computed with long
doubles (i.e. the inaccuracy apparently happens in the addition as
opposed to the distance calculation.)

Thanks,
Eric


------------------------------

Date: Sat, 15 Nov 2003 22:28:34 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: accuracy problem
Message-Id: <mMxtb.57933$p9.1943@nwrddc02.gnilink.net>

Eric Wilhelm wrote:
[...]
> this gives:
> failed:  0.374999999999999998 != 0.375
>
> Recreating the process in C and declaring everything as double gives
> the same results, but if you declare as long double it will come up
> with matching numbers, thus the quest to get a Perl working with long
> doubles.
>
> Anyone have similar experiences?

Everybody who tried to do computer numerics without knowing about computer
numerics.

> Any way to fix this?

Yes.
Is is mentioned in any computer numerics class thou shalt never compare
so-called real numbers (which are more aptly called floating point numbers)
for equality. Instead check if they are within an epsilon range of each
other.

Alternatively you can use a package for symbolic mathematic.

For further information see "perldoc -q 999" or your favourite book about
computer numerics

jue




------------------------------

Date: Sat, 15 Nov 2003 22:38:54 GMT
From: Mike Flannigan <mikeflan@earthlink.net>
Subject: Chomp doesn't work for me
Message-Id: <3FB6ABB9.31EE082C@earthlink.net>


Here's a script that does what I needed.  It sure took me
a long time to get it going correctly.  Please feel free
to comment on any part of the script, but I'd really like
to know why:

1)  I could not chomp the new line off the end of the
2nd column ($_->[1]) no matter what I did.  I tried
about 8 different things and they either turned the
string into a "1", a"0", or nothing at all.  What's the proper
(simple) way to do it?

2)  Why didn't my substring work on line 13?


Thanks,


Mike



use strict;
use warnings;

my %nam;
my $nam;
my $namt = "";
my $lc;

my @data = map [ split /\t/, $_, 2 ], <DATA>;

foreach (@data) {
    if (($_->[0] eq "#") and ($_->[1] eq "#\n")) {
#    if ((substr $_->[0],1 eq "#") and (substr $_->[1],1 eq "#")) {  #
LINE 13
        $nam{$namt}++;
#        $loc{$loct}++;
        $namt = "";
        next;
    }
    else {
        $namt .= " $_->[0].$_->[1]";
#        $loct .= " $_->[1]";
    }
}

for (keys %nam) {
    print "$_\t$nam{$_}\n";
}

__DATA__

New #
Friendship "T.42-R.4,"
Bap. S.36 Fran.
# #
Swieder Cem. Crawford
# #
# #
Swieder Cem. Crawford
# #
Swieder Cem. Crawford
# #
Swieder Cem. Crawford
# #
Swieder Cem. Crawford
# #
# #
# #
Swieder Cem. Crawford
# #
# #
Swieder Cem. Crawford
# #
Swieder Cem. Crawford
# #
Lick Creek "T.39-R.4,"
Cem. S.34 Craw.
# #
Cherryville #
Bap. Cem. Cherryville*
# #
Cherryville #
Bap. Cem. Cherryville*
# #
New "T.42-R.4,"
Friendship S.36 Fran.
Bap. #
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
Jewell "Jewell,"
# "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
Jewell "Jewell,"
# "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
Jewell "Jewell,"
# "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
# "Jewell,"
Jewell "Hamilton, IA"
# #
New #
Friendship "T.42-R.4,"
Bap. S.36 Fran.
# #




------------------------------

Date: 15 Nov 2003 21:02:49 GMT
From: Eric Smith <es@fruitcom.com>
Subject: Re: function to return its argument literally - possible solution
Message-Id: <3fb69479$0$88379$edd6591c@news.versatel.net>

Following up mu own post -

funny how posting a question makes you focus more clearly:
Maybe this is a solution

calling:
render( "1+1" );

 ... and using eval in the sub:

sub render{
  $_[0].
    sprintf("%.2f", nearest(0.05, eval"$_[0]"))
};

In article <3fb690e5$0$88376$edd6591c@news.versatel.net>, Eric Smith wrote:
> How do I get a function foo() below to return both `1+1' and `2' ?
> foo( 1+1 );
> 
> Eric


------------------------------

Date: 15 Nov 2003 20:47:33 GMT
From: Eric Smith <es@fruitcom.com>
Subject: function to return its argument literally
Message-Id: <3fb690e5$0$88376$edd6591c@news.versatel.net>

How do I get a function foo() below to return both `1+1' and `2' ?
foo( 1+1 );

Eric


------------------------------

Date: Sat, 15 Nov 2003 20:57:20 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: function to return its argument literally
Message-Id: <Qqwtb.42524$n6.32550@nwrddc03.gnilink.net>

Eric Smith wrote:
> How do I get a function foo() below to return both `1+1' and `2' ?
> foo( 1+1 );

You don't.
Your function foo() recieves only one argument which is the result of the
evaluation of the expression 1+1 which happens to be 2.
foo() has no way of knowing that there was anything else.

If you want foo() to know about the "literal" argument, then you need to
pass that as a text string:

foo ('1+1');

Or, depending on what your original problem is, maybe make it a
three-argument call:

foo( 1, '+', 1);

But I got a feeling that we are looking at an x-y problem. Meaning, you got
a problem x and you believe that y would be the best way to solve it,
therefore you are asking how to do y.
What is your x? Chances are there is a better way to do it then have
functions backtrack their arguments (which is not possible anyway).

jue




------------------------------

Date: Sat, 15 Nov 2003 11:01:34 -0800
From: "Trent Curry" <tcurrey@no.no.i.said.no>
Subject: Re: Giving back
Message-Id: <bp5tbc$buq$1@news.astound.net>

Alan J. Flavell wrote:
> On Sat, 15 Nov 2003, Gunnar Hjalmarsson wrote:
>
>> Trent Curry wrote:
>>> Just a little question, why do newer readers use > > > instead of
>>> >>> which gives more room for quoted text? It seems to me more and
>>> more readers use this for now instead of the spaced out version.
>>> Just wondering.
>>
>> Is that so? In that case, fewer and fewer developers read and/or care
>> to comply with applicable standards, such as RFC2646. Sad!
>
> I'm getting increasingly impatient with myself for following-up this
> off-topic thread, but ...
>
> Automatic re-flowing of text is surely only permissible according to
> this RFC when the item's content type has been suitably declared in
> the headers?  That means, first and foremost, conformance with MIME
> specifications.  See e.g the USEFOR draft, section 3.1.2.2, keeping in
> mind of course that USEFOR is still just a draft of a best-practice
> recommendation.  But it's the nearest that we have to a viable spec,
> since rfc1036 is positively geriatric but its successors never quite
> made it to official status.
>
> The people who were making allegations about other contributors'
> software being outdated, were themselves posting in Stone-age formats
> which pre-dated MIME, and thus their postings were were required to be
> treated as literally text/plain US-ASCII in the meaning of RFC2046
> (i.e format=fixed in the terms of RFC2646).
>
> But I doubt that they are sufficiently well-informed to appreciate
> how silly that makes them look.  Now I really must stop doing this.
>
> all the best

Ok I understand this more nad more doesnt belong here, but I do recall
seeing once or twice a regular saying "anything having to do with usenet is
on topic" or ot that effect. I'll be quick anyways though. RFC aside,
compare the following:

[Example 1 - condensed way]

---------1---------2---------3---------4---------5---------6---------7--

>>>>> Ok this is level 5 quoted text that can be a long line la la la la
>>>> Ok this is level 4 quoted text that can be a long line la la la la
>>> Ok this is level 3 quoted text that can be a long line la la la la
>> Ok this is level 2 quoted text that can be a long line la la la la
> Ok this is level 1 quoted text that can be a long line la la la la

Un quoted.

[Example 2 - standard way]

---------1---------2---------3---------4---------5---------6---------7--

> > > > > Ok this is level 5 quoted text that can be a long line la la la la
> > > > Ok this is level 4 quoted text that can be a long line la la la la
> > > Ok this is level 3 quoted text that can be a long line la la la la
> > Ok this is level 2 quoted text that can be a long line la la la la
> Ok this is level 1 quoted text that can be a long line la la la la

Un quoted.

[End examples]

This should should my main point, that the condensed form allows more text
in a line in deep quoted text than the standard spaced-out version.

That's all I'm saying. I'm not saying we should eschew one for the other,
just making a point from a formatting perspective :)

-- 
Trent Curry

perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1)!eg
;print(reverse("$s")."\n");'




------------------------------

Date: Sat, 15 Nov 2003 11:06:10 -0800
From: "Trent Curry" <tcurrey@no.no.i.said.no>
Subject: Re: Giving back
Message-Id: <bp5tk0$bv9$1@news.astound.net>

Alan J. Flavell wrote:
> On Sat, 15 Nov 2003, Gunnar Hjalmarsson wrote:
>
>> Trent Curry wrote:
>>> Just a little question, why do newer readers use > > > instead of
>>> >>> which gives more room for quoted text? It seems to me more and
>>> more readers use this for now instead of the spaced out version.
>>> Just wondering.
>>
>> Is that so? In that case, fewer and fewer developers read and/or
>> care
>> to comply with applicable standards, such as RFC2646. Sad!
>
> I'm getting increasingly impatient with myself for following-up this
> off-topic thread, but ...
>
> Automatic re-flowing of text is surely only permissible according to
> this RFC when the item's content type has been suitably declared in
> the headers?  That means, first and foremost, conformance with MIME
> specifications.  See e.g the USEFOR draft, section 3.1.2.2, keeping
> in mind of course that USEFOR is still just a draft of a
> best-practice recommendation.  But it's the nearest that we have to
> a viable spec, since rfc1036 is positively geriatric but its
> successors never quite
> made it to official status.
>
> The people who were making allegations about other contributors'
> software being outdated, were themselves posting in Stone-age formats
> which pre-dated MIME, and thus their postings were were required to
> be treated as literally text/plain US-ASCII in the meaning of RFC2046
> (i.e format=fixed in the terms of RFC2646).
>
> But I doubt that they are sufficiently well-informed to appreciate
> how silly that makes them look.  Now I really must stop doing this.
>
> all the best


[Reposted becuase my quote fix reformatted my examples...]

Ok I understand this more nad more doesnt belong here, but I do recall
 seeing once or twice a regular saying "anything having to do with
 usenet is on topic" or ot that effect. I'll be quick anyways though.
 RFC aside, compare the following:

[Example 1 - condensed way]

---------1---------2---------3---------4---------5---------6---------7--

>>>>> Ok this is level 5 quoted text that can be a long line la la la la
>>>> Ok this is level 4 quoted text that can be a long line la la la la
>>> Ok this is level 3 quoted text that can be a long line la la la la
>> Ok this is level 2 quoted text that can be a long line la la la la
> Ok this is level 1 quoted text that can be a long line la la la la

Un quoted.

[Example 2 - standard way]

---------1---------2---------3---------4---------5---------6---------7--

 > > > > > Ok this is level 5 quoted text that can be a long line la la la
la
> > > > Ok this is level 4 quoted text that can be a long line la la la la
> > > Ok this is level 3 quoted text that can be a long line la la la la
> > Ok this is level 2 quoted text that can be a long line la la la la
> Ok this is level 1 quoted text that can be a long line la la la la

Un quoted.

 [End examples]

 This should should my main point, that the condensed form allows more text
in a line in deep quoted text than the standard spaced-out version.

 That's all I'm saying. I'm not saying we should eschew one for the other,
just making a point from a formatting perspective :)

-- 
Trent Curry

perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1)!eg
;print(reverse("$s")."\n");'




------------------------------

Date: Sat, 15 Nov 2003 20:45:00 GMT
From: Jacob Heider <lord-jacob@comcast.net>
Subject: Re: Giving back
Message-Id: <545e57aa180b7dd1cd1e6887a0f83653@news.teranews.com>

On Sat, 15 Nov 2003 11:06:10 -0800, Trent Curry wrote:

> Alan J. Flavell wrote:
>
> [Example 1 - condensed way]
> 
> ---------1---------2---------3---------4---------5---------6---------7--
> 
>>>>>> Ok this is level 5 quoted text that can be a long line la la la la
>>>>> Ok this is level 4 quoted text that can be a long line la la la la
>>>> Ok this is level 3 quoted text that can be a long line la la la la
>>> Ok this is level 2 quoted text that can be a long line la la la la
>> Ok this is level 1 quoted text that can be a long line la la la la
> 
> Un quoted.
> 
> [Example 2 - standard way]
> 
> ---------1---------2---------3---------4---------5---------6---------7--
> 
>  > > > > > Ok this is level 5 quoted text that can be a long line la la la
> la
>> > > > Ok this is level 4 quoted text that can be a long line la la la la
>> > > Ok this is level 3 quoted text that can be a long line la la la la
>> > Ok this is level 2 quoted text that can be a long line la la la la
>> Ok this is level 1 quoted text that can be a long line la la la la
> 
> Un quoted.
> 
>  [End examples]
> 
>  This should should my main point, that the condensed form allows more text
> in a line in deep quoted text than the standard spaced-out version.
> 
>  That's all I'm saying. I'm not saying we should eschew one for the other,
> just making a point from a formatting perspective :)

I suspect the main reason for the standard style over the condensed one is
that the rule for quoting then changes from:

  prepend "> " to all lines from original message

which is simple to implement, to 

  if the first character of a message is ">", prepend a ">";
  else, prepend a "> "

which is slightly more time an resource consuming to implement. The moral
is that sometimes investing a little more effort gets you something a
little more usable, I guess.

Jacob


------------------------------

Date: Sat, 15 Nov 2003 22:31:17 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Help
Message-Id: <3fb69226.111766375@news.erols.com>

roberie_g@yahoo.com (Rob) wrote:

: I have a small CGI script that attempts to create a file on the fly.

Not really.  You have a program that attempts to invoke a second program
which attempts to create a file.  Big difference.
 
: The script runs successfully from the command prompt.  Although when I
: execute in a browser the file does not get created and therefore the
: contents are not displayed on the page.  I have try several different
: approaches all have fialed to correct this issue.  I have checked the
: promissions, I am login in under the httpd userid, I have checked the
: rc on the system command(see below), and have hit the wall.
: 
: HERE IS THE SCRIPT:
: ****************************************************************************
: #!/usr/bin/perl -w
: use strict;
: use CGI ':standard';
: 
: my @fcetabs;
: my @tablist;
: my $dbin=param('database');
: 
: system("./list $dbin _ list.$$") || print "Bad Return Code from system
: call: $?\n";

The error message will be emitted when system() returns 0 .  External
programs typically return 0 to indicate no error has occurred.

Emphasize "typically."  The ./list program is obliged to return non-zero
in case of a show-stopping error, but it's not a certainty.  It could be
falling over dead and not telling anybody.

The Perl program looks fine.  Since the ./list program generates all the
data used by the Perl program, troubleshooting efforts should be focused
on what ./list is really doing.  We know nothing about that program, so
we cannot adequately help.

: open(FCELST, "list.$$") || print "Database $dbin is currently
: unavailable: $!";

Instead of creating an intermediate data file, you might want to see if
the data generated by ./list can be brought in through a piped open().
Not only would it make the post-run file cleanup unnecessary, but it
would prevent simultaneous CGI requests from wrecking each others' data.
 
[snip remainder]



------------------------------

Date: Sun, 16 Nov 2003 09:23:32 -0800
From: "King" <kingja2990@yahoo.com.>
Subject: Re: installing a perl module
Message-Id: <3fb6a811@dnews.tpgi.com.au>


"Ben Morrow" <usenet@morrow.me.uk> wrote in message
news:bp1139$fmg$3@wisteria.csv.warwick.ac.uk...
>
> news@group.com wrote:
> > Ben Morrow wrote:
> > > What version of the perl package do you have installed? (I have no
> > > idea how to find this out on Debian...)
> >
> > $ dpkg -l | grep perl
> <snip>
> > ii  perl           5.8.0-18       Larry Wall's Practical Extraction and
> > Report
>
> Right, so Debian has upgraded you to 5.8. I'd strongly recommend you
> uninstall your perl in /usr/local (or, say, simply delete everything
> in /usr/local/bin with 'perl' in its name and delete
> /usr/local/lib/perl5) and simply use the system perl. You may also
> wish to see if there are Debian packages for the modules you need.
>
> Ben
>
> -- 
> don't get my sympathy hanging out the 15th floor. you've changed the locks
3
> times, he still comes reeling though the door, and soon he'll get to you,
teach
> you how to get to purest hell. you do it to yourself and that's what
really
> hurts is you do it to yourself just you, you and noone else *
ben@morrow.me.uk

ok.. now that I reinstalled the os fresh.
the steps am I going to follow are:
# wget http://cpan.org/src/stable.tar.gz
# cd /home/username
# tar -zxvf stable.tar.gz
# sh Configure -de
# cd perl-5.8.1
# make
# make test
# make install
# ln -sf perl5.6.1 /usr/bin/perl
# ln -sf perl5.8.1 /usr/local/bin/perl

my question, should I untar the file when my current dir is /home/usrname#
or other? or it does not make a different.

thanks




------------------------------

Date: Sat, 15 Nov 2003 22:27:19 +0000 (UTC)
From: Stan Brown <stanb@panix.com>
Subject: Re: long running perl programs & memory untilization
Message-Id: <bp6987$etn$1@reader2.panix.com>

In <bp5gho$e4a$1@wisteria.csv.warwick.ac.uk> Ben Morrow <usenet@morrow.me.uk> writes:


>Stan Brown <stanb@panix.com> wrote:
>> In <bp1547$h0a$2@wisteria.csv.warwick.ac.uk> Ben Morrow
>> <usenet@morrow.me.uk> writes:
>> >Stan Brown <stanb@panix.com> wrote:
>> >> In <20031113163837.417$N1@newsreader.com> ctcgag@hotmail.com writes:
>> >> 
>> >> >Stan Brown <stanb@panix.com> wrote:
>> >> >>
>> >> >> Thanks. The latest one of these "long running" scripts to
>> >> >> exhibit this behavior, is really quite simple, in what it
>> >> >> does, and has no real complex data structures.
>> >> >>
>> >> >> I suppose it would be inappropriate to post it here for
>> >> >> criticism, right?
>> >> 
>> >> >As long as the script is short and strict, it wouldn't be at all
>> >> >inappropriate.  Does the script run full-bore for months, or is
>> >> >it some kind of server-like thing that spends most of it's time
>> >> >waiting?
>> >> 
>> >> It does setup stuff (a lot of that), and then goes into a loop. In this
>> >> loop it does a system call
>> 
>> >This is a little confusing... when I first read it, I parsed it as
>> >'system call' in the sense of something like fcntl(2). It would be
>> >better to say 'it runs v4lctl with system()' or something :).
>> 
>> >> to v4lctl to capture an image, then goes bacl to
>> >> sleep and waits. Curently it's one image every 10 seconds. Running since
>> >> moday, it had grown to a size of 1/2 a gig :-(
>> 
>> >What does it do with the image? Are you sure you aren't keeping them
>> >all in memory somewhere by mistake?
>> 
>> >Post just the loop for us to have a look at.
>> 
>> Well, since I aparantely ofended all of you by posting it all, as I judge
>> from zero reolies, here is the cut down version:


>On an unrelated subject, doing this rather defeats the point of
>strictures. You shoould write

>  our $cfg_file = "/opt/local/lib/webcam.conf";

>and then refer to $cfg_file thereafter.

Thanks, that ugliness had been bothering me for years, but I didn't
understand how to clean it up.

Tha tip is very much appreciated!
-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
						-- Benjamin Franklin


------------------------------

Date: Sat, 15 Nov 2003 20:07:53 GMT
From: Ghassan Hussein al Najjar <tejqeda@gacbis.org>
Subject: Re: lydia, slap him onto the mat
Message-Id: <52DFE2D9.98EB341B@news.qidfuvaf.org>

On 15 Nov 2003 20:07:53 GMT, Hector Mann wrote:

>
> Rethink the Cool + the Shoe
> 
> phil knight had a dream.  he'd sell shoes.  he'd sell dreams.
> he'd get rich.  he'd use sweatshops if he had to.
> 
> then along came a new shoe.  plain.  simple.  cheap.  fair.
> designed for only one thing:  kicking phil's ass.
> 
> the unswoosher
> 
> $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
> 
> For years, Nike was the undisputed champion of logo culture, 
> its swoosh an instant symbol of global cool. 
> 
> Today, Phil Knight's Nike is a fading empire, badly hurt by 
> years of "brand damage" as activists and culture jammers 
> fought back against mindfuck marketing and dirty sweatshop labor.
> 
> Now a final challenge. We take on Phil at his own game - and win. 
> We turn the shoes we wear into a counterbranding game. The swoosh 
> versus the anti-swoosh. Which side are you on?
> 
> Adbusters has been doing R&D for more than a year, and guess what? 
> Making a shoe - a good shoe - isn't exactly rocket science. 
> With a network of supporters, we're getting ready to launch the 
> blackSpot sneaker, the world's first grassroots anti-brand. 
> You can help launch the blackSpot revolution.
> 
> THE BIG QUESTION:
> 
>         Is it possible to take Phil Knight's billion-dollar 
>         marketing momentum and, in a quick judo-like move, slap 
>         him onto the mat with the power of his own PR thrust?
> 
> OUR KICK-ASS MARKETING STRATEGY >> http://blackspotsneaker.org/02/
> 
> $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
> 
> buy it............................preorders@blackspotsneaker.org
> 
> sell it...........................wholesale@blackspotsneaker.org
> 
> invest in it......................investors@blackspotsneaker.org
> 
> support it........................donations@blackspotsneaker.org
> 
> join the jam........................jammers@blackspotsneaker.org
> 
>         Make a straight donation... it's a worthy cause 
>         with the potential to set an historic precedent 
>         that could be repeated in other industries and 
>         usher in more grass roots version of capitalism 
>         in which megacorps do not control every area of 
>         our children's lives.
> 
> https://www.groundspring.org/donate/index.cfm?ID=2217-0%7C742-0
> 
> $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
> 
> Hector Mann
> If you will pull Debbie's star under frames, it will frantically shout the puddle.

Get your nearly hating dust for my lake.
For Osama the bowl's dull, against me it's blunt, whereas outside you it's liking angry.
What does Fahd expect so bimonthly, whenever Corinne cooks the upper frame very wickedly?
Tell Genevieve it's young conversing at a plate.

--
Ghassan Hussein al Najjar
to go downstairs and
find out what as going on. No one wanted to trust me at this stage, the
cop came back. He said now I am responsible for killing three men. He
though that I killed this third guy. I told him how can I when I was
chained up to this bed. I told him that I want to confront these CIA,
FBI and other guys. He said they had changed there story they were
looking for another guy. I lost consciousness again, the sister started
fighting with the cop about the issue, she said she wants media to
discuss this story, she asked cop what do you think is going on there is
one dead body with my chart hanging next to it and the other body right
next to it with broken bones, beaten to death, injured enough to move,
even though CIA, FBI had called the cop to come early and they were sure
it is me who is rapist, thief and killer, they changed their story after
seeing other guys dead body and finding out I am alive. 

The cop for the first time realized he was doing something wrong, he
said he will think about moving me to a different location, that is a
lot more secure. Anyway for that night a cop for assigned to guard the
room whole day and night. During the mean while the sister (who had
accepted Islam) tried to contact channel 7 and 9 to come and see what
was going on. They never came, I guess for them sizzeling stories are
really good, truth hurts and they never wanted to discuss the issue, I
told her to ask Muslims to make noise about they did a bit. 

One should note if I had died that today, then those newspapers and TV,
radio channels who till today do not even want to discuss this issue
directly would have portrayed me as a terrorist, rapi




------------------------------

Date: Sat, 15 Nov 2003 20:19:59 GMT
From: Jacob Heider <lord-jacob@comcast.net>
Subject: Re: ParseRecur  from Date::Manip
Message-Id: <31aec80528ca3d8fff40a3abeaeab136@news.teranews.com>

On Fri, 14 Nov 2003 02:47:19 -0800, Arndt, Tobias wrote:

> Hi NG,
> 
> trying to understand the ParseRecur function. Seems to be too complex
> for me. My goal is to get the first Monday from each month of the year
> 2003. My code:
> 
> @date = ParseRecur("0:1*1:1:0:0:0","1/1/03","1/1/03","31/12/03"); 
> 
> print $date[3];
> 
> # that should print out the First Monday in April 2003
> 
> But I get 2003040700:00:00 !! That's the second Monday in this
> month.... :-(

How can the 7th be the second Monday? Monday, April the 0th?

Jacob


------------------------------

Date: Sat, 15 Nov 2003 11:21:35 -0800
From: "Wally Sanford" <wsanford@wallysanford.com>
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <bp5uc3$1jpjek$1@ID-196529.news.uni-berlin.de>

Brian McCauley wrote:
> bl8n8r@yahoo.com (bad_knee) writes:
>
>> I was wondering if anyone had a quick one for "commatizing" a
>> number in perl?
>
> By a strange coincidence, I was wonding if "anyone" ever reads the
> FAQ.

And as usual, you miss the point that most new people would not have
_knowlege_ of na faq. It's like when ou go to a new place. Say, you move
to a new state, go to a new school, you know not wher anything really
is, you tend to ask around "hey, do you know where I can find this or
that?". You _can't_ expect every new person to know where to find
everything, becuase they may not even know of the exisitance of such a
tool.

Nothing wrong with pointing them ot an FAQ, but chastizing a new person
for not checking an FAQ they may not know about is just plain mean
spirted and absurd (need I mention arrogant?) If you find your self
wanting to post something ill spirited like this it may be better to
just stfu. I dont give a flying crap how helpful you overwise are.

There is nothing wrong with being new. One must start somewhere.




------------------------------

Date: 15 Nov 2003 21:01:20 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: regex to convert 1000000 -> 1,000,000 ?
Message-Id: <slrnbrd510.mg3.sholden@flexal.cs.usyd.edu.au>

On Sat, 15 Nov 2003 11:21:35 -0800,
	Wally Sanford <wsanford@wallysanford.com> wrote:
> Brian McCauley wrote:
>> bl8n8r@yahoo.com (bad_knee) writes:
>>
>>> I was wondering if anyone had a quick one for "commatizing" a
>>> number in perl?
>>
>> By a strange coincidence, I was wonding if "anyone" ever reads the
>> FAQ.
> 
> And as usual, you miss the point that most new people would not have
> _knowlege_ of na faq. It's like when ou go to a new place. Say, you move
> to a new state, go to a new school, you know not wher anything really
> is, you tend to ask around "hey, do you know where I can find this or
> that?". You _can't_ expect every new person to know where to find
> everything, becuase they may not even know of the exisitance of such a
> tool.

School's tend not to have FAQs, so that's a pretty stupid analogy.

And of course posting to usenet is more like asking "where is the canteen"
over the school PA system, or from the middle of the playground with a 
megaphone. See how well that goes down.

> Nothing wrong with pointing them ot an FAQ, but chastizing a new person
> for not checking an FAQ they may not know about is just plain mean
> spirted and absurd (need I mention arrogant?) If you find your self
> wanting to post something ill spirited like this it may be better to
> just stfu. I dont give a flying crap how helpful you overwise are.
> 
> There is nothing wrong with being new. One must start somewhere.

And one starts by reading the documentation for the language, compiler,
software package, whatever it is you are new to. For perl the FAQ
is a big chunk of that documentation and pretty hard to miss, unless
of course you didn't bother looking at any of the documentation.

-- 
Sam Holden



------------------------------

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.  

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 5809
***************************************


home help back first fref pref prev next nref lref last post