[22888] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5109 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 12 03:05:44 2003

Date: Thu, 12 Jun 2003 00:05:09 -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, 12 Jun 2003     Volume: 10 Number: 5109

Today's topics:
        2nd CFV: comp.databases.berkeley-db <dave@technopagan.org>
    Re: Added apache_md5_crypt to create a valid hash  for  (Jay Tilton)
    Re: call other script - dont wait for return <bob@nowhere.com>
        Enqueue a hash? <usenet@cluestore.net>
    Re: extracting multiple data items from an array <bob@nowhere.com>
        Help Error on Install PDL package Dennis@NoSpam.com
    Re: How to do a 'wrapper' on Windows? (Jay Tilton)
    Re: IIS running perl scripts with VB not working (Jay Tilton)
    Re: LWP Post with incorrect response (Chacrint Charinthorn)
    Re: Perl Matrix Filter Module like in Excel? <mgjv@tradingpost.com.au>
    Re: Perl Matrix Filter Module like in Excel? Dennis@NoSpam.com
        Perl version 5.006001 ? <jehoshua@my-deja.com>
    Re: Perl version 5.006001 ? (Tad McClellan)
    Re: Perl version 5.006001 ? <jehoshua@my-deja.com>
        Producing a graph (slash)
        SQL Problem - Select returns nothing (Dennis Macdonald)
        unbelievable doco bug?? in 5.8.0 (the_rev_dharma_roadkill)
    Re: unbelievable doco bug?? in 5.8.0 <bwalton@rochester.rr.com>
    Re: unbelievable doco bug?? in 5.8.0 <bob@nowhere.com>
    Re: Using SOAP::Lite module on remote server, Google AP (Mike)
    Re: Win32::OLE and Sorts (Jay Tilton)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 12 Jun 2003 05:27:50 +0000
From: David E. Smith <dave@technopagan.org>
Subject: 2nd CFV: comp.databases.berkeley-db
Message-Id: <1055395670.28364@isc.org>

                      LAST CALL FOR VOTES (of 2)
             unmoderated group comp.databases.berkeley-db

Newsgroups line:
comp.databases.berkeley-db	The Berkeley DB libraries.

Votes must be received by 23:59:59 UTC, 24 Jun 2003.

This vote is being conducted by a neutral third party.  Questions
about the proposed group should be directed to the proponent.

Proponent: Philip Greer <philip@tildesoftware.com>
Proponent: Dave Segleau <dave@sleepycat.com>
Votetaker: David E. Smith <dave@technopagan.org>


RATIONALE: comp.databases.berkeley-db

There is not a specific Usenet location for discussions on berkeley
database management software (from this point forward I'll refer to as
just 'berkeley-db'). Discussion pertaining to the library occurs on
many other other Usenet forums. Often writings are specific to
berkeley-db itself and does not pertain to the subject matter of the
group the discussion falls within. Not only would a berkeley-db
specific forum provide a central location for todays frequent Usenet
users, it would also provide an on-line research tool for those
seeking on-line issue assistance with the library. Entities such as
Google will provide archives of group postings, and search tools for
those seeking answers to berkeley-db questions - drawing those on-line
that were not aware of the Usenet group (or of net news as a whole).
>From the "Berkeley DB Reference Guide: Introduction": '[berkeley-db]
runs under almost all UNIX and Linux variants, Windows, and a number
of embedded real-time operating systems. It runs on both 32-bit and
64-bit systems. It has been deployed on high-end Internet servers,
desktop machines, and on palmtop computers, set-top boxes, in network
switches, and elsewhere.' As well, berkeley-db has been a tool
available to the programming community for over ten years and
is used on a global scale with over 200 million installations. The
need for an on-line, central location for community discussions has
been long standing. Usenet is the best tool to fulfill this need and
allows addressing this need on a global scale.


CHARTER: comp.databases.berkeley-db

The newsgroup comp.databases.berkeley-db is a news forum devoted to
the discussion of the berkeley database management library. Discussion
entails, but is not limited to: its usage in all programming languages
that can utilize it, bugs, patches, tricks, techniques, support,
announcements; all in a free and open atmosphere.
All postings should be in ordinary text format only. Postings of
binaries (or encoding thereof) is highly discouraged. Cross-posting of
articles irrelevant to the berkeley database library is also
discouraged. The berkeley-db newsgroup is not moderated. Therefore it
is up to the global user base to police its usage.

