[29441] in Perl-Users-Digest
Perl-Users Digest, Issue: 685 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 26 14:09:45 2007
Date: Thu, 26 Jul 2007 11:09:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 26 Jul 2007 Volume: 11 Number: 685
Today's topics:
Re: 3's and 4's compliment? (John M. Gamble)
Re: @arts <spamtrap@dot-app.org>
Re: @arts <spamtrap@dot-app.org>
Re: @arts <bik.mido@tiscalinet.it>
Re: @arts <bik.mido@tiscalinet.it>
Re: @arts <michaellhartsough@sbcglobal.net>
Re: @arts <spamtrap@dot-app.org>
Apache vs custom authentication & authorization <mailbox@cpacker.org>
Re: filehandle, read lines <klaus03@gmail.com>
Re: filehandle, read lines xhoster@gmail.com
Re: fork command. <jurgenex@hotmail.com>
Re: I am giving up perl because of assholes on clpm -- <zentara@highstream.net>
Re: I am giving up perl because of assholes on clpm -- <spamtrap@dot-app.org>
Re: I am giving up perl because of assholes on clpm -- <paul@boddie.org.uk>
Perlmonks (was Re: I am giving up perl because of assho <abigail@abigail.be>
Re: Perlmonks (was Re: I am giving up perl because of a <bik.mido@tiscalinet.it>
Re: pid from startet process <hjp-usenet2@hjp.at>
Re: Problem installing DBI <joliver@john-oliver.net>
Re: Problem with excel workbook <lambik@kieffer.nl>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 26 Jul 2007 17:15:15 +0000 (UTC)
From: jgamble@ripco.com (John M. Gamble)
Subject: Re: 3's and 4's compliment?
Message-Id: <f8akr3$e6b$1@e250.ripco.com>
In article <5gnc8mF3frmr1U1@mid.individual.net>,
Steve K. <savagebeaste@yahoo.com> wrote:
>I was wondering, how would one go about performing 3's, 4's, ...,
>compliment? I was reading about this briefly in my colleagues' advanced
>mathematics book but did not have very long to study it.
>
>I know about 1's and 2's compliment, and have never heard of any others
>(3, 4, etc.)
>
1's and 2's complement are the special cases of diminished radix and
radix notation. You can represent any base in these notations (in
both of these cases you are using base 2).
Both notations were designed to handle negative numbers. A naive
approach to handling negative numbers might involve setting a
sign bit. This works well for written numbers where we just use
a negative sign, but in it's something of a pain to deal with.
It would be easier to handle negative numbers if the mechanism
that signaled a negative number was some how built in to the
arithmatic.
So, Diminished Radix Arithmetic:
1) represent the absolute value of number in the base
you're interested in, plus a sign digit, e.g.,
89 in base 4: 01121
2) subtract separately each digit from (base - 1),
otherwise known as the diminished (by one) radix.
Negative 01121 (base 4) => 32212
That's it. To check, let's add 01121 and 32212:
01121
32212
-----
33333
That looks weird, until you realize that the leading 3 means
that it's a negative number. If we went through the negation
process again of step 2, we'd wind up with zero.
You'll note that the leading digit must be either a 0 or the
(base-1) digit. If the base is 2, then you have the 1's complement
notation. It's still a little odd, because this notation lets you
have two ways to represent zero.
Radix Arithmetic:
1) represent the absolute value of number in the base
you're interested in, plus a sign digit, e.g.,
89 in base 4: 01121
2) subtract the number from the base raised to the
power of the number of digits, e.g.:
100000 - 01121 (base 4) => 32213
(if the number was zero to begin with, let it be).
That's it. To check, let's add 01121 and 32213:
01121
32213
-----
100000
It looks like an extra digit sneaked in, but in reality we
didn't allow for an extra digit (remember that the lead digit
is the sign digit, and there's only those five positions
available).
So the carry of one "falls off the edge", and you wind up
with 00000, which is what we want. There's only one way to
represent zero, but you do wind up with one extra negative
number that doesn't have an equivalent positive number. If
the base you were using was 2, you'd be using 2's complement
notation.
Hope this helps. At the very least you have a lot of new
terms to use in Google.
--
-john
February 28 1997: Last day libraries could order catalogue cards
from the Library of Congress.
------------------------------
Date: Thu, 26 Jul 2007 11:17:15 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: @arts
Message-Id: <m2r6mvjitg.fsf@dot-app.org>
Michele Dondi <bik.mido@tiscalinet.it> writes:
> On Wed, 25 Jul 2007 17:36:14 -0700, "Wade Ward" <zaxfuuq@invalid.net>
> wrote:
>
>>for (i = $last; i >= $first; -- i) {}
>
> (incidentally, this *may* be valid Perl code, if i is a suitable sub,
> but much more probably you meant $i instead of i.)
It would also be a good idea to make the loop counter $i a lexical:
for (my $i = $last; $i >= $first; $i--) {}
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Thu, 26 Jul 2007 11:30:23 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: @arts
Message-Id: <m2myxjji7k.fsf@dot-app.org>
Michele Dondi <bik.mido@tiscalinet.it> writes:
> On Wed, 25 Jul 2007 21:08:07 -0400, Sherm Pendley
> <spamtrap@dot-app.org> wrote:
>
>>Also, note that "for" and "foreach" are synonyms and either one can be used
>>with either style of loop. However, some folks (myself included) prefer to
>>use "for" for C-style loops with a counter variable, and "foreach" for Perl-
>>style loops with an alias variable. I also prefer to explicitly declare the
>
> It seems that -fortunately- $Larry thinks differently, as C<foreach>
> won't be in Perl 6.
I'm not sure how that indicates different thinking. I wasn't expressing a
preference for one loop style or another, I was simply pointing out that
some of us prefer to write as if they're not synonyms, using "for" for C
style and "foreach" for Perl style.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Thu, 26 Jul 2007 18:14:27 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <n0iha3hhb2vdgge6n0iod7uabvikf6ak8o@4ax.com>
On Thu, 26 Jul 2007 11:30:23 -0400, Sherm Pendley
<spamtrap@dot-app.org> wrote:
>> It seems that -fortunately- $Larry thinks differently, as C<foreach>
>> won't be in Perl 6.
>
>I'm not sure how that indicates different thinking. I wasn't expressing a
>preference for one loop style or another, I was simply pointing out that
>some of us prefer to write as if they're not synonyms, using "for" for C
>style and "foreach" for Perl style.
Well, but then Perl style will be disambiguated from C style, and the
"foreach" synonim will be flushed out. That IMHO is a preference for a
three letters long thingie called "for".
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Thu, 26 Jul 2007 18:21:17 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: @arts
Message-Id: <6biha3ha5n13nv395qpepjlgb37md758fl@4ax.com>
On Thu, 26 Jul 2007 11:17:15 -0400, Sherm Pendley
<spamtrap@dot-app.org> wrote:
>>>for (i = $last; i >= $first; -- i) {}
>>
>> (incidentally, this *may* be valid Perl code, if i is a suitable sub,
>> but much more probably you meant $i instead of i.)
>
>It would also be a good idea to make the loop counter $i a lexical:
>
> for (my $i = $last; $i >= $first; $i--) {}
Yeah! And for completeness the way to make the idea suggested above
work:
#!/usr/bin/perl -l
use strict;
use warnings;
{
my $i;
sub i () : lvalue { $i }
}
my ($last, $first)=(7,2);
for (i = $last; i >= $first; -- i) {
print i;
}
__END__
(Not that there's any good reason to try this, except of course
fun...)
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Thu, 26 Jul 2007 09:49:00 -0700
From: "Mike Hartsough" <michaellhartsough@sbcglobal.net>
Subject: Re: @arts
Message-Id: <3g4qi.26027$bz7.23124@newssvr22.news.prodigy.net>
Michele Dondi wrote:
> On Wed, 25 Jul 2007 23:29:48 GMT, Tad McClellan <tadmc@seesig.invalid>
> wrote:
>
> > I'm afraid not.
> >
> > It has changed its identity dozens of times over the past few years,
> > so we can expect that it will do so yet again.
>
> I'm deleting his posts manually. But perhaps I should just killfile
> "vronans". There is a very minimal risk of killfiling someone who
> wouldn't deserve that, however the risk is well worth the gain.
I have just finished reading this entire thread, and this leg is just a
baffling display by you. Why can you no conceed the point vronans was
making about your quoting attributions? He even quoted the posting
guidelines, "Always indicate who wrote the quoted material", so whats
the problem?
Do you consider it professional to create lies about someone (see A.1)
rather then to be diplomatic, especially for something so simple as a
quoting problem?
A.1
I saw no proof offered by Michele Dondi nor Tad McClellan, who decided
to join in rather than point out the Posting Guidelines, which if the
tables had been reversed, vronans would of certainly been expected to at
least acknowledge the problem and abide by the rules as much as
possible. So why do regulars need not follow them? It's a perfectly
valid question that's already been poised that went conveniently
ignored.
Regards
Mike
------------------------------
Date: Thu, 26 Jul 2007 13:30:38 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: @arts
Message-Id: <m26447jcn5.fsf@dot-app.org>
Michele Dondi <bik.mido@tiscalinet.it> writes:
> On Thu, 26 Jul 2007 11:30:23 -0400, Sherm Pendley
> <spamtrap@dot-app.org> wrote:
>
>>> It seems that -fortunately- $Larry thinks differently, as C<foreach>
>>> won't be in Perl 6.
>>
>>I'm not sure how that indicates different thinking. I wasn't expressing a
>>preference for one loop style or another, I was simply pointing out that
>>some of us prefer to write as if they're not synonyms, using "for" for C
>>style and "foreach" for Perl style.
>
> Well, but then Perl style will be disambiguated from C style
That's not a "but", it's precisely the effect I have in mind. :-)
I dislike the fact that they "for" and "foreach" are synonyms, so I pretend
that they're not - but I *do* like having both styles available, and I use
them both.
> , and the "foreach" synonim will be flushed out.
How does that follow? I use "foreach" when writing Perl-style loops, and I
use those far more often than C-style loops.
> That IMHO is a preference
> for a three letters long thingie called "for".
Not at all. Using a single keyword to refer to both styles would be, IMHO,
just as bad as having two interchangeable keywords.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Thu, 26 Jul 2007 09:10:06 -0700
From: Charles Packer <mailbox@cpacker.org>
Subject: Apache vs custom authentication & authorization
Message-Id: <1185466206.956063.42280@22g2000hsm.googlegroups.com>
For the "existing suite of CGI scripts"
mentioned in the earlier thread "Streamlining
login..." it turns out that our Leader
opposes Apache authentication and
authorization. The main objections are,
first, that it takes sysadmin-level
knowledge to add a new user or set up a new
level of privilege, and second, that
authorization is tied to the directory
structure of the affected scripts.
Therefore I'm thinking of a custom-made
approach that would start with a browser form
to be used by an operator to add new
users and indicate which processes they may
run. Then it looks like the CGI::Auth module
or, even better, CGI::Auth::Auto is what to
use for authentication, assuming that I'm
able to maintain its files with the
above-mentioned browser tool. As I
understand it, at the start of every
sensitive script I would call check(),
which would handle the authentication,
including possible session timeout. It
will present a login page of my own design,
right? Then I would be on my own for the
authorization step, i.e. determining whether
this user is allowed to execute this script.
Presumably this would involve checking a
list that would be maintained by the operator
through the same browser tool that that's
used to add users. Anybody see any problems
with this? No news will be good news...
--
Charles Packer
http://cpacker.org/whatnews
mailboxATcpacker.org
------------------------------
Date: Thu, 26 Jul 2007 06:18:21 -0700
From: Klaus <klaus03@gmail.com>
Subject: Re: filehandle, read lines
Message-Id: <1185455901.948177.150790@k79g2000hse.googlegroups.com>
On Jul 26, 2:50 pm, roy <roy.schulthe...@googlemail.com> wrote:
> for (my $i=0;$i<MAX_PROCESSES;$i++) {
for my $i (0..MAX_PROCESSES - 1) {
> my $xml = new IO::File;
> open ($xml, "< $filename");
open my $xml, '<', $filename or die "Error: $!';
> while (defined ($_dat = <$xml>)) {
> $_temp = "\U$_dat\E";
Variables starting with "$_..." (such as "$_dat" or "$_temp") look
very strange (at least to me) and are too easily confused with "$_".
--
Klaus
------------------------------
Date: 26 Jul 2007 17:22:42 GMT
From: xhoster@gmail.com
Subject: Re: filehandle, read lines
Message-Id: <20070726132244.200$1S@newsreader.com>
roy <roy.schultheiss@googlemail.com> wrote:
> I receive a XML-File up to 1 GB full of orders every day. I have to
> split the orders and load them into a database for further processing.
> I share this job onto multiple processes. This runs properly now.
This seems dangerous to me. Generally XML should be parsed by an XML
parser, not by something that happens to parse some restricted subset of
XML with a particular whitespace pattern that works for one example. If
the person who generates the file changes the white-space, for example,
then your program would break, while they could correctly claim that the
file they produced is valid XML and your program shouldn't have broke on
it. OTOH, if you have assurances the file you receive will always be in a
particular subset of XML that matches the expected white space, etc., then
perhaps the trade-off you are making is acceptable.
If parsing is not the bottleneck, then I'd just use something like
XML::Twig to read this one XML file and parcel it out to 10 XML files as a
preprocessing step. Then run each of those 10 files separately. Of
course, if parsing is the bottleneck, then this would defeat the purpose of
parallelizing.
Also, you should probably adapt your code to support "use strict;"
>
> sub insert_orders {
> my ($filename, $from, $to) = @_;
>
> my $xml = new IO::File;
> open ($xml, "< $filename");
>
> if ($xml = set_handle ($xml, $from)) {
> while (defined ($_dat = <$xml>)) {
> $_temp = "\U$_dat\E"; # Convert into
> capital letters
> $_temp =~ s/\s+//g; # Remove blanks
>
> if ($_temp eq '<ORDER>') {
> $_mode = 'order';
> $_order = '<?xml version="1.0" encoding="UTF-8"?>' .
> "\n";
> }
If you start fractionally through an order, this code above "burns" lines
until you get to the start of the first "full" order. Yet your set_handle
code also burns the initial (potentially) fraction of a line. It would be
cleaner if the code to burn data was all in one place.
>
> $_order .= $_dat if $_mode eq 'order';
>
> if ($_temp eq '</ORDER>') {
> # load $_order into the database ...
This tries to load $_order into the database even when there is no
order to load, i.e. when you started out in the middle of a previous order.
$_order will be empty, but you try to load it anyway. Is that a problem?
You want to load $_order only when
$_temp eq '</ORDER>' and $_mode eq 'order'
>
> $_order = '';
> $_mode = '';
>
> last if ($to <= tell ($xml));
This has the potential to lose orders. Let's say that $to is 1000, and
an order starts exactly at position 1000. This job will not process that
order, because because $to<=1000 is true. The next-higher job, whose
$start is 1000, also will not process this order, as the "partial" first
line it burned just happened to be a true full line, and that order
therefore gets forgotten. (I've verified this does in fact happen in a test
case)
last if ($to < tell($xml));
(Or change the way you burn data, as suggested above, so it all happens
in only one place.)
...
>
> sub set_handle {
> my ($handle, $pos) = @_;
>
> seek($handle,$pos,SEEK_CUR);
>
> if (defined (<$handle>)) # start new line
You probably only want to burn a line when $pos>0. When $pos==0, you
know the first line you read will be complete, so there is no reason
to burn it. Generally the burned line that starts out with each chunk will
be processed in the "previous" chunk, but when $pos==0 there was no
previous chunk. But this will not actually be a problem unless the first
line of you XML file is "<ORDER>", which does seem likely for "real" XML.
> { return $handle; }
> else
> { return; }
I don't understand the above. If $handle returned an undefined
value this time you read from it, won't it do so next time as well?
(I think the only time this isn't true is when $handle is an alias for
ARGV). So why not just return $handle regardless?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Thu, 26 Jul 2007 14:12:42 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: fork command.
Message-Id: <uZ1qi.7493$jC4.2842@trndny09>
rajendra wrote:
> The perl documentation says the fork command generates two copies of
> the program ,one parent and one child.
Well, no. It creates _one_ additional copy of the running process, commonly
known as child process.
> If this is correct,can this fork command be used for multitasking?.
That is its main purpose, yes.
jue
------------------------------
Date: Thu, 26 Jul 2007 14:56:13 GMT
From: zentara <zentara@highstream.net>
Subject: Re: I am giving up perl because of assholes on clpm -- switching to Python
Message-Id: <techa3pi8ekksd2fioe4j72gadfc9omhmh@4ax.com>
On Wed, 25 Jul 2007 14:45:29 -0500, Martha_Jones@tx.net wrote:
>Python is a better language, with php support, anyway, but I am fed up
>with attitudes of comp.lang.perl.misc. Assholes in this newsgroup ruin
>Perl experience for everyone. Instead of being helpful, snide remarks,
>back-biting, scare tactings, and so on proliferate and self
>reinforce. All honest people have left this sad newsgroup. Buy bye,
>assholes, I am not going to miss you!!!
>
>Martha
This is where the big boys play, you have to be able to be able to
scuffle and take punishment if you are wrong or unduly ignorant.
You also need to squash somehow who attacks you, when you
know you are right.
I was watching a CNBC yesterday, and they interviewed a leading
solar panel company's CEO. One guy just blasted him for no reason
other than he gets a government subsidy, and even the moderator felt
bad for the way the executive was blasted. BUT...... they are the big
boys, playing for real money, and if you play there, you have to expect
to have your toughness tested..... it means real profit and loss.
If you want a better place to ask beginner questions, or to be treated
with more respect, try the perl-beginners maillist or
http://perlmonks.org. The monks are usually very polite.
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html
------------------------------
Date: Thu, 26 Jul 2007 11:43:48 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: I am giving up perl because of assholes on clpm -- switching to Python
Message-Id: <m2ir87jhl7.fsf@dot-app.org>
Ben Finney <bignose+hates-spam@benfinney.id.au> writes:
> Martha_Jones@tx.net writes:
>
>> Python is a better language, with php support, anyway, but I am fed
>> up with attitudes of comp.lang.perl.misc.
>
> Please, if you must fred the troll, drop comp.lang.python from the
> discussion (i.e. post trplies only to the newsgroup this message
> relates to).
Grow up. This troll doesn't relate to *either* group.
Redirecting responses towards a group you don't read is just as trollish
as the original. Ignoring it is best, but if you *must* feed it, respond
to all the listed groups. Encouraging the troll while at the same time
foisting it off upon someone else is just as rude as the original.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
------------------------------
Date: Thu, 26 Jul 2007 09:38:34 -0700
From: Paul Boddie <paul@boddie.org.uk>
Subject: Re: I am giving up perl because of assholes on clpm -- switching to Python
Message-Id: <1185467914.814174.94600@22g2000hsm.googlegroups.com>
zentara wrote:
>
> This is where the big boys play, you have to be able to be able to
> scuffle and take punishment if you are wrong or unduly ignorant.
> You also need to squash somehow who attacks you, when you
> know you are right.
Where is this again? High school? I can understand people getting
impatient with repeated incoherent one-line messages of the form "can
u give me teh codes thanx", but you'd show off your community a bit
better by entertaining even the most naive questions - people have to
start somewhere, you know.
> I was watching a CNBC yesterday, and they interviewed a leading
> solar panel company's CEO. One guy just blasted him for no reason
> other than he gets a government subsidy, and even the moderator felt
> bad for the way the executive was blasted. BUT...... they are the big
> boys, playing for real money, and if you play there, you have to expect
> to have your toughness tested..... it means real profit and loss.
In comp.lang.perl.misc? It seems to me that the "big boys" in this
case have an inflated sense of their own bigness.
Paul
P.S. Although it's nice to point to beginner resources, too, let us
avoid comp.lang.python becoming some kind of linux-kernel ego trip
where anyone who has stuck around has an interest in perpetuating a
hostile atmosphere.
------------------------------
Date: 26 Jul 2007 15:10:14 GMT
From: Abigail <abigail@abigail.be>
Subject: Perlmonks (was Re: I am giving up perl because of assholes on clpm -- switching to Python)
Message-Id: <slrnfaheab.bd3.abigail@alexandra.abigail.be>
_
zentara (zentara@highstream.net) wrote on VLXXVII September MCMXCIII in
<URL:news:techa3pi8ekksd2fioe4j72gadfc9omhmh@4ax.com>:
""
"" If you want a better place to ask beginner questions, or to be treated
"" with more respect, try the perl-beginners maillist or
"" http://perlmonks.org. The monks are usually very polite.
Yes, up to the point that "politeness" is ranked higher than correctness.
You can tell the utmost bullshit on perlmonks, and get ranked highly by
just following the following three rules:
1) Always use 'use strict' and point out that one should always use
'strict'. Even a post "I've no utter clue how to solve your problem,
but I noticed your code doesn't use 'use strict'" will give you lots
of karma.
2) As 1) with s/strict/warnings/;
3) Sugar coat your postings.
Telling one to read the manual, OTOH, or worse, pointing out that an answer
is wrong will attract lots of negative votes.
So, if you want every one to be nicey-nicey, go to Perlmonks. If you
actually want to get useful answers, go to clpm. (Not that there aren't
useful answers on Perlmonks, there are, but it's drowned out by the
wrong and useless answers, and due to the "nicey-nicey" rules, wrong
answers aren't correct, making, IMO, Perlmonks quite bad. You're better
off with unanswered questions than the answers from Perlmonks).
Abigail
--
perl -wle 'print "Prime" if ("m" x shift) !~ m m^\m?$|^(\m\m+?)\1+$mm'
------------------------------
Date: Thu, 26 Jul 2007 17:56:32 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Perlmonks (was Re: I am giving up perl because of assholes on clpm -- switching to Python)
Message-Id: <00fha3hdml248h1es1jlrivlrhm5pv6jl5@4ax.com>
On 26 Jul 2007 15:10:14 GMT, Abigail <abigail@abigail.be> wrote:
>"" If you want a better place to ask beginner questions, or to be treated
>"" with more respect, try the perl-beginners maillist or
>"" http://perlmonks.org. The monks are usually very polite.
Not really, I'm there too. And if I'm a dirty bastard here you bet I'm
such also there.
>Yes, up to the point that "politeness" is ranked higher than correctness.
Well, not to that point...
>You can tell the utmost bullshit on perlmonks, and get ranked highly by
>just following the following three rules:
Yeah, you can indeed tell the utmost bullshit and get ranked highly,
but generally for no comprehensible reason. I think your stated rules
are too poor to capture the phenomenon.
>Telling one to read the manual, OTOH, or worse, pointing out that an answer
>is wrong will attract lots of negative votes.
You're putting it too harshly: it's somewhat like that. But not
exactly like that, at least in my experience.
>So, if you want every one to be nicey-nicey, go to Perlmonks. If you
>actually want to get useful answers, go to clpm. (Not that there aren't
>useful answers on Perlmonks, there are, but it's drowned out by the
>wrong and useless answers, and due to the "nicey-nicey" rules, wrong
Well, you're still putting it too harshly IMHO. Personally, I think
that clpmisc and PM are somewhat complementary and somewhat similar,
the biggest difference being that webby questions that are little or
no Perl at all and much or all web server configuration or database
handling are better tolerated there: in the sense that they do get
heavily downvoted, but someone still addresses them. Moreover, PM neq
SoPW, although that is certainly the most active section...
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Thu, 26 Jul 2007 19:53:41 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: pid from startet process
Message-Id: <slrnfahnt5.i1m.hjp-usenet2@zeno.hjp.at>
On 2007-07-19 22:28, Douglas Wells <see@signature.invalid> wrote:
> (And in response to another comment in this thread, the PID of
> child will almost certainly not be the shell's PID plus 1. Any
> system that does that presents a major security risk and should
> be trashed immediately -- because PIDs would then be guessable.)
PIDs are guessable on the majority of unix systems (the only exceptions
I know are some BSD variants) - so this is something the average unix
programmer expects.
OTOH, a random pid is something the average unix programmer does not
expect - which may lead to a different class of (possibly
security-critical) errors.
hp
--
_ | Peter J. Holzer | I know I'd be respectful of a pirate
|_|_) | Sysadmin WSR | with an emu on his shoulder.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Sam in "Freefall"
------------------------------
Date: 26 Jul 2007 18:02:04 GMT
From: John Oliver <joliver@john-oliver.net>
Subject: Re: Problem installing DBI
Message-Id: <slrnfahocs.n27.joliver@ns.sdsitehosting.net>
On Wed, 25 Jul 2007 17:38:25 -0700, Mark Pryor wrote:
> On Wed, 25 Jul 2007 23:31:25 +0000, John Oliver wrote:
>
>> On a CentOS 5 system:
>>
>> [root@rt-2 rt-3.6.4]# perl -MCPAN -e 'install DBI'
>> CPAN: File::HomeDir loaded ok (v0.65)
>> Sorry, we have to rerun the configuration dialog for CPAN.pm due to
>> the following indispensable but missing parameters:
>
> Stop there. Why install DBI when this package is already a Core RPM,
> called perl-DBI? Granted its not the latest, 1.52, but you don't need to
> install from scratch.
>
> #rpm -qa | grep DBI
>
> The CentOS 5 has a very complete Perl environment, especially if you have
> all the LAMP packages. To verify this do
>
> #yum groupinfo "MySQL Database"
> #yum groupinfo "Web Server"
>
> Using Perl in CentOS is alot more fun and painless if you treat RPM and
> YUM as your friends.
Yes, I'm aware of all that.
I'm trying to install RequestTracker. It's a frickin' nightmare. Since
RT is in the Fedora Extras, I installed a host with FC7 and installed RT
from yum. I can't get it to work. On the RT mailing list, they keep
saying "We don't know why the RPM doesn't work, you have to install from
source". So that's what I'm trying to do... but RT's dependency checker
wants DBI installed via CPAN. There isn't much point with my arguing
with why they want to do certain things certain ways... I'm just trying
to do everything their way so hopefully at some point I can wind up with
a working RT installation.
Frankly, I'm amazed and perplexed that RT hasn't been the cause of
multiple suicides and homicides.
--
* John Oliver http://www.john-oliver.net/ *
------------------------------
Date: Thu, 26 Jul 2007 16:21:36 +0200
From: "Lambik" <lambik@kieffer.nl>
Subject: Re: Problem with excel workbook
Message-Id: <46a8adf0$0$37720$5fc3050@dreader2.news.tiscali.nl>
<marzec.wojciech@gmail.com> wrote in message
news:1185451916.526387.238700@g4g2000hsf.googlegroups.com...
> Hi,all :)
>
> I have got small script like this below:
>
> use Win32::OLE qw(in with);
> use Win32::OLE::Const 'Microsoft Excel';
> use Cwd;
>
> $Win32::OLE::Warn = 3;
> my $path = getcwd."/przyklad.xls";
> $path =~ tr /\//\\/;
> my $excel=Win32::OLE->new('Excel.Application','Quit');
> my $book = $excel->Workbooks->Add;#
> my $sheet = $book->Worksheets(1);
> $book->Sheets->Add;
> $book->SaveAs($path);
> print $sheet->Name;
> #$sheet->Name = "something";
$sheet->{Name} = "something";
> undef $book;
> $excel->Quit;
> undef $excel;
>
> ..and i want to rename one of excel sheet, unfortunetly variable
> $sheet->Name is only read-only and when i uncomment this line I will
> receive message :
> Can't modify non-lvalue subroutine call at excel_basic.pl
>
> I will be grateful for any help.
>
> Thank You
>
------------------------------
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 V11 Issue 685
**************************************