[12449] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6049 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 18 18:07:35 1999

Date: Fri, 18 Jun 99 15:00:25 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 18 Jun 1999     Volume: 8 Number: 6049

Today's topics:
    Re: a thread on threads (the skinny on the schedule) (Andrew Allen)
    Re: Afraid to ask about Y2K! (Philip 'Yes, that's my address' Newton)
    Re: Afraid to ask about Y2K! (Chris Nandor)
    Re: Afraid to ask about Y2K! <keithmur@mindspring.com>
        ANN: Grabbing daily cartoons <sb@sdm.de>
    Re: Cant make PPM work. (Jan Dubois)
        changing directories <ywong@andrew.cmu.edu>
    Re: changing hash keys thru subroutine (M.J.T. Guy)
        Database Management Problem <splinter@monmouth.com>
        e-mail client <Ch1ckEn@hotmail.com>
    Re: Hex to Decimal?? (Philip 'Yes, that's my address' Newton)
    Re: Is split (surprisingly, amazingly) slow? rael@my-deja.com
    Re: Losing referrer information when passing through a  <jde222RemovethiS@iname.com>
    Re: math::Matrix <sb@sdm.de>
    Re: matinal musings and the madrugada (Gregory Snow)
    Re: MM_Win32 (Jan Dubois)
        Need help adding Perl support to NT registry please <dj@lennon.com>
    Re: Need help adding Perl support to NT registry please <cassell@mail.cor.epa.gov>
        Need to edit cgi script using Windows PC, which prog to <austin.m@virgin.net>
    Re: Need to edit cgi script using Windows PC, which pro <cassell@mail.cor.epa.gov>
    Re: Need to edit cgi script using Windows PC, which pro <crt@highvision.com>
    Re: Neet Perl Obfucation Program (Philip 'Yes, that's my address' Newton)
    Re: Neet Perl Obfucation Program <cassell@mail.cor.epa.gov>
        Newbie fails to setup Perl/PWS <Sp.Ross@btinternet.com>
    Re: Newbie fails to setup Perl/PWS <cassell@mail.cor.epa.gov>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 18 Jun 1999 21:29:00 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: a thread on threads (the skinny on the schedule)
Message-Id: <7kedms$4or$1@fcnews.fc.hp.com>

Greg Bartels (gbartels@xli.com) wrote:
: Uri Guttman wrote:
: > what about an application (in c) that used threads and had not a single
: > lock or mutex and has been running full bore for over 2 years? i slurps
: > in over 5 GB of web pages a day and is rock solid. it is the crawler
: > used by northern light and i designed it that way.

: I was planning on using threads only so that I could do 
: subroutine continuaiton, call a sub, halt it halfway, 
: call a second sub, let it finish, then let the first sub
: finish. 

I've done the exact thing (for CPU verification, imagine that!) in C++
with the "task.h" library. Basically makes multiple calling stacks,
and switches between them when requested (non-preemptive). I wonder if
you can emulate this behavior in perl.

Turns out debugging this was much much harder to debug (as most
debuggers aren't expecting the stack to move around) than if I had
just stored my state explicitly and did the return & resume in each
state machine. The model we use around here is to store an array of
states in each pending "transaction", and set the state to "zero" when
that particular state machine is finished, and then a "dispatcher"
loops through the pending transactions with any non-zero states and
runs them.

Andrew


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

Date: Fri, 18 Jun 1999 20:03:15 GMT
From: nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <376aa5c7.50554805@news.nikoma.de>

On Fri, 18 Jun 1999 10:37:51 -0500, Cameron Dorey
<camerond@mail.uca.edu> wrote:

>No wonder there weren't any pictures on his web page (when it was up).
>BTW, both he (on clp.misc) and his pages seemed to have dropped from
>sight.

One web page I could never get a hold of. Another page seems fine to
me as of 1998-06-18 20:00 GMT. (By the way, on it, Abigail refers to
herself as "she" -- so you all might well, too.)

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.net>


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

Date: Fri, 18 Jun 1999 20:06:30 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Afraid to ask about Y2K!
Message-Id: <pudge-1806991606350001@192.168.0.77>

In article <7ke62m$s36$1@coranto.ucs.mun.ca>, pdf@morgan.ucs.mun.ca (Paul
David Fardy) wrote:

# pudge@pobox.com (Chris Nandor) writes:
# >  Yeah.  Go figure.  Rely on documentation?  Never!  Caveat scriptor.
# 
# >  ...
# 
# >  You are blaming the language, which is nonsense.  That's like blaming
# >  English because people can incite riots using it.
# 
# Yet, wouldn't there be fewer Y2K problems in C and Perl programs
# if localtime() returned the full four digit year?

Probably.  But c'est la vie.  I don't have an opinion on whether the
standard library should return years since 1900 or years since 0.  I
support Perl using the standard library which happens to return years
since 1900.

And I cannot feel bad for programmers who can't figure it out or companies
who hire programmers who can't figure it out.  And I again maintain that
if someone can't figure out localtime, Y2K issues will be the least of
their worries.  If a programmer is so dense or inexperienced that they
cannot properly use the date returned from localtime(), their code is
probably really bad in many other ways.  If it is a CGI, it is probably
insecure.  If it is a daemon, it is probably eating up far too many system
resources.  If it writes to a file, it is probably trampling on other
people's writes by not flocking.

In other words, if you have a programmer who is not using localtime
properly, or if you are not using localtime properly, your issue is not
Y2K, or Perl, but poor programming in general.  localtime() is incredibly
simplistic compared to all of the other things a programmer can do wrong.

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


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

Date: Fri, 18 Jun 1999 16:31:43 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Afraid to ask about Y2K!
Message-Id: <376ABABF.49B6027A@mindspring.com>

finsol@ts.co.nz wrote:
> 
> In article <376942C0.860F1144@mindspring.com>,
>   keithmur@mindspring.com wrote:
> > finsol@ts.co.nz wrote:
> > >
> <SNIP>
> >
> > Here's the suggestion, finsol, or whoever:
> >
> > grep all the damn source code to find all references to localtime.
> > Follow all the code  ...
> 
> The Y2K problem in Perl code goes beyond just the localtime booby trap.
> The localtime issue is just the most obvious but even so few Perl coders
> on this site acknowledge it as being a problem their reasoning being
> that the manual states quite clearly how localtime should be used.
> 
> For more Y2K problems that may affect Perl code, you may want to check
> out this URL:
> http://www.idg.co.nz/WWWfeat/Y2000/ja190499.htm
> 
> Others problems that may be of interest are described at:
> http://www.y2kinfo.com/journal/features/0499_amon.html
> http://www.idg.co.nz/WWWfeat/Y2000/amon0914.htm
> 
> BTW, I have NEVER stated that the Perl programming language is not Y2K
> compliant - I do know the distinction. 

BTW, I never said you did.  My statement was:

"Then again, there are the folks that are too lazy to make the
distinction between a language having a Y2K problem, and the possibility
of writing programs with Y2K problems using that language."

Supported by your previous statements such as:

"I agree that the term 'booby trap' does get an emotive response
but it aptly describes the nature of the problem in Perl and the
other affected languages."

"Perl has major potential for falling over with the Y2K problem. "

I've noticed you've been more careful about your terminology in recent
postings.  While commendable, it's too bad you can't acknowledge your
mistakes.  (Or, *gasp*, even thank those who have corrected you).


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

Date: 18 Jun 1999 21:07:58 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: ANN: Grabbing daily cartoons
Message-Id: <7kecfe$oh5$1@solti3.sdm.de>

I made a nice little set of scripts for downloading daily cartoons
(e.g. Dilbert, UserFriendly and Calvin&Hobbes), maintaining an archive
(sorted by date) of them and viewing the images via a CGI script.

The grabber scripts can be started as cron jobs as in the following example:
(your crontab can be edited with "crontab -e")

-------------------- cut here -------------------- cut here --------------------
### Minute, Hour, Day, Month, Day_of_Week
07,22,37,52 * * * * /u/sb/.www/cartoons/dilbert/grabber.pl
12,27,42,57 * * * * /u/sb/.www/cartoons/userfriendly/grabber.pl
17,32,47,02 * * * * /u/sb/.www/cartoons/calvinandhobbes/grabber.pl
-------------------- cut here -------------------- cut here --------------------

The grabber scripts exit almost immediately if there's nothing to do.
The reason for this scheme is that it is not known when the daily
pictures are being updated.

Note that the grabber scripts rely on "lynx" for the downloading proper
and that all the scripts need the Date::Calc module.

This scripts suite can be downloaded from the following URL:

    http://www.engelschall.com/u/sb/scripts/cartoons.tools.tar.gz

(This file is only 2829 bytes long.)

I hope you will find these scripts useful!

Regards,
-- 
    Steffen Beyer <sb@engelschall.com>
    http://www.engelschall.com/u/sb/whoami/
    http://www.engelschall.com/u/sb/download/
    http://www.perl.com/CPAN/authors/id/STBEY/
    http://www.oreilly.de/catalog/perlmodger/bnp/


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

Date: Fri, 18 Jun 1999 23:40:54 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: Cant make PPM work.
Message-Id: <376ebb3d.19732894@news3.ibm.net>

[mailed & posted]

pj durai <pjdurai@my-deja.com> wrote:

>
>> I'm not surprised that you get an error when you try to install
>> XML::Parser because it is actually used by PPM itself (although I
>> get a different error when I try ).  It is installed already
>> anyhow - does this happen with other modules ?
>>
>
>No luck there either.
>my PPM seems to be broken permanently.
>
>:-(
>
>
>bash$ /perl/bin/ppm.bat install URI.ppd
>Element 'OPTIONS' must have a 'TRACE' attribute. at C:\PERL\lib/PPM.pm
>line 1711
>.
>Element 'OPTIONS' must have a 'TRACEFILE' attribute. at C:
>\PERL\lib/PPM.pm line
>1711.
>Error installing package 'URI.ppd': Read of ./ failed

You can just insert them manually in your /perl/site/lib/ppm.xml file. 

Here is an example entry with the two attributes at the end:

<OPTIONS BUILDDIR="H:\TEMP" CLEAN="Yes" CONFIRM="Yes" FORCEINSTALL="Yes"
 IGNORECASE="Yes" MORE="0" ROOT="I:\Perl" TRACE="" TRACEFILE="" />

After adding the attributes PPM should work again normally.

-Jan


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

Date: Fri, 18 Jun 1999 17:33:01 -0400
From: interface <ywong@andrew.cmu.edu>
Subject: changing directories
Message-Id: <Pine.SOL.3.96L.990618172904.12687A-100000@unix7.andrew.cmu.edu>


I'm writing a script that makes calls to another program via command line,
and these commands pull files in and out of a database into (and only
into) the "current directory," that is, the one in which the script is
running [or was launched].

I can't seem to find a way to change the directory so that when I make
these calls to the other program, the directory change remains.  I'm
running on a Win32 platform; "chdir" and "system" calls to change the dir
seem to launch a separate process, change the dir _in_ that process, and
then return, leaving the script sitting where it used to.  

Any ideas?  Hacks, even?


Yishan Wong				    www.contrib.andrew.cmu.edu/~ywong
--------------------------------o			  sciscita proximitas



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

Date: 18 Jun 1999 20:04:43 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: changing hash keys thru subroutine
Message-Id: <7ke8or$h91$1@pegasus.csx.cam.ac.uk>

Darrin Edwards  <d-edwards@uchicago.edu> wrote:
>
>Plus, I thought it was generally considered Naughty to modify
>hash elements while iterating over the hash?  Or is that just with
>`each' and kind?

It's OK in this case.   The foreach makes a copy of the list of keys
before it starts.

But as pointed out, there are other things wrong with the approach.


Mike Guy


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

Date: Fri, 18 Jun 1999 17:13:28 -0400
From: "Matt" <splinter@monmouth.com>
Subject: Database Management Problem
Message-Id: <7kecsh$fp$1@news.monmouth.com>

Hi,

I'm using a plain old text file delimited by colons :::: and certain
routines just aren't working out.  Here's some of my code and an
explanation.

THIS ROUTINE ADDS A RECORD TO THE DATABASE

sub AddCarToDatabase
{
 open (DBW, ">> $cardatabase") || print "Content-type: text/html\n\n Can't
write to $cardatabase ($!)";
 $newrecord =
$id."::".$make."::".$model."::".$year."::".$miles."::".$price."::".$etc."::"
 .$image."\n";
 print DBW $newrecord;
 close(DBW);

 &DisplayCars;
}

The above routine will make the text file look like this (as an example):

1300::ford::mondeo::1119::342322::255252::pw/pw CD/AM/FM!::ford0002.jpg
1301::ford::mondeo::1119::342322::255252::pw/pw CD/AM/FM!::ford0002.jpg
1302::ford::mondeo::1119::342322::255252::pw/pw CD/AM/FM!::ford0002.jpg

Now, the adding of cars works great!  Until I try to delete or sort
one...here's the code for delete:
Note: on the matching I used :+ so that it would work with any combination
of delimitation by colons.

sub DeleteCarFromDatabase
{
 open (DB, "<$cardatabase") || print "Content-type: text/html\n\n Can't read
$cardatabase ($!)";
 while (<DB>)
  {
   $db .= $_;
  }
   $db =~ s/$id:+.*:+.*:+.*:+.*:+.*:+.*:+.*\n//;    # in ActiveState this
WORKS!!!   In UNIX it seems not to!!!!
 close(DB);

 open (DBW, ">$cardatabase") || print "Content-type: text/html\n\n Can't
write to $cardatabase ($!)";
 print DBW $db;
 close(DBW);

 &DisplayCars;
}


THIS ROUTINE SORTS THE RECORDS BY ID

sub SortByID
{
 open (DB, "< $cardatabase") || print "Content-type: text/html\n\n Can't
read $cardatabase ($!)";
 @db_lines = <DB>; # READ THE DATABASE INTO AN ARRAY - EACH LINE ITS OWN
ELEMENT
 @sorted = sort(@db_lines);  # SORT THE LINES - IN THIS CASE BY THE ID SINCE
IT COMES FIRST
 close(DB);


 open (DBW, "> $cardatabase") || print "Content-type: text/html\n\n Can't
write to $cardatabase ($!)";
 print DBW @sorted; # OVERWRITE ALL CONTENTS OF DATABASE WITH NEW SORTED
DATABASE
 close(DBW);

 &DisplayCars;
}


My PROBLEM is that after I try to delete or sort the database it doesn't
delete or sort but it adds records.  Probably because it takes each part of
the text file line by line, and if it finds an extra \n somewhere it turns
that into something like this:

1300::ford::mondeo::1119::342322::255252::pw/pw CD/AM/FM!::ford0002.jpg
1301::ford::mondeo::1119::342322::255252::pw/pw CD/AM/FM!::ford0002.jpg
1302::ford::mondeo::1119::342322::255252::pw/pw CD/AM/FM!::ford0002.jpg
1301::::::::::::::

And thus I get a text database looking like that.  If I try to delete 1301
it adds a record with 1301 and those extra colons.  If I sort them I just
get a bunch of colons (no 1301 in front).

Any help appreciated.  My PERL coding and coding in general SUCKS and needs
lots of work.  Open to criticism, just not flames.

-Matt




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

Date: Fri, 18 Jun 1999 22:48:09 +0200
From: GiN <Ch1ckEn@hotmail.com>
Subject: e-mail client
Message-Id: <376AB089.F171ABD7@hotmail.com>

Hi, i'm working on a e-mail client
but i have some problems with the protocol i think



this is a part of the program
it works on some mailservers but not all
some servers disconnect after the MAIL FROM
and some servers receives the mail but the DATA is missing
can somebody check this out??

i am a beginner so help will be appreciated



sub sendmsg {
    select(S);                         # the socket S
    $| = 1;
    if (<S> =~ /^220/) {
        print S "HELO $host\n";
    } else {
        die $!;
    }
    if (<S> =~ /^250/) {
        print S "MAIL FROM:<$emailaddr>\n";
    } else {
        die $!;
    }
    if (<S> =~ /^250/) {
        print S "RCPT TO:<$ercpt>\n";
    } else {
        die $!;
    }
    if (<S> =~ /^250/) {
        print S "DATA\n";
    } else {
        die $!;
    }
    if (<S> =~ /^354/) {
        print S "Date: 23 Oct 81 11:22:33\n";
        print S "From: <$emailaddr>\n";
        print S "Subject: $subject\n";
        print S "X-Mailer: Mozilla 4.6 [en] (Win98; I)\n";
        print S "To: <$ercpt>\n";
        print S "@mesg";
        print S "\n.\n";
    } else {
        die $!;
    }
    if (<S> =~ /^250/) {
        print S "QUIT\n";
    } else {
        die $!;
    }
    if (<S> =~ /^221/) {
        select(STDOUT);
        print "Done.\n";
    } else {
        die $!;
    }
}



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

Date: Fri, 18 Jun 1999 20:09:10 GMT
From: nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)
Subject: Re: Hex to Decimal??
Message-Id: <376aa746.50938254@news.nikoma.de>

On 18 Jun 1999 10:16:22 -0600, Daniel Grisinger
<dgris@moiraine.dimensional.com> wrote:

>You're weak! Weak, I say!  Real men don't use brain-sucking,
>hand-holding, sissy programs like vi or emacs to program.  
>Real men use cat.

_Real_ real men use cat for binaries, too...

Cheers,
Philip "who needs a compiler" Newton
-- 
Philip Newton <nospam.newton@gmx.net>


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

Date: Fri, 18 Jun 1999 19:44:09 GMT
From: rael@my-deja.com
Subject: Re: Is split (surprisingly, amazingly) slow?
Message-Id: <7ke7i5$qht$1@nnrp1.deja.com>

In article <7j0q49$68j$1@nnrp1.deja.com>,
  John Porter <jdporter@min.net> wrote:
>
>
> Considering that Lear's purpose for writing the programs as he did
> was simply to be a framework for benchmarking the relative speed of
> splitting a string, it seems to me that the overhead of his framework
> can (and will) obscure the value he's really after.

Perhaps, but as I mentioned in my original post, I am interested in
writing a split routine in C++ to work within a particular programming
idiom.  My intention therefore was not simply to compare the split
routines, though that was the main purpose.  I also wanted to compare
the implementation of the idiom in various languages, with one part of
the idiom (the processing part) left as simple as possible.

> So I took the perl and python programs and made versions which are
> identical but which do not perform the split; then subtracted the
> timings of these, in order to find the time for just doing the splits.
> Here are user times (i.e. not including sys and io times), and the
> differences, which shows the performance of the split.  Interestingly,
> the perl code was faster than the python code in every observed
respect.
>
> 27.0    RSP.pl  (Perl)
>  3.4    RSP-nonsplitting.pl
> ----
> 23.6
>
> 41.7    RSP.py  (Python)
> 12.1    RSP-nonsplitting.py
> ----
> 29.6
>
> My input data was one million lines of 9 fields; field lengths
> randomly distributed uniformly from 0 to 9.
>
> perl 5.005_02
> python 1.5.1
> Sun Solaris 2.6, sparc Ultra-60, 640Mb ram,

Perhaps perl 5.005 is quite a bit faster than 5.004, or platform
differences are intruding, or something else.  I just reran my programs
on input of one million lines of 9 fields.

The Perl version took 38.6 seconds, and the Python version took 15.5
seconds.

With the split line commented out, the Perl version took 2.2 seconds,
and the Python version took 4.9 seconds.

Subracting as you did:

38.6  Perl with split
 2.2  Perl without split
----
36.4  Perl split cost

15.5  Python with split
 4.9  Python without split
----
10.6  Python split cost

The one difference that I can see is that your data are more regularly
distributed.  The data set I am using is quite sparse --- most of the
fields are empty.

Just for reference, here is the Perl code:

    my $count = 0;
    my @v;
    while (<STDIN>) {
        @v = split(/\|/);
        $count++;
    }
    print "$count\n";

and here is the Python code:

    import sys, string

    def main():
        readline = sys.stdin.readline
        split = string.split

        count = 0
        while 1:
            line = readline()
            if not line: break
            l = split(line, '|')
            count = count + 1

        print count

    main()

I am using Python 1.5.2 on a 400Mhz Pentium box Linux 2.0.35, 256 Meg
memory.


--
Bill


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 18 Jun 99 20:30:10 GMT
From: "Euro Jake" <jde222RemovethiS@iname.com>
Subject: Re: Losing referrer information when passing through a perl script...?
Message-Id: <7ke9tr$qac$1@news3.Belgium.EU.net>


On 18-Jun-1999, "Martin Quensel" <martin@adoma.se> wrote:

> In a way it does! it maybee explains the problem we in this newsgroup face
> sometimes when we are trying to help people out.

Hi again, and thanks for your prompt and corrective reply
I apologize for my previous post while being upset since this thing keeps me
going for several days now. Ill try answer ur questions below


> Im sorry, but as the question dident supply the information needed to
> solve
> your problem, i cant help you.
> I think it will be very hard for anyone to help you solv your problem,
> unless you give us something to look at.

> Right now, the problem you have could really be anything.
> It could be that you dont have perl installed on you system, or a million
> other things.

Perl installed, works fine, only the referrer info is blanked

> Or even that you dont have javascript turned on in your browser.

Using javascript already, again, just the document.referrer is blanked out

> I dont think its something simple as that..im not saying it is.
> Im just trying to explain how little i have to go on, when a question is
> that way.
> I could try to mention, everything that could be wrong with your script.

Tried this in <head>   ... and in <body> ...
print "<META HTTP-EQUIV=\"REFRESH\"
CONTENT=\"1;URL=http://mysitehome/$targetk/index.shtml\">\n";

and this
print "<script language=\"javascript\">
  location.assign (\"http://mysitehome/$targetk/index.shtml\");
  </script>\n";

and this
print "<script language=\"javascript\">
  window.location.href ='http://mysitehome/$targetk/index.shtml';
  </script>\n";

All this transfers to the url i want... just ... the referrer info is
blank...

And the referrer is still valid before the redirect happens...
If the password isnt valid, the redirection instructions are left out
displaying the error page... where the referrer info is still present

Im aware the prob isnt sitting in the Perl interface itself... but more in
the transactions between the documents... and/or the interaction
HTML/Perl/Javascript

Sooo... you tell me... where do i start....:)))

> But since it could be millions of things, i dont have the time to write it
> down. And you dont have time to download a 10 megabyte textfile.
>

Ive been reading parts of te perldoc that came frome ActiveState
Ive been searching throug webcrawlers
Ive been trying to find a workaround

And out of inspiration, tried to get some hint here

> Post some code where you think its going wrong, explain the problem a
> little
> better.
> Then sit down and relax as people like me will try to help you with you
> problem.
>
> cheers!
> Martin Quensel

As said.. i was wrong as well in my reply...
Thanks

-- 
Euro Jake
>RemovethiS< in next line...
Anti spam email  jde222RemovethiS@iname.com


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

Date: 18 Jun 1999 20:06:15 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: math::Matrix
Message-Id: <7ke8rn$nec$1@solti3.sdm.de>

In article <376a6ee9.1030361@news.semaphore.com>, casey@f5.com wrote:

> I am useing the Math::Matrix module and have run into a problem when I
> try to my values back out.  There doesn't seem to be anyway to get the
> product of a matrix multiplication except sending it to stdout via
> ->print.  Does anyone know of a way to get specific values in the
> matrix out of the Math::Matrix construct?

The name of the method is "element()". See also the module's documentation.
("man Math::MatrixReal" (Unix) or "perldoc Math::MatrixReal" (Unix and Win32))

-- 
    Steffen Beyer <sb@engelschall.com>
    http://www.engelschall.com/u/sb/whoami/
    http://www.engelschall.com/u/sb/download/
    http://www.perl.com/CPAN/authors/id/STBEY/
    http://www.oreilly.de/catalog/perlmodger/bnp/


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

Date: 18 Jun 1999 19:54:28 GMT
From: snow@biostat.washington.edu (Gregory Snow)
Subject: Re: matinal musings and the madrugada
Message-Id: <7ke85k$14hs$1@nntp6.u.washington.edu>

In article <m3n1xxo5m2.fsf@moiraine.dimensional.com>,
Daniel Grisinger  <dgris@perrin.dimensional.com> wrote:
>bart.lateur@skynet.be (Bart Lateur) writes:
>
>> David Cantrell wrote:
>> 
>> >>the Marine Corps always dated their documents YY/MM/DD
>> 
>> >Makes it nice n' easy to sort by date in a language which doesn't
                             ^^^^
                             ^^^^

>> >support a Date type (see - back on topic!) which is a Good Thing.
>> 
>> But yet it is a Y2K bug.
>
><larry type='other'>
>
>Using a two digit year field doesn't automatically mean
>that you have a y2k bug.  Context matters.  Target audience
>matters.  This isn't cut and dried.
>
></larry>
>

It appears to me that the context is sorting, is the following a Y2K
bug or not?

w> perl -de 1

Loading DB routines from perl5db.pl version 1.0401
Emacs support available.

Enter h or `h h' for help.

main::(-e:1):   1
  DB<1> @dates = ('99/06/18','98/06/18','00/06/18','01/06/18');

  DB<3> print join "\n", sort @dates
00/06/18
01/06/18
98/06/18
99/06/18


-- 
-------------------------------------------------------------------------------
     Gregory L. Snow         |    Matter cannot be created or destroyed,
     (Greg)                  |  nor can it be returned without a receipt.
snow@biostat.washington.edu  |


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

Date: Fri, 18 Jun 1999 23:40:52 +0200
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: MM_Win32
Message-Id: <376db9c8.19359016@news3.ibm.net>

[mailed & posted]

"Oleg Semenov" <ringm@usa.net> wrote:

>    One silly question - does there exist an MM_Win32.pm for
>ActivePerl that generates working makefiles (without &&, 2>&1
>and all this unix stuff)?

There is already a MM_Win32.pm in ActivePerl, but it does generate
Makefiles using standard shell features. '&&' and '2>&1' are not really
UNIX-only things. You are probably using command.com, which is a sorry
excuse for a shell. You might want to try either 4DOS or bash from the
cygwin utilities. On WinNT you can use the standard cmd.exe shell, which
groks all this just fine.

>    I have patched MM_Unix.pm myself, but it is not perfect, as
>my knowledge of perl is far from brilliant... It works, however...

If you make it a clean patch, you could submit it to either the MakeMaker
or the perl5-porters mailing list and see if it gets included in future
releases. :-)

-Jan


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

Date: Fri, 18 Jun 1999 14:35:27 -0600
From: "Dan Lennon" <dj@lennon.com>
Subject: Need help adding Perl support to NT registry please
Message-Id: <N5ya3.63056$uo1.175242@news.uswest.net>

I need help adding Perl support to the NT registry please.

--


Best regards,

Dan Lennon




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

Date: Fri, 18 Jun 1999 14:12:48 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Dan Lennon <dj@lennon.com>
Subject: Re: Need help adding Perl support to NT registry please
Message-Id: <376AB650.D7677611@mail.cor.epa.gov>

[courtesy cc sent to poster]

Dan Lennon wrote:
> 
> I need help adding Perl support to the NT registry please.

If you have ActiveState Perl installed, you'll be pleased to
know that the answer is already on your system.  Go to your
Start Menu and find the shortcut to the Perl on-line docs 
placed there during the install.  Look at the ActivePerl
FAQ, and check under the sections titled "Docs & Support",
"Windows 95/NT", "Web Server Config", and "Quirks".  If you
want to know how to change the registry via Perl as well,
that's in the ActivePerl FAQ too!

And if you're still stuck, I've been told that there is
help for adding Perl script support to MS webservers in
the Microsoft Knowledge Base.  So that makes the score:
M$ Good Things:2 ; M$ Bad Things: urr, ummm.. oh forget 
it, I'm only a mathematician, I can't count that high.
:-)

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 18 Jun 1999 21:33:37 +0100
From: "Mark Austin" <austin.m@virgin.net>
Subject: Need to edit cgi script using Windows PC, which prog to use
Message-Id: <7kea6j$4d2$1@nclient3-gui.server.virgin.net>

Actually, I just need to change the baseline (URL) address of a Perl cgi
script.
Is it safe to do this in Notepad or Wordpad, I've heard that (if you use the
wrong progam) it adds some stuff that the Unix box will not like.

RSVP and thanks

Mark




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

Date: Fri, 18 Jun 1999 14:06:37 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Mark Austin <austin.m@virgin.net>
Subject: Re: Need to edit cgi script using Windows PC, which prog to use
Message-Id: <376AB4DD.81D7DF20@mail.cor.epa.gov>

[courtesy cc sent to poster]

Mark Austin wrote:
> 
> Actually, I just need to change the baseline (URL) address of a Perl cgi
> script.
> Is it safe to do this in Notepad or Wordpad, I've heard that (if you use the
> wrong progam) it adds some stuff that the Unix box will not like.

Yes, most win32 and MS-DOS programs place the win32 'newline' (which is
two characters) on the ends of lines.  Not a problem.  When you ftp
it up to the unix server, just make sure you use ASCII mode instead of
binary.  Then your ftp program will do the translation for you.

ObPerl: and, although this might not have been clear to you, this
wasn't actually a Perl question at all, and hence was off-topic for
this newsgroup.  Just so you'll know...

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 18 Jun 1999 17:01:54 -0400
From: "Casey Tweten" <crt@highvision.com>
Subject: Re: Need to edit cgi script using Windows PC, which prog to use
Message-Id: <7kecli$3j67@news.icubed.com>

Use what ever you like, but perhaps you are talking about escape characters,
since(this may not be totally correct):

Windows: \n\r
Mac: \r\n
Unix: \n

This may be what you are talking about, a good FTP program can adjust this,
I believe that wsftp_le does this.

--
               +-----------------+
               | Casey R. Tweten |
+--------------+--------+--------+--------------+
| * KiskiNet ISP        | HighVision Associates |
| * HighVision Studio   | Web Developer         |
| * ISP-ProServices     | www.highvision.com    |
| * CityBuilder.com     | crt@highvision.com    |
+-----------------------+-----------------------+
|   <joke>This is 100% virus free code</joke>   |
+-----------------------------------------------+

Mark Austin <austin.m@virgin.net> wrote in message
news:7kea6j$4d2$1@nclient3-gui.server.virgin.net...
: Actually, I just need to change the baseline (URL) address of a Perl cgi
: script.
: Is it safe to do this in Notepad or Wordpad, I've heard that (if you use
the
: wrong progam) it adds some stuff that the Unix box will not like.
:
: RSVP and thanks
:
: Mark
:
:




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