END CHARTER.


IMPORTANT VOTING PROCEDURE NOTES: READ THIS BEFORE VOTING

The purpose of a Usenet vote is to determine the genuine interest in
reading the proposed newsgroup, and soliciting votes from uninterested
parties defeats this purpose.  Do *not* distribute this CFV;  instead,
direct people to the official CFV as posted to news.announce.newgroups.
Distributing specific voting instructions or pre-marked copies of
this CFV is considered vote fraud.

This is a public vote:  All email addresses, names and votes will be
listed in the final RESULT post.  The name used may be either a real
name or an established Usenet handle.

At most one vote is allowed per person or per account.  Duplicate
votes will be resolved in favor of the most recent valid vote.

Voters must mail their ballots directly to the votetaker.  Anonymous,
forwarded, or proxy votes are not valid, nor are votes mailed from
WWW/HTML/CGI forms (which should not exist).  Votes from nonexistent
accounts or with munged, spam-blocked, or undeliverable addresses are
invalid and will NOT be counted.

Please direct any questions to the votetaker at <dave@technopagan.org>


HOW TO VOTE:

Extract the ballot from the CFV by deleting everything before and after
the "BEGINNING OF BALLOT" and "END OF BALLOT" lines.  Don't worry about
the spacing of the columns or any quote characters (">") that your
reply inserts.  Please, DO NOT send the entire CFV back to me!

Fill in the ballot as shown below.  Please provide your real name
(or established Usenet handle) and indicate your desired vote in the
appropriate locations inside the ballot.

Examples of how to properly indicate your vote:

  [ YES     ]  example.yes.vote
  [ NO      ]  example.no.vote
  [ ABSTAIN ]  example.abstention
  [ CANCEL  ]  example.cancellation

DO NOT modify, alter or delete any information in this ballot!
If you do, the voting software will probably reject your ballot.

When finished, MAIL the vote to <cdbvote@technopagan.org>
Just "replying" to this message should work, but check the "To:" line.
Votes mailed to any other email address, including that of the votetaker,
will NOT be counted.

If you do not receive an acknowledgment of your vote within three
days contact the votetaker about the problem.  You are responsible
for reading your ack and making sure your vote is registered correctly.

If these instructions are unclear, please consult the Introduction to
Usenet Voting or the Usenet Voting FAQ at http://www.stanford.edu/~neilc/uvv.

======== BEGINNING OF BALLOT: Delete everything before this line =======
 .-----------------------------------------------------------------------
| 2ND CALL FOR VOTES: comp.databases.berkeley-db
| Official Usenet Voting Ballot [CDB-42-2] (Do not remove this line!)
|-----------------------------------------------------------------------
| Please provide your real name, or your vote may be rejected. Established
| Usenet handles are also acceptable.  Place ONLY your name (ie. do NOT
| include your e-mail address or any other information; ONLY your name)
| after the colon on the following line:

Voter Name:

| Insert YES, NO, ABSTAIN, or CANCEL inside the brackets for each
| newsgroup listed below (do not delete the newsgroup name):

 Your Vote   Newsgroup
 ---------   -----------------------------------------------------------
[         ]  comp.databases.berkeley-db

======== END OF BALLOT: Delete everything after this line ==============


DISTRIBUTION:

This CFV will be posted to the following newsgroups:

news.announce.newgroups
news.groups
comp.databases
comp.lang.perl.misc
comp.lang.python

Pointers to the CFV will be posted to the following newsgroups:

alt.perl
comp.lang.java.databases
comp.lang.perl.modules
comp.mail.imap
comp.mail.sendmail
comp.unix.programmer


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

Date: Wed, 11 Jun 2003 22:35:09 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Added apache_md5_crypt to create a valid hash  for use in .htpasswd files
Message-Id: <3ee7ac37.3567007@news.erols.com>

kioweb@tutopia.com (Kio) wrote:

: E:\Apache\bin>htpasswd.exe -c password.txt Administrator
: Automatically using MD5 format on Windows.
: New password: *****
: Re-type new password: *****
: Adding password for user Administrator
: 
: the results in password.txt is: (value1)
: Administrator:$apr1$8Z/.....$5g6gHGfU531HsIx4p7Ehl/
: 
: (the password is "spurs")
: this file format run ok for .htaccess in windows and unix systems
: 
: I read Perl docs and download and install  Crypt::PasswdMD5: Module to
: provide an interoperable crypt() to create the same
: file format with a cgi Script, something like this
: 
: #!/usr/local/bin/perl
: 	use Crypt::PasswdMD5;
: 	$name = "Administrator";
: 	$password = "spurs";
: 	$cryptedpassword = apache_md5_crypt($password, $salt);
: 	print "$name:$cryptedpassword";
: 
: now running E:\Apache\bin>perl m.pl
: the result is: (value2)
: Administrator:$apr1$$S44y93.qPKhwCOnmVpqbN1
: 
: obviously the format of the value1 and value2 are not equals

The $salt is significant.  apache_md5_crypt() will return the same
crypt as htpasswd.exe if it uses the same salt.  Quick and ugly test,

    #!perl
    use warnings;
    use strict;
    use Crypt::PasswdMD5;

    my $pwfile = 'password.txt';
    my $name = "Administrator";
    my $pass = "spurs";

    open PWFILE, '<', $pwfile
        or die "Cannot open '$pwfile' for read: $!";
    while(<PWFILE>) {
        chomp;
        last if /^$name:/;
    }
    close PWFILE;
    die "Didn't find username '$name' in '$pwfile'\n"
        unless defined $_;
    print "Read from $pwfile: $_\n";

    my $salt = (split /\$/, $_, 3)[-1];
    my $crypt = "$name:" . apache_md5_crypt($pass, $salt);
    print "Generated for myself: $crypt\n";
    if( $crypt eq $_ ) {
        print "They match.\n"
    } else {
        print "That's not right.\n";
    }



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

Date: Wed, 11 Jun 2003 21:48:30 -0500
From: bob <bob@nowhere.com>
Subject: Re: call other script - dont wait for return
Message-Id: <3ee7e9f9_1@127.0.0.1>

On Wed, 11 Jun 2003 16:11:27 -0500, Rene Scheibe wrote:

perldoc -f fork
perldoc perlfork
perl perlipc

AND

man perl for other things to use perldoc on.


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


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

Date: Wed, 11 Jun 2003 23:03:20 +0000 (UTC)
From: Cliff Daniel <usenet@cluestore.net>
Subject: Enqueue a hash?
Message-Id: <slrnbefdc7.lie.cdaniel@ohno.cluestore.net>

Trivial i'm sure but I can't figure it out.

my $MyQueue = Thread::Queue->new;

my %Targets = (
    'target1' => {'name' => 'blah1', 'type' => 'asdf'},
    'target2' => {'name' => 'blah2', 'type' => 'asdf'},
    'target3' => {'name' => 'blah3', 'type' => 'asdf'},

    'targetn' => {'name' => 'blahn', 'type' => 'asdf'},
);

[pseudo]
foreach ... 
$MyQueue->enqueue %hash_element

Now what I need to be able to do is foreach over the Targets
and enqueue that elements hash (target1, then 2, etc...)
I'm totally confused if I'm doing it wrong on the enqueue or the dequeue.

$Item = $MyQueue->dequeue();
Item now needs to be able to 'see', 'read/write' to the 'name', 'type'
attributes of that hash element.

Any help appreicated.

Regards,
Cliff




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

Date: Wed, 11 Jun 2003 21:34:03 -0500
From: bob <bob@nowhere.com>
Subject: Re: extracting multiple data items from an array
Message-Id: <3ee7e696_1@127.0.0.1>

On Wed, 11 Jun 2003 08:25:19 -0500, tim wrote:

> I'm trying to extract some data elements from an array.  The solution
> below works, but i'm sure there is a much easier way of doing it.
> I had a look at the nslookup module but had
> great trouble getting it (and the prereq's) installed so this was my
> attempt.  I would be grateful for any help.
> 


If you can get Net::DNS to install (which CPAN does on Linux and, I
think, PPM will do on NT [it's on my ancient NT system]), this becomes easy:

#!/usr/bin/perl -w

$|++;
use Net::DNS;

my $dom = 'example.com';
my $res = Net::DNS::Resolver->new;
my  @mx = mx($res, $dom);

die "No MX records for '$dom'\n" unless @mx;

for $rec ( @mx )
{
	print "$rec->{name}, $rec->{exchange} has preference $rec->{preference}\n";
}


email me at bob AT bob-n DOT com


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


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

Date: Thu, 12 Jun 2003 00:23:21 -0500
From: Dennis@NoSpam.com
Subject: Help Error on Install PDL package
Message-Id: <hv1gevo7slqm56llvbdigcgpkc8l23fu5k@4ax.com>

In the MS-Dos window I entered and received the following
Microsoft(R) Windows 98
   (C)Copyright Microsoft Corp 1981-1999.

C:\Perl\bin>ppm
PPM> install pdl
Install package 'pdl?' (y/N): y
Installing package 'pdl'...
Error installing package 'pdl': Read a PPD for 'pdl', but it is not intended for
 this build of Perl (MSWin32-x86-multi-thread)
PPM> install PDL
Install package 'PDL?' (y/N): y
Installing package 'PDL'...
Error installing package 'PDL': Read a PPD for 'PDL', but it is not intended for
 this build of Perl (MSWin32-x86-multi-thread)
PPM>

I have the latest perl build from ActiveState.  I downloaded and installed the
latest version for Win98 today from the Activestate side.

I also tried to download PDL from www.pdl.perl.org .
I unzipped it and untar'd it and put it into it's own directory.

I then did the usual in a dos window from the newly created unzipped c:\PDL
directory

perl MakeFile.PL
dmake
dmake test
dmake install

Note I had to download dmake and put dmake.exe and its "startup" directory into
\perl\bin directory because my computer could not find my vc++ nmake.  when I
put the VC++ nmake into the c:\perl\bin directory nmake still would not work.
However after I installed dmake everything "seemed" to install.  However it was
hard to tell because the lines in the DOS window flew by to fast.

Anyway when I ran the short script:

#!/usr/bin/perl -w
use strict;
use PDL;
$a = zeros 5,5;
print $a;
__END__

I received the error:

Can't locate PDL/Core.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .)
at (eval 1) line 6.
BEGIN failed--compilation aborted at (eval 1) line 6.
BEGIN failed--compilation aborted at C:PDLTest.pl line 3.

I looked in c:\perl\site\lib\pdl\ but there is no Core.pm in that directory.

I've tried 2 methods to install PDL and both failed.

Any help would be greatly appreciated.

TIA

Dennis




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

Date: Wed, 11 Jun 2003 23:27:03 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: How to do a 'wrapper' on Windows?
Message-Id: <3ee7b65e.6166141@news.erols.com>

"foomf" <foomf@attbi.com> wrote:

: I'm finding it extremely hard to create a new process with standard-in bound
: to standard-out of my program, in the traditional command window.

What have you tried?  Seems that a ordinary piped open would be just
the thing, e.g.

    open STDOUT, '| other_program' or die $!;

Enabling buffer autoflushing would be a good idea.

That assumes, of course, that the other program looks for its input on
STDIN.  In the world of DOS programs, that's not always a valid
assumption.



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

Date: Wed, 11 Jun 2003 22:57:32 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: IIS running perl scripts with VB not working
Message-Id: <3ee7b305.5308826@news.erols.com>

danparker276@yahoo.com (Krusty) wrote:

: On computer B, and C IIS win 2000 server, my script exits without
: really running.  Or the file I pipe to gets 0 bytes.
: 
: If I use a basic exe files, I do get output.
: 
: I pretty sure my security setting on both IIS systems are identical. 
: Or as far as I can tell.  Are there any i should really check again?
: My exe file accesses other websites / works as a crawler.
: 
: On thing I noticed on my computer is if I, put a perl dll file in the
: same directory on computer A it fails. (it has activestate installed)
: I'm using pp compiler, but perl2exe doesn't work either.
: I just installed service pack 3 on 1 of them?  Is there a difference
: in VB IIS there?

Troubleshooting skill relies on partitioning a problem and testing
each part separately.  You seem to be suspecting every part at once
and making random changes.

If your question is about web server configuration, one of the
comp.infosystems.www.servers.* groups would be an appropriate place to
seek help.

If your question is about Perl, what is that question?



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

Date: 11 Jun 2003 17:13:40 -0700
From: chacrint@hotmail.com (Chacrint Charinthorn)
Subject: Re: LWP Post with incorrect response
Message-Id: <bfe227db.0306111613.6deac548@posting.google.com>

> > What would be the fix for this problem?
> 
> I don't understand what the problem is. Is the problem your
> assumption?  If so the fix is to drop the assumption.
> 
> Or is your problem that LWP does not like a HTTP/1.0 response to an
> HTTP/1.1 query?  If this is the case then it is a bug in LWP and needs
> to fixed/reported.

My problem is that my perl script, written using LWP modules with
logging enabled, is not working properly and can not read the "Entity
body". Please see below for your reference.

1. The perfect case

---- LWP log shows "LWP::UserAgent::request: Simple response: Internal
Server Error" when the following response is received.

HTTP/1.0 200 OK
Date: Sat, 31 May 2003 05:21:15 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_ssl/2.8.12 OpenSSL/0.9.6b
X-Powered-By: PHP/4.2.3
Content-Type: text/html
X-Cache: MISS from host.my_isp_domain.net
X-Cache-Lookup: MISS from host.my_isp_domain.net:8080
Connection: close

Entity body goes here


2. The case that script produces error

--- and LWP log shows "LWP::UserAgent::request: Simple response: OK"
when the following response is received.

HTTP/1.1 200 OK
Date: Thu, 29 May 2003 03:31:25 GMT
Server: Apache/1.3.27 (Unix) PHP/4.2.3 mod_ssl/2.8.12 OpenSSL/0.9.6b
X-Powered-By: PHP/4.2.3
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html

21
Entity body goes here
0

-------------- End

Thanks,

Chacrint


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

Date: 11 Jun 2003 23:58:12 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: Perl Matrix Filter Module like in Excel?
Message-Id: <slrnbefggm.34c.mgjv@verbruggen.comdyn.com.au>

On Wed, 11 Jun 2003 09:44:16 -0500,
	Dennis@NoSpam.com <Dennis@NoSpam.com> wrote:
> 
> On 11 Jun 2003 04:41:51 GMT, Martien Verbruggen
> <mgjv@tradingpost.com.au> wrote:

[snip]

> I've heard of APL...what is PDL?

PDL is the Perl Data Language, a set of modules providing the Perl
programmer with access to fast manipulation and compact storage of
multidimensional data sets. More information at http://pdl.perl.org/

> Is compliled "exe" perl faster than interpreted perl?

Compiled executables in the Perl world currently are simply a
packaging of a perl interpreter, and the necessary Perl code in a
single executable file. As far as I know, it is no faster than regular
Perl run through the perl interpreter, but I certainly don't know much
about this, since I do not use it.


Martien
-- 
                        | 
Martien Verbruggen      | I'm just very selective about what I accept
Trading Post Australia  | as reality - Calvin
                        | 


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

Date: Thu, 12 Jun 2003 00:37:19 -0500
From: Dennis@NoSpam.com
Subject: Re: Perl Matrix Filter Module like in Excel?
Message-Id: <0r3gevg5dqdnlq96nm0q22mj7cvh2dn9h7@4ax.com>

Thank to Bob, Ted and especially Martien for all your help.

I think perl (and maybe PDL if I ever get it installed!) will be an excellent
solution to my problem.  I've used perl before to a limited extent and have
enjoyed working with it.  The only downside I found is the rather limited
development IDE's to compile and test your code.

thanks again to all.

Dennis




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

Date: Thu, 12 Jun 2003 10:51:16 +1000
From: Peter Richards <jehoshua@my-deja.com>
Subject: Perl version 5.006001 ?
Message-Id: <fijfevslabi6aj00j2ntvl381ip0l12goj@4ax.com>

Hi,

I _think_ I read somewhere that with Perl version 5.6, the format of
the version numbers changed. Is Perl version 5.006001 the same as
version 5.61 ??

Peter


Peter Richards
peter_j_richards@nospamplease.com
 (but use hotmail to email)


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

Date: Wed, 11 Jun 2003 22:20:45 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Perl version 5.006001 ?
Message-Id: <slrnbefscd.48u.tadmc@magna.augustmail.com>

Peter Richards <jehoshua@my-deja.com> wrote:

> I _think_ I read somewhere that with Perl version 5.6, the format of
> the version numbers changed. 


From perldelta.pod for 5.6.1:

------------------------------------------------------------
=head2 Improved Perl version numbering system

Beginning with Perl version 5.6.0, the version number convention has been
changed to a "dotted integer" scheme that is more commonly found in open
source projects.

Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc.
The next development series following v5.6.0 will be numbered v5.7.x,
beginning with v5.7.0, and the next major production release following
v5.6.0 will be v5.8.0.

The English module now sets $PERL_VERSION to $^V (a string value) rather
than C<$]> (a numeric value).  (This is a potential incompatibility.
Send us a report via perlbug if you are affected by this.)

The v1.2.3 syntax is also now legal in Perl.
See L<Support for strings represented as a vector of ordinals> for more on that.

To cope with the new versioning system's use of at least three significant
digits for each version component, the method used for incrementing the
subversion number has also changed slightly.  We assume that versions older
than v5.6.0 have been incrementing the subversion component in multiples of
10.  Versions after v5.6.0 will increment them by 1.  Thus, using the new
notation, 5.005_03 is the "same" as v5.5.30, and the first maintenance
version following v5.6.0 will be v5.6.1 (which should be read as being
equivalent to a floating point value of 5.006_001 in the older format,
stored in C<$]>).
------------------------------------------------------------


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Thu, 12 Jun 2003 14:24:07 +1000
From: Peter Richards <jehoshua@my-deja.com>
Subject: Re: Perl version 5.006001 ?
Message-Id: <pqvfev44bqmm4u0qlis6eq9g4nt8e7f1k5@4ax.com>

Hi Tad,

On Wed, 11 Jun 2003 22:20:45 -0500, tadmc@augustmail.com (Tad
McClellan) wrote:

[SNIP]

>Versions after v5.6.0 will increment them by 1.  Thus, using the new
>notation, 5.005_03 is the "same" as v5.5.30, and the first maintenance
>version following v5.6.0 will be v5.6.1 (which should be read as being
>equivalent to a floating point value of 5.006_001 in the older format,
>stored in C<$]>).
>------------------------------------------------------------

