[19419] in Perl-Users-Digest
Perl-Users Digest, Issue: 1614 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 26 00:05:31 2001
Date: Sat, 25 Aug 2001 21:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <998798706-v10-i1614@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 25 Aug 2001 Volume: 10 Number: 1614
Today's topics:
Re: $1 as subroutine parameter - problems <tinamue@zedat.fu-berlin.de>
Re: $1 as subroutine parameter - problems <samneric@tigerriverOMIT-THIS.com>
Re: $r->mtime not working on Windows NT Apache 1.3.20 a <goldbb2@earthlink.net>
Re: Any way of detecting running in eval? <goldbb2@earthlink.net>
Re: Editor Question (Alan Barclay)
Re: GnuPG::Tie::Encrypt Issue <goldbb2@earthlink.net>
Re: How do I: Count characters between < > in a string? <goldbb2@earthlink.net>
Re: IO::Select's can_read hanging forever. <goldbb2@earthlink.net>
Re: No HTML submitted via form (Alexey Lysenkov)
Re: pl or not pl, that is the question (Tim Hammerquist)
Re: Print to multiple filehandles? <goldbb2@earthlink.net>
Re: Question about GD (Martien Verbruggen)
Sex or Perl? Which is better? (None)
Re: Sex or Perl? Which is better? <godzilla@stomp.stomp.tokyo>
Re: Wait for single key press <samneric@tigerriverOMIT-THIS.com>
Re: Warning Question <foojh@hotmail.com>
warnings with cgi will crash Win32 perl core <godzilla@stomp.stomp.tokyo>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 Aug 2001 01:45:08 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: $1 as subroutine parameter - problems
Message-Id: <9m9kb4$13gd2$3@fu-berlin.de>
Markus Laire <markus.laire@usa.net> wrote:
> When I use $1 as parameter to subroutine, which does some regexp for that
> parameter and then tries to use parameter again, it is changed by that
> regexp because $_[0] seems to reference $1 which was given as parameter.
why yes, that's what's supposed to happen, like perlvar says:
| $<digit>
| Contains the subpattern from the corresponding set
| of capturing parentheses from the last pattern
| match, not counting patterns matched in nested
| blocks that have been exited already. (Mnemonic:
| like \digits.) These variables are all read-only
| and dynamically scoped to the current BLOCK.
> I can avoid this problem by calling subroutine as test(my $temp = $1)
> instead of test($1).
seems ok to me.
> My question is then: Is there any other (more elegant/better ?) way to
> counter this problem than to create a temporary scalar ?
why not create one?
> I know that 'my ($param) = @_;' in subroutine avoids this problem, but I
> want it to be optimized and tight.
> This is illustrated by the following example.
> use strict;
> sub test($);
> my $text = 'abcdefg';
> $text =~ /(.+)/;
> test($1); # this won't work
> # print first 3 letters of given argument
> sub test($) {
> $_[0] =~ /(...)/;
> print "Begin: $1 of $_[0]\n";
> }
> Begin: abc of abc
well, what do you want?
$1 just can have one value at a time, why not create
my $arg = shift;
and then
$arg =~ /(...)/;
hth, tina
--
http://www.tinita.de \ enter__| |__the___ _ _ ___
tina's moviedatabase \ / _` / _ \/ _ \ '_(_-< of
search & add comments \ \ _,_\ __/\ __/_| /__/ perception
--- Warning: content of homepage hopelessly out-dated ---
------------------------------
Date: Sat, 25 Aug 2001 22:33:26 -0400
From: Samneric <samneric@tigerriverOMIT-THIS.com>
Subject: Re: $1 as subroutine parameter - problems
Message-Id: <MPG.15f22a059cb3a5c998969a@news.onemain.com>
Markus Laire wrote:
[snip]
> I know that 'my ($param) = @_;' in subroutine avoids this problem,
It's a radical approach, but then it also eliminates the complication.
You either want your sub to operate on the original variable, or else you want
to pass it a copy to play with. That's basic.
> but I want it to be optimized and tight.
Huh???
> $text =~ /(.+)/;
You just assigned $text to $1 the long way...
> test($1); # this won't work
test($text); # will this?
And you're doing all this just to extract/print the first 3 characters of a
string...
------------------------------
Date: Sat, 25 Aug 2001 21:16:04 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: $r->mtime not working on Windows NT Apache 1.3.20 and mod-perl 1.26
Message-Id: <3B884DD4.E421B11A@earthlink.net>
anthony staines wrote:
>
> Hi,
>
> I'm trying to use $r->mtime as to access the last modification
> date of plain html files being served by Apache/mod-perl/Mason on
> windows NT 4.0 SP6. These are real live filesystem files, containing
> html and calls to Mason components. The $r->mtime call is in the body
> of the file being called. So if the file was index.html, at the url
> http://phm/index.html, the file would have the line % $r->mtime; in
> it.
>
> It returns 0 consistently, and the last-modified header, when I set it
> directly with $r->set_last_modified, is also set to 0, that is to
> 00:00:00 January 1 1970, the start of the Unix epoch. stat works fine
> within perl, and I get correct mtimes from it directly. I could use
> stat, but I can't figure out what's wrong with $r->mtime
What's in $r ?
--
I'm not a programmer but I play one on TV...
------------------------------
Date: Sat, 25 Aug 2001 23:40:05 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Any way of detecting running in eval?
Message-Id: <3B886F95.D941D62A@earthlink.net>
lapplisa-no-spam@cotse.com wrote:
>
> OK, gentlepeople, I see I really didn't phrase that well.
> My bad. Let's try another tack.
>
> What I _really_ meant to ask was if there was a way to detect
> running in _nested_ evals. Look at this program:
>
> --------------
> #!/usr/bin/perl -w
>
> use strict;
> require 5;
>
> my $lev2="print \"[\",caller,\"]\n\";";
> my $lev1="print \"[\",caller,\"]\n\"; eval $lev2";
Without a backslash in front of $lev2 you end up with $lev1 equal to
'print "[",caller,"]\n"; eval print "[",caller,"]\n";'
> eval $lev1;
> print "[",caller,"]\n";
>
> exit 1;
> ---------------
> Output:
> [main./evltst.pl8]
This is from the first print statement in $lev1
> [main./evltst.pl8]
This is from the second print statement in $lev1
After this, since print() return 1, the expression eval 1; is evaluated,
which does nothing.
> []
And this of course is from the print at toplevel [not in any eval]
> So I don't see no way to distinguish beween the first
> and the second level eval. Is there?
The problem is that both were first level evals, due to your quoting.
If you quoted correctly it would work more like you expect. Using
different quoting operators can help immensely.
my $lev1 = q[print "[",caller,"]\n"];
my $lev2 = qq[$lev1; eval q[$lev1]];
or:
my $lev2 = qq[$lev1; eval \$lev1];
print qq[\$lev2 is equal to [$lev2]\n];
print qq[eval \$lev2 results in:\n];
eval $lev2;
Note that the difference between the two versions of $lev2 ... in the
first, $lev1 is interpolated into $lev2 in two different places. In the
second, $lev1 is interpolated into $lev2 in one place, and in the other
spot there's the literal string 'eval $lev1' which ends up bringing in
$lev1 during the eval... that is:
The first is: 'print "[",caller,"]\n"; eval q[print "[",caller,"]\n"]'
The second is: 'print "[",caller,"]\n"; eval $lev1'
Also note that the second \n in the first version of $lev2 gets turned
into a newline during the second eval, not during the first, since I
used q not qq. This makes little difference in this case, but think
what it would mean if you were trying to use "" instead of q ... you
would have to apply some thought to figure out how many backslashes were
needed -- or at least I would, :)
--
I'm not a programmer but I play one on TV...
------------------------------
Date: 26 Aug 2001 02:13:25 GMT
From: gorilla@elaine.furryape.com (Alan Barclay)
Subject: Re: Editor Question
Message-Id: <998792003.911558@elaine.furryape.com>
In article <998686028.740761307999492.gnarinn@hotmail.com>,
gnari <gnarinn@hotmail.com> wrote:
>In article <_Huh7.797$qq2.382426@typhoon1.gnilink.net>,
>Mark Riehl <mark.riehl@agilecommunications.com> wrote:
>>All - Anyone using XEmacs? I'm running 21.4p3 on Win2k, and it is having
>>fits with the indents on the following code. I can't seem to get it right,
>>can't find a matching brace, etc.
>
>but that is because there your braces dont match, because braces
>in strings are not matched. your real problem is that your quotes
>do not match and you have what is call a runaway multi-line string.
>
>> # print RESULTS "Accuracy:
>>${$RxTxData{$key}{statistics}{$key2}}[1]\n";
> ^
> a string starts here ------------------^
No it doesn't. You missed the " on the previous line.
------------------------------
Date: Sat, 25 Aug 2001 23:52:59 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: GnuPG::Tie::Encrypt Issue
Message-Id: <3B88729B.641DF976@earthlink.net>
Blixa Bargeld wrote:
>
> Hi. I'm having a problem with this Perl module. I have a cgi script
> that takes data from a form, encrypts it & sends it along in an email
> message. When executed from a browser my script is crashing & I've
> pinpointed it to be at the point where I try to encrypt the data. The
> code I'm using to encrypt is similar to this:
>
> tie *CIPHER, 'GnuPG::Tie::Encrypt', armor => 1, recipient => 'My UID';
> print CIPHER "$text";
> local $/ = undef;
> my $ciphertext = <CIPHER>;
> close CIPHER;
> untie *CIPHER;
>
> The funny thing is this works fine from the command line (when I'm
> logged in with my userid). I know that the web server executes as
> 'nobody' so is this possibly a permissions issue? If so, how do I get
> around this?
I don't know about permissions and such, but here's an easy workaround:
use Crypt::OpenPGP;
my $ciphertext = Crypt::OpenPGP->new->encrypt(
Armour => 1, Recipients => ['My UID'], Data => $text );
The Crypt::OpenPGP package is available from cpan, and is pure-perl, so
it's rather more portable than using either the GnuGP:: or PGP::
modules, which require external binaries which need to be installed
seperately.
--
I'm not a programmer but I play one on TV...
------------------------------
Date: Sat, 25 Aug 2001 22:39:05 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: How do I: Count characters between < > in a string?
Message-Id: <3B886149.1E0C8683@earthlink.net>
Acacia wrote:
>
> It's like this... I have a webpage and on the main page I want only
> the first 200 characters of each news post. However, when I include
Of each news post? So you're writing an nntp/http [usenet/www] gateway,
or something similar. Or by 'news' do you mean a messageboard of your
own, not usenet news?
> a HTML link (or any other <> tag) such as <a href="http://yadadaya">
> amongst the first 200 characters, it outputs only 174 visible
> characters (200 minus the given link code). How would I go about
> editing the following code in order for this to work?
>
> $chars = 200;
> $shortsummary = substr($newstext,0,$chars) . "...";
I'll assume that when you say "when I include" you really mean, "when
the news message contains" -- that is, if the poster included a link or
whatever.
There's two ways to do it... the first is to remove all html, and print
the first 200 chars of plaintext. The second is to count just the
non-html. The third is to escape any html code. I would suggest using
the third method, since that's simplest, fastest, and most sure of
working ok -- after all if a news article happens to contain html, it's
going to have <html><head><title>something</title></head><body ....>
which has to be parsed *differently* from other html tags... and what if
there's a table, and the first 200 chars contain only part of it, hmm?
Do you want to allow blink text to be included? I doubt it.
use Text::Autoformat;
my $article = join "", @{ $nntp->article( $msgid ) };
# replace any/all of CRLF, LFCR, LF, CR, with \n
$article =~ s[\015\012|\012\015?|\015][\n]g;
$body = autoformat($body);
$truncated = length($body) > 200 ? "..." : "";
$body = substr( $body, 0, 200 );
$body =~ s[[^\n]+\z][] && ($truncated = "...");
$body =~ s[&][&]g;
$body =~ s[<][<]g;
$body =~ s[>][>]g;
print "<PRE>$body$truncated</PRE>\n";
A fourth method is to not bother to parse or escape the html at all, and
wrap all of the stuff you get from the nttp server in <XMP> </XMP>
tags... this is even faster/simpler, except that there's always a chance
that someone will have an </XMP> tag in their article.
--
I'm not a programmer but I play one on TV...
------------------------------
Date: Sat, 25 Aug 2001 22:48:14 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: IO::Select's can_read hanging forever.
Message-Id: <3B88636E.E44DAFCB@earthlink.net>
I hate to post replies to my own messages, but...
Benjamin Goldberg wrote:
>
> I have a bit of code which needs to distribute some computation
> between to proccesses, and I use IO::Select to help tell what is
> happening when.
>
> Unfortunatly, I've a call to it's can_read method, which seems to
> never return.
[snipped my code]
> # here's the relevant debug output:
> 6841: entering select...
> Sending [connect, ARRAY(0x405d4df4)]...
> Sent.
> Getting a connect message
>
> And then it hangs there... can_read should return at this point, but
> it doesn't... it just sits there.
Considering the one reply I've gotten, I feel I should clarify.
Because of the debugging output, I *know* that there should be data
available to be read from $reader. The instant that data is available,
select should return -- right then and there. Since I *know* data
should be available, and select seems to indicate that there's *not*,
I'm confused.
> Does anyone have a clue as to what's going on, or do I need to post
> more code?
If anyone's willing to help me, I can email you the code.
--
I'm not a programmer but I play one on TV...
------------------------------
Date: 25 Aug 2001 20:04:24 -0700
From: a_pop@my-deja.com (Alexey Lysenkov)
Subject: Re: No HTML submitted via form
Message-Id: <e39b8fbf.0108251904.396fdf61@posting.google.com>
cool man,
thanks.
Though it will be programmed with ColdFusion ;), the idea is cool. Thanks a lot!
Best regards
Alex
> For each field do something like
>
> $data =~ s/</</g;
> $data =~ s/>/>/g;
>
> i.e. convert <tag> to <tag> that will be viewed by the browser
> as <tag>, not interpreted as a HTML tag.
>
> kent
------------------------------
Date: Sun, 26 Aug 2001 03:46:31 GMT
From: tim@vegeta.ath.cx (Tim Hammerquist)
Subject: Re: pl or not pl, that is the question
Message-Id: <slrn9ogsur.10n.tim@vegeta.ath.cx>
Me parece que --Rick <no_trick@my-deja.com> dijo:
> "Randal L. Schwartz" <merlyn@stonehenge.com> wrote in message
> news:m13d6hx8rk.fsf@halfdome.holdit.com...
> <...discussion of script extensions...>
> | I'm of the firm belief that a *command* (aka "program") should *not*
> | have the implementation language embedded in the path. And I'm not
> | the only one out there. Why should I care when I invoke your program
> | that it was shell or Perl or C originally? I just care about the
> | interface!
> |
> <... lots of useful comments...>
>
> Hmm... I'm grinding my way through a book that suggests the extension
> (.plx). ;)
I've only seen .plx recommended for Perl scripts that run under
PerlIS.dll on Win32, though you can very well assoc them with perl.exe,
as long as you don't really want them to be associated with perlis.dll.
--
Sometimes we can choose the path we follow.
Sometimes our choices are made for us.
And sometimes we have no choice at all.
-- Morpheus, The Sandman
------------------------------
Date: Sat, 25 Aug 2001 21:37:34 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Print to multiple filehandles?
Message-Id: <3B8852DE.D9E53DE3@earthlink.net>
tazjrg2 wrote:
>
> Is there any way to print to many filehandles from a single statement?
>
> For example, instead of having these separate lines:
>
> print LOGFILE "Server $servername\n";
> print ERRFILE "Server $servername\n";
>
> Can I combine those into one?
my $log_and_err = IO::Tee->new( \*LOGFILE, \*ERRFILE );
print $log_and_err "Server $servername\n";
IO::Tee is available from CPAN.
--
I'm not a programmer but I play one on TV...
------------------------------
Date: Sun, 26 Aug 2001 11:19:40 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Question about GD
Message-Id: <slrn9ogjlc.3ga.mgjv@martien.heliotrope.home>
On Sun, 26 Aug 2001 03:04:44 +0200,
Bernhard Schelling <barna@megapage.ch> wrote:
> Thanks a lot for your answer, I will benchmark the GD2 version
>
> Some more information:
> The big image is now 5896 x 5704, maybe it changes in some months or years,
> but thats not important now...
> The small clip can be anything from 50x50 to 300x300 and starts at any pixel
> coordinate in the big image.
Then I'd go with having one large file, and serving subsets dynamically,
unless, of course, that turns out to be too slow. my gut feeling says
that it'll perform ok on any decent hardware. prerendering all the
possible images for that would be a bit much, I guess.
When benchmarking, try to write the benchmarks in such a way so that you
can see what takes long: the loading of the image or the cutting it up.
If you use newFromGD2Part, I suspect that the loading time is going to be
close to proportional to the number of pixels you need to load. For the
other methods it'll be proportional to the number of pixels in the whole
source image.
> Now I have 16 files (each 1474x1426), and i load just the needed
> files, so it loads 4 files in the worst case. Its faster than one
> file, but I hope to get it faster. Maybe I should slice it up into
> 300x300 pieces, so it still needs 4 files in the worst case...
I don't believe that you would need to split the file up if you use
newFromGd2Part(). I haven't actually looked at Boutell's code, but I
doubt it would read anything in a file that it didn't need.
One other alternative, which I didn't think of before, is to use some
mechanism that allows you to only load the images once, and keep them in
memory. mod_perl might be able to help you in a trivial way. I don't
know that much about mod_perl, so I can't say for certain whether that
would be a solution. A benchmark that shows how much time is taken by
loading an image, and how much by using copy() to get a part from it
would tell you how much you can gain by avoiding the load phase.
Otherwise you could do something with a server process and shared
memory, maybe. Overheads introduced here could be larger than gains, and
the programming effort will most likely be quite substantial, although
with some well-chosen modules from CPAN it may be ok.
Martien
--
Martien Verbruggen |
Interactive Media Division | That's funny, that plane's dustin'
Commercial Dynamics Pty. Ltd. | crops where there ain't no crops.
NSW, Australia |
------------------------------
Date: 25 Aug 2001 20:48:44 -0700
From: pohanl@aol.com (None)
Subject: Sex or Perl? Which is better?
Message-Id: <12124e47.0108251948.44fc310f@posting.google.com>
In the beginning there was sex. Then came Perl.
Which is better? Before getting into this very
important question, history must be explained.
In the United States, the most unique ideal held is
the concept of profit and capitalism. This type of
system advocated the cheaper and better to replace
current products. However, when profit is primary,
and cheaper and better is secondary. In order for
a company to make the most profit in capitalism,
the course taken is usually to make a product that is
cheaper and better to outsell current products. When
that happens, it owns more and more market until it
becomes a monopoly. After it is a monopoly, then
it can dictate the price (inflate it) so that it makes
more profit. In the mean time, it will try to destroy
companies that might release products cheaper or better.
In the process of becoming a monopoly, it can do many things
to reach that goal. It can release a product way underpriced
(sold at a loss) so that it destroys competitors who do not have
enough capital to stay in the long term to compete and will die out
due to
lack of money. It can hire away all the talented people in a
competitor (so they do not have smarts to compete). It can
buy them out (so they do not exist anymore). It can use group
pressure to force it out of the marketplace (force companies the
competitor depends on to dump them, and then support companies the
company is in competition with).
However, the main goal of a company is to own the market and stay
there. This is why many companies dump their products in the
marketplace.
The primary goal is to become a monopoly. Afterwards, they can set
the price to any value they want. But in order to dump, the company
must have enough capital to survive.
This is how the system in the United States work. People either try
to come up with a cheaper and better product so that it starts eating
up marketshare, with the eventual goal of becoming a monopoly.
There are some inherent weaknesses in this system however. Because
humans live in it. A human becomes better and better until they reach
mid-age. Then they become worse and worse as they age. Mental and
physical abilities become less and less. Also, humans are the
monopoly
in the living. They basically command the world, and they are
multiplying
more and more. The system the humans created to survive is becoming
more
and more dependent on capitalism. But capitalism does not take care
of
humans in the long run. When a human is aging, capitalism dictates
that
they get replaced by cheaper and better (younger and smarter). And
there
are more and more humans being born everyday. Soon there will be more
and
more people who cannot survive in this system. (the aging, the very
young,
the handicapped, the unemployed etc). This is why medicare,
unemployment benefits, homeless shelters, social security, etc were
created in the first place. To support the other half of the
population who cannot survive in
capitalist society.
Because of the strive for products that are cheaper and better, there
comes
a time when sometimes a product becomes free and better. In this case
something strange happens. The people who used to depend on the
previous
incarnation of the product that was not free become displaced. They
no longer
serve a purpose, and thus cannot survive in a capitalist society.
This is what is happening with open source software and linux and
perl, etc.
They basically created a market that was free (the cheapest). But it
is not better yet. If it was, then Microsoft would be in trouble.
Microsoft went after the monopoly route. They are trying to model
themselves
like Procter and Gamble. Basically becoming a monopoly in all the
products
they sell. (which makes for the hiring of important people from
Procter
and Gamble a few years back). As Microsoft was busy going after this
route,
Linux and Perl, and Java, and open source created went after the
Cheapest
route. Soon there was a clash. The cheapest versus the monopoly. To
survive Microsoft must be better, else capitalism dictates cheapest
and better
will displace them. In the mean time, something is happening... the
humans
are becoming displaced. Because software is becoming free, there are
less
and less people who can survive as programmers. They can't sell
products
when it is free. This goes against the capitalist model of profit.
More in line with socialist and communist route. But the socialist
and
communist route requires a supporting system to take care of business
so that the service can be provided free (like free housing and
guaranteed
work, the system is the government). But there is no supporting
system
in free software. The only indirect supporting system are big
companies
who use it, but as the market becomes more flooded with free stuff,
they
can only support and shrinking subset of software people. The
programmers
and software engineers are becoming like the aged and handicapped in
capitalist society. As more people start using free software, there
becomes less people who can survive to make more free software. They
must take up jobs not directly in this market to support themselves,
so
they can create more free software. This is a dilema that is facing
open source and free software movements... They care destroying their
ability to survive because less and less can make profit and live in
capitalist society as software people. As Microsoft gobbles up the
rest of the market and becomes a monopoly, the free software movement
is gobbling up the profits that could have been, but now is not
(because
it is free). Software like webservers, browsers, languages,
compilers,
operating systems are free. Otherwise, Microsoft owns them. This
is directly beneficial to Microsoft because there are no competitors
who
can survive now (no company can survive selling free stuff, and not
many
have deep pockets to compete against Microsoft). This is a serious
dilema.
Before, the software people could survive because there was an
indirect
system who supported them (the venture capitals who invested in them
who
did not require profit from their work). But now that the bubble
burst,
there is now a big displacement of people who cannot survive because
the
only two routes are competing against a monopoly, or creating free
software
that does not allow them to survive because they cannot make a profit.
Now this comes to the question, how is capitalism dealing with others
who
were affected previously by the same situation? Well, social security
was created to support old people. Disability was created to support
people who are disabled. Homeless shelters and others were created
to help them out. Unemployment benefits were created to temporary
take
care of the unemployed. But isn't this socialism and communism? Yes.
Capitalism cannot survive without a supporting safety net because not
all
the people can survive in this system of profit and cheaper and
better.
A human can not be treated like a product. When they grow old, you
don't
replace them or kill them. They are still around living and surviving
in
society. Handicapped people cannot be scrapped or killed either. Etc
Etc.
Free software is also anti-capitalism. They totally go against
profit.
They are free. Free software is like socialism and communism. But
for
them to survive, some system must be put in place to take care of
people
who create them. And currently there are less and less companies that
can support them. Larry Wall ended up working for the book publisher
that publishes the book on Perl (a book company). Linus Travold ended
up in a company that created chips (a hardware company). Note that
each is in a company that does not directly make a profit on the
product
that they created (only indirectly). Because Perl is free, Larry Wall
can't sell perl. So he must find an indirect way to survive. Just
like
Linus cannot sell Linux, so he must find an indirect way to survive in
the market too (the hardware company that sell computers using his
creation). People who create free software cannot live off of their
work.
Only indirectly.
Now this comes to the point of politics. How is Sun surviving by
creating
Java? Sun survives selling hardware. Sun is trying
to be the monopoly in hardware, while Microsoft is trying to be the
monopoly
on software. If Sun can create enough free software, then they can
still survive by selling hardware. (hardware can never be free
because
they take up resources like metal, chips, etc). So while Sun buys up
StarOffice and gives it out free. Creates Java and gives it out free.
Sun is basically using the dumping technique (sell products below the
cost,
in this case free) to destroy Microsoft. The Free Software Foundation
and Linux are helping along. But in the mean time, this is creating
a unique socialist and communistic situation in for the software
people.
Especially when the dot.com's of the world are now dying out and
leaving
a lot of software people dangling.
Which gets us into more politics. Now that the market is divided up
between free (hardware profit) software and not free (software profit)
software. And this is wreaking havoc on a lot of people.
Then the government steps in. Declares Microsoft a monopoly and
looking
for ways to change the situation. Then a lot of confusion happened
and
is now still being sorted out. Bill Clinton and the democrats were
the
ones that were in power when action was taken. The Department of
Justice
that brought the suit was basically chosen by them. Also, the
democrats
are the ones that more likely supported the minorities (the blacks,
asians, etc). Then you heard that Bill Gates starts a 1 Billion
foundation
to support blacks in the middle of the DOJ monopoly suit. This was
done
to appease the lawsuits coming up by blacks that Microsoft was not
hiring blacks. Recently you also heard on the news that Bill Clinton
very much supported blacks. But why is race involved with this whole
thing?
Because George Bush and the republicans came to power because of the
NRA
and the bombing of the FBI. And how the FBI is now being investigated
for the missing procedure steps involved in the killing in the
Davidian
Branch incident. So now you have a republican party led by Bush that
is supporting whites, versus the democratic party that supports
minorities
and Jews. (Al Gore had a Jewish vice presidential running mate).
Jews
are also more likely to support minorities (asians, blacks etc).
Because
of the holocaust, they don't like people who may be "genocided" so
they
seem to support minorities. Which gets us to the unique situation...
Because Jews are anti-nazi, and is supported by democrats. And NRA
and Bush and republicans are representative of whites and sometimes
Nazi,
this is also wreaking havoc on global politics. Because during Nazi
era,
Japan, Germany, and Italy were allies. Japan killed a lot of asians
that were not-Japanese (like Chinese, etc). This is why the Japanese
prime minister visited the Japanese war shrine lately. As the United
States is being led by pro-white and pro-NRA anti-Jewish and
anti-minority
they are getting Nazi era politics back (Japan becoming more military
and against other asian nations). Note the unique timing of Bush's
trip
to Europe recently after the execution of person who bombed the FBI
building.
Europe is against killing of any human regardless of crime and often
lead
protest against them. So Bush and the republicans can be saying that
they
supported their cause... that he didn't want the bomber to be
executed. Bush,
being from Texas, a usually pro-white state, seems to be leading the
republicans
to represent whites and against minorities. So now that the lines
have
been drawn, between Bush, republicans, white, nazi, wartime Japan,
against Bill Clinton, democrates, Jews, Chinese and blacks... how is
that
affecting the world today? A lot. It is causing a lot of unique
situations
to happen. In the world of politics, sometimes the technique is to
get
enemies to fight each other, and get your hands clean. This is most
likely
why Bush recently sent a high level black representative to China to
give
bad news instead of going himself. This is why Connie Chung (she was
banned during democratic era because she somehow ended up representing
whites,
being sometimes protrayed as being a sell-out to asians by marrying
white)
is now back. But how does this whole thing relate to the topic at
hand?
Well, Microsoft, because of their wrangling conflict with Japan (they
sold a competing XBox that got Sony and other Japanese software makers
aligned
against it), and also because of Gates donating 1 billion to blacks
and
the recent alliance with chinese companies (the major component of the
Xbox
is a very powerful graphics chip that is run by a company run by a
Chinese).
This is why Computer Associates International is now having its
Chairman (Wang a
Chinese) being attacked by a Wryly (a white from Texas) who wants him
removed from the company. It seems the political climate introduced
by Bush and
the republicans are anti-Microsoft anti-Chinese anti-Jews, and
pro-white,
pro-NRA, pro-wartime japan. White democrats now seem to represent
pro-Microsoft
pro-Chinese, pro-Jews and pro-minorities.
Which gets us to the question, why? Well, because of genes. It is
natural
for an organism to want to be with a like-kind. When a pack of
animals
are together, they are usually the same type and make-up. Introducing
a different type causes stress and lessens harmony. There seem to be
genes that are built in that supports like-kindedness. It may have
been
left in to promote survival in the past. When whites saw more and
more
minorities they panic'ed. The same in Japan and China and other
countries.
When you introduce other races in a usually dominant-race society,
stress
results especially if the numbers are increased. The natural grouping
get
interrupted. So what you are seeing in the political arena is a
backlash
against minorities by whites. But is it all just about this gene?
Well,
no. It is also about survival. Because humans need to survive and
they
want to survive in a harmonious environment and one that they will fit
in...
Capitalism and its stress on profit is a system that has unique
properties.
When you hold more cash and capital, you gain more power and survival
ability.
This is why sometimes the Republicans represent the rich and the
Democrats
represent the poor. When the democrats are in power, a lot of
spending by
the government is done so that a majority of the poor get jobs. They
get
more power. Sometimes this increase and injection of money lessens
the
amount of power that the rich have. This increase also help out
minorities.
So this is why when Bush and the Republicans came to power, usually
there are
a lot of layoffs. This puts power back to the rich. As people are
dependent
on money to survive, when you cut the amount of funding to the people,
you
lessen the amount of money they have. Which results in more power to
the
rich and less to the poor. Which is why democrats are usually the
ones
who initiate safty-nets like Social Security and Medicare, etc. But
this
brings up the question... what about the Tax cuts. Well, the tax cuts
are usually geared towards the rich. The rich WANT tax cuts.
Also, spending is usually reduced, so there is less money floating out
there.
This consolidation of money and power back to the rich is simply a
response
to the increase in the amount of power given to the poor. This is why
the United States was so against Communism and Socialism. This
changed
the power structure. Instead of money as a power structure, and the
allocation
of money for power, communism and socialism put dependence of
surviability
on the government, not on money and this took power away from the
rich.
But a pure capitalistic society can't function because of the problem
that
people are not products. They age and can't simply get replaced or
scrapped. Social security, disability, medicare and other's purpose
was put in place because of this. But as the internet and the
computer industry is feeling the impact of the free software and the
war with politics and money is happening
around the world, and a lot of people start waking up to what is
happening,
the software industry is going along, stuck in the middle of it all.
Which comes to the last question... what does this whole post have to
do
with sex? Well, which is better? Sex or Perl?
------------------------------
Date: Sat, 25 Aug 2001 21:01:22 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Sex or Perl? Which is better?
Message-Id: <3B887492.8288AC5B@stomp.stomp.tokyo>
None wrote:
(snipped)
You desperately need to turn off your computer
then go outside to play under our sun and under
our moon, for the next ten years.
Godzilla!
------------------------------
Date: Sat, 25 Aug 2001 22:03:20 -0400
From: Samneric <samneric@tigerriverOMIT-THIS.com>
Subject: Re: Wait for single key press
Message-Id: <MPG.15f222d087877d91989699@news.onemain.com>
Chas Friedman wrote:
> You could put a line of the form:
> <>;
> in your script. This will cause the script to wait for input;
> any input (e.g.<Return>) will let the script continue.
That's not correct. "<STDIN>" will ALWAYS read the next line input. And the
<Return> is not an input example. It's required to terminate the line input.
"<>", on the other hand, CONDITIONALLY reads a line from STDIN ---
-IF- @ARGV is empty when "<>" is FIRST invoked,
-OR- on subsequent invocations after "<>" has returned every argument that
@ARGV held - and has indicated so by returning false once (allowing you to
process arguments in $_ via a while(<>) loop).
Sheeesh... ...I learned THAT one the hard way...
------------------------------
Date: Sun, 26 Aug 2001 11:34:57 +0800
From: "JH Foo" <foojh@hotmail.com>
Subject: Re: Warning Question
Message-Id: <9m9qnc$agg$1@newsie.singa.pore.net>
You need to check if what you're reading in (ie. <INPUT>, is defined. Try
this:
if (defined(my $line = <INPUT>))
...
"Mark Riehl" <mark.riehl@agilecommunications.com> wrote in message
news:_nSh7.1027$tS5.909246@typhoon2.gnilink.net...
> All - I'm reading from a CSV file, using strict and diagnostics. I'm
> getting a warning on the input that I can't seem to resolve:
>
> $_ = 591347,097 20:15:56.311,8453756,1000896,R,-116.575062,35.350251
> Use of uninitialized value in numeric ne (!=) at new_kpp_jev2.pl line 401,
> <INPUT> line 2 (#1)
>
>
> I'm printing out the current line of my input file ($_) and my input file
is
> named INPUT. I'm tracking down the uninitialized warning, but what is the
> <INPUT> line 2 (#1)?
>
> Does this refer to the first field on line 2 in the input file?
>
> Thanks,
> Mark
>
>
------------------------------
Date: Sat, 25 Aug 2001 20:28:31 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: warnings with cgi will crash Win32 perl core
Message-Id: <3B886CDF.6935963B@stomp.stomp.tokyo>
I have been playing around with warnings in the format
of -w to discover how many other ways use of warnings
screws up a Perl script. They are numerous.
My initial method began with use of,
BEGIN
{
use CGI::Carp qw(carpout);
open (WARNINGS, ">c:/apache/users/test/warning.txt");
carpout(*WARNINGS);
}
This proved to be useful for a few mistakes I made in a
very large four-thousand line script. Several never used
variables were found. I also received over five-hundred
lines of false information, which I found humorous.
Later today, I dumped Carp and began researching a
new avenue of approach for discovering other ways
use of warnings will totally FUBAR a script.
I simply retained -w after my Perl locale first
line and switched from a command line to a browser,
after removal of Carp. What a circus is warnings.
Today I discovered warnings provide false information
about use of my declarations within sub-routines, this is,
"...not be shared..." warning. In this case, warnings is
reporting a message my declared variables inside typical
sub-routins along with if conditionals and various loop
mechanisms employing my declarations, these my declared
variables will not be shared on a global basis or psuedo
global basis, which is exactly as intended via my code.
Warnings, in this case, provides erroneous information.
Warnings also cop an "unitialized" message when working
with typical cgi environmental variables. This message,
as with not shared my declarations, is erroneous.
Most annoying, if warnings are enabled with -w for a
complex and sizable cgi script, this hurls perl core
into an infinite loop which can only be terminated
with a kill process or a system shut down and restart.
Fortunately, my system has seven-hundred-sixty-eight
megabytes of RAM. Easy enough to recover, actually
this infinite loop is not noticed on my machine save
for no output from my cgi script under test.
An average machine would not recover.
This applies to Win9.x, Win.me and I believe, Win2000.
So, you Perl 5 Cargo Cultists, when you dictate to others,
"You MUST always use warnings" you are also dictating,
under frequent and common circumstances,
"You MUST always crash your system."
"You MUST always crash perl core."
"You MUST always generate false warnings."
Yes, you MUST do things or be declared a heretic
and, with ample chest thumping, be summarily
killfiled then banished from Perl Perl Land.
Godzilla! Queen Of Perl Heretics.
------------------------------
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 1614
***************************************