Date: Fri, 18 Jun 1999 20:07:40 GMT
From: nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)
Subject: Re: Neet Perl Obfucation Program
Message-Id: <376aa644.50679323@news.nikoma.de>

On 18 Jun 1999 14:37:28 GMT, jeromeo@atrieva.com (Jerome O'Neil)
wrote:

>Also, I tried to send you email, but it bounced.  Your e-mail address is
>
>newton@gmx.net
>
>right?

No. My From: address is

    nospam.newton@gmx.net (Philip 'Yes, that's my address' Newton)

The 'Yes, that's my address' is suppose to be a clue that you *don't*
have to remove anything to e-mail me. Just leave the address as it is;
it's deliverable that way.

My hope was that programs that filter out addresses would throw out
the signal word, thus producing an undeliverable e-mail address and
sparing me some spam. People are not suppose to de-mung the address.

I apologise for any inconvenience this has caused anyone.

Cheers,
Philip <nospam.newton@gmx.net>
($Myfirstname . '.' . $Mylastname . '@gmx.net' also works, FYI)
-- 
Philip Newton <nospam.newton@gmx.net>


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

Date: Fri, 18 Jun 1999 14:00:11 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: "Philip 'Yes, that's my address' Newton" <nospam.newton@gmx.net>
Subject: Re: Neet Perl Obfucation Program
Message-Id: <376AB35B.DC356344@mail.cor.epa.gov>

[courtest cc sent to poster]

Philip 'Yes, that's my address' Newton wrote:
> [snip] 
> My hope was that programs that filter out addresses would throw out
> the signal word, thus producing an undeliverable e-mail address and
> sparing me some spam. People are not suppose to de-mung the address.
> 
> I apologise for any inconvenience this has caused anyone.

Don't apologize.  I thought it was not only convenient, but
also fiendishly clever.  And I thought the rest of your From:
line explained everything.

I guess we're all so used to the 'fun' of de-munging anti-spam
addresses that it becomes mechanical after a while.

David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Fri, 18 Jun 1999 21:40:17 +0100
From: "Simon Ross" <Sp.Ross@btinternet.com>
Subject: Newbie fails to setup Perl/PWS
Message-Id: <7kearu$9e4$1@neptunium.btinternet.com>

How do I configure ActiveState Perl for MS Personal Web Server? My CGI
scripts won't work - when I access cgi-bin, the browser just sits there and
waits until it times out.

I guess this is a dumb setup issue, but I just want to get started!

Gratitude,
Ross






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

Date: Fri, 18 Jun 1999 14:23:01 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
To: Simon Ross <Sp.Ross@btinternet.com>
Subject: Re: Newbie fails to setup Perl/PWS
Message-Id: <376AB8B5.6587CC1F@mail.cor.epa.gov>

[courtest cc sent to poster]

Simon Ross wrote:
> 
> How do I configure ActiveState Perl for MS Personal Web Server? My CGI
> scripts won't work - when I access cgi-bin, the browser just sits there and
> waits until it times out.
> 
> I guess this is a dumb setup issue, but I just want to get started!

I'm guessing it is too.  So I'll recommend the ActivePerl FAQ
on your hard disk, which you can find in your Perl on-line
docs.  There's a shortcut to them on your Start Menu, and it
will let you read them in your favorite web browser.  Go into
the ActivePerl FAQ part and look in the Web Server Config
section.  There's a specific reference to MS PWS.  That will
refer you to another line in the same section, but don't
get discouraged.

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 6049
**************************************

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