Okay, it seems the version number being used is actually 5.6.1 , as I
just did a 'perl -v' comand and got the following:

"This is Perl, v5.6.1 built for i686-linux"

so it is being reported incorrectly, it should be either v5.6.1 or
5.006_001 . The tool used for display purposes is cPanel/Xskin

Thanks,

Peter


Peter Richards
peter_j_richards@nospamplease.com
 (but use hotmail to email)


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

Date: 11 Jun 2003 20:10:54 -0700
From: satishi@gwu.edu (slash)
Subject: Producing a graph
Message-Id: <30fe9f1e.0306111910.22ef4239@posting.google.com>

Hi,
I am new to Perl and a very bad programmer and am fiddling with a
problem of mapping a certain output to a graph data structure. I think
I can do this in Java but in Perl, I don't even know where to begin!
Following is the format of my output:

Use
     Post
     A
     Your
     Message 
     questions
     Your

Message
     Remember
     that
     that
     is
     questions

Viewed
     by
     millions
     of

questions
     ask
     first


The output I am seeking is the following:

Use
   Post
   A
   Your 
   Message
             Remember
             that
             is
             questions
   questions
             ask
             first
   Viewed
             by
             millions
             of
   

As you can see, I am not repeating any tokens in a branch. Second, I
am discarding a child that's on a branch that also happens to be a
parent or a grand parent to avoid inifinite trees. I am building a
very simple text-processing system where the majority of preprocessing
has already been finished and I am at the stage where I get the above
formatted data. What I need is the ability to somehow map this input
format into a graph obeying the above constraints. As speed is a big
issue for text processing of large collections, I need this to be as
fast as possible but the data structure has to be a graph. My end
result is a graph. Also can I draw this graph using some sort of a
module or a program? Is that feasible?

Any suggestions on how to start this problem would be greatly
appreciated!

Thanks,
Slash


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

Date: 11 Jun 2003 23:22:00 -0700
From: newsgroups@bandwood.com (Dennis Macdonald)
Subject: SQL Problem - Select returns nothing
Message-Id: <d98b592e.0306112222.42ee6254@posting.google.com>

Please help. I have the following code and it inserts into the
database correctly but the select straight after it always returns no
records. After the insert, if I look into the database then it has the
record in it. I've tried everything but to no avail.

Why - please help, desparate!

$SqlCmd = "INSERT INTO tblCounter (ip, timein, counter) VALUES ('$ip',
'$expirytime2', '$form{'page'}');";
$rc = &RunSql($SqlCmd);
print "rc1=$rc\n";      <<<<< this returns 1
          
$SqlCmd = "SELECT * FROM tblCounter;";
$rc = &RunSql($SqlCmd); 
print LOG "rc2=$rc\n";  <<<<<< this always return 0



sub SetDBI {
    # Set error parameters to zero - we control error messaging
    my (%attr) = ( PrintError => 0, RaiseError => 0 );
   
    use DBI;
    $dbh = DBI->connect("DBI:mysql:$config{'database'}:$config{'server'}",
$config{'username'}, $config{'password'}, \%attr) || 
&SysError("counter\.pl", "Cannot connect to database - " . $DBI::err .
", " .$DBI::errstr);
}


sub CloseDBI {
   $dbh->disconnect;
}

sub RunSql {
    my($SqlString) = $_[0];
    my $rtrn_vl=-1;
    
    print "RunSql- SqlString=$SqlString\n"; }
    my $sth = $dbh->prepare( $SqlString );
    $sth->{'mysql_use_result'}=1;
    if (!$sth) {
         &CloseDBI();
         &SysError("RunSql (prepare) - ", $SqlString . ", " .
$dbh->err . ", " . $dbh->errstr);
    }
    
    $rcount = $sth->execute();
    
    if (!$rcount) {   # Undefined
         &SysError("RunSql (execute) - ", $SqlString . ", " .
$dbh->err . ", " . $dbh->errstr);
    } elsif ($rcount eq '0E0') {
         $rtrn_vl = 0;
    } else {
         $rtrn_vl = $rcount;
    }
    return $rtrn_vl;
}


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

Date: 11 Jun 2003 18:22:24 -0700
From: doug.hendricks@tnzi.com (the_rev_dharma_roadkill)
Subject: unbelievable doco bug?? in 5.8.0
Message-Id: <fb91dbec.0306111722.2c4878d5@posting.google.com>

I just can't believe this.  It isn't happenning:

#######
@a = qw( a b c );

while ($x = shift @a) {   # this is a loop
  print "1 $x\n";
  {                       # this is not a loop, it is a block
    next if $x eq 'b';    # if true, we should not reach print below
  }
  print "2 $x\n\n";
}
#######
according to programming perl (3rd), page 746 (near top),
"When LABEL is omitted, the operator refers to the innermost enclosing
loop"
this is the while loop, since a {} block isn't a loop just by itself.

But when we run it, we get:
> perl x.pm
1 a
2 a

1 b
2 b

1 c
2 c

which is clearly wrong.
This is such a fundamental documentation/implementation bug that I
just scratch my head in wonder.  In 8 years of using perl I've never
seen anything like it.

note:  foreach my $x (@a)  doesn't work any better

The Reverend Dharma Roadkill

#########
my perl -V:
Summary of my perl5 (revision 5.0 version 8 subversion 0)
configuration:
  Platform:
    osname=dec_osf, osvers=5.1, archname=alpha-dec_osf
    uname='osf1 zen.xko.dec.com t5.1 2617 alpha '
    config_args='-des -Dlibpth=/usr/shlib /usr/lib /usr/ccs/lib
-Dusemymalloc=no
 -Dprefix=/usr/lib/perl-5.8.0
-Dman1dir=/usr/share/doclib/annex/man/man1 -Dman3d
ir=/usr/share/doclib/annex/man/man3 -Dccflags=-fprm d -ieee
-Doptimize=-O4 -Dhos
tcat=cat /etc/hosts -Dmyhostname=localhost -Umydomain=
-Dcf_by=perlhelp -Dcf_ema
il=root@localhost'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=unde
f
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fprm d -ieee -std -fprm d -ieee -DLANGUAGE_C',
    optimize='-O4',
    cppflags='-fprm d -ieee -std -fprm d -ieee -DLANGUAGE_C'
    ccversion='V6.5-011', gccversion='', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize
=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =''
    libpth=/usr/shlib /usr/lib /usr/ccs/lib
    libs=-ldbm -ldb -lm -lutil
    perllibs=-lm -lutil
    libc=/usr/shlib/libc.so, so=so, useshrplib=true,
libperl=libperl.so
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' 
-Wl,-rpath,/usr/
lib/perl-5.8.0/lib/5.8.0/alpha-dec_osf/CORE'
    cccdlflags=' ', lddlflags='-shared -expect_unresolved "*" -O4
-msym -std -s'


Characteristics of this binary (from libperl):
  Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES
  Built under dec_osf
  Compiled at Aug 26 2002 18:28:54
  @INC:
    /usr/lib/perl-5.8.0/lib/5.8.0/alpha-dec_osf
    /usr/lib/perl-5.8.0/lib/5.8.0
    /usr/lib/perl-5.8.0/lib/site_perl/5.8.0/alpha-dec_osf
    /usr/lib/perl-5.8.0/lib/site_perl/5.8.0
    /usr/lib/perl-5.8.0/lib/site_perl/5.8.0/alpha-dec_osf
    /usr/lib/perl-5.8.0/lib/site_perl/5.8.0
    /usr/lib/perl-5.8.0/lib/site_perl
    .
##############


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

Date: Thu, 12 Jun 2003 02:04:00 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: unbelievable doco bug?? in 5.8.0
Message-Id: <3EE7DF8D.9020401@rochester.rr.com>

the_rev_dharma_roadkill wrote:

> I just can't believe this.  It isn't happenning:
> 
> #######
> @a = qw( a b c );
> 
> while ($x = shift @a) {   # this is a loop
>   print "1 $x\n";
>   {                       # this is not a loop, it is a block
>     next if $x eq 'b';    # if true, we should not reach print below
>   }
>   print "2 $x\n\n";
> }
> #######
> according to programming perl (3rd), page 746 (near top),
> "When LABEL is omitted, the operator refers to the innermost enclosing
> loop"
> this is the while loop, since a {} block isn't a loop just by itself.
> 

You are wrong.  From perldoc perlsyn:


A BLOCK by itself (labeled or not) is semantically equivalent to a loop 
that executes once. Thus you can use any of the loop control statements 
in it to leave or restart the block.


-- 
Bob Walton



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

Date: Wed, 11 Jun 2003 21:44:41 -0500
From: bob <bob@nowhere.com>
Subject: Re: unbelievable doco bug?? in 5.8.0
Message-Id: <3ee7e914_1@127.0.0.1>

On Wed, 11 Jun 2003 20:22:24 -0500, the_rev_dharma_roadkill wrote:

> according to programming perl (3rd), page 746 (near top), "When LABEL is
> omitted, the operator refers to the innermost enclosing loop" 


Bzzt!  Thanks for playing.

The NEXT 2 sentences on the page you quote from says:

"A block by itself is semantically indentical to a loop that executes
once.  Thus, next will exit such a block early (via a continue block if
there is one.)"


----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


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

Date: 11 Jun 2003 23:02:33 -0700
From: csdude@hotmail.com (Mike)
Subject: Re: Using SOAP::Lite module on remote server, Google API
Message-Id: <46cdc619.0306112202.715a67b7@posting.google.com>

<snip>
> > (1) is the module installed correctly? I just uploaded Lite.pm to the
> > cgi-bin (and also tried uploading it to the home directory to no
> > effect).
> 
> That definitely won't work. SOAP::Lite is a whole package containing a
> bunch of different modules. You should download the whole thing from
> 
> http://www.soaplite.com/
    <snip>


Thanks for the help, you guys. I followed your advice, and now it's
working flawlessly! I screwed up on the install at first and somehow
made the 1.1MB package take up 52MB of my web space, but I'll leave
that one to the host to figure out ;-)

To any future readers of this post, if you're installing to a remote
host, the www.soaplite.com site links to a good set of instructions on
how to install it. Took me about 20 minutes, even with my first
(major) mistake.

Thanks again, guys,

Mike


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

Date: Wed, 11 Jun 2003 22:45:27 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Win32::OLE and Sorts
Message-Id: <3ee7b075.4653586@news.erols.com>

"SymbianPSION Hater" <psion.is.fubar@thebroonclan.com> wrote:

: Excel macro is

[snip]

: perl translation im using is

[snip]

: WHAT AM I DOING WRONG?

For one thing, you are not describing the problem adequately.  Your
article conveys nothing more than "it doesn't work."

The clpm posting guidelines offer pointers on crafting an article that
has the best chance of receiving a helpful response.  Put it on your
must-read list.  http://mail.augustmail.com/~tadmc/clpmisc.shtml

Is your Perl program running under "use warnings;" and "use strict;" ?
If not, come back when it is.

Is Perl emitting any error or warning messages?  What are they?

Is the Perl program setting the Win32::OLE package to report OLE
errors?  Are any OLE errors being reported?  What are they?

If the program runs without generating any warnings or errors, explain
how its behavior is different from what you expected.



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

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


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