[23275] in Perl-Users-Digest
Perl-Users Digest, Issue: 5495 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 12 18:10:42 2003
Date: Fri, 12 Sep 2003 15:10:16 -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 Fri, 12 Sep 2003 Volume: 10 Number: 5495
Today's topics:
Re: Perl DBMS <dave334234@inter.com>
Re: Perl DBMS <noreply@gunnar.cc>
Re: Perl DBMS <ge0rge@Talk21.com>
Re: Perl DBMS <noreply@gunnar.cc>
Re: Printing a hash of hashes using an array for the he <krahnj@acm.org>
Re: Printing a hash of hashes using an array for the he (Anno Siegel)
Re: Printing a hash of hashes using an array for the he <usenet@dwall.fastmail.fm>
Re: Redirecting via LWP <someone@somewhere.com>
Re: Redirecting via LWP <someone@somewhere.com>
Re: system command question <syscjm@gwu.edu>
Re: system command question <ak+usenet@freeshell.org>
Re: Test <abigail@abigail.nl>
wierd Array of Hash result <darius_fatakia@yahoo.com>
Re: wierd Array of Hash result <darius_fatakia@yahoo.com>
Re: wxPerl <mpapec@yahoo.com>
Re: wxPerl <mpapec@yahoo.com>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 12 Sep 2003 17:50:59 +0100
From: "Dave" <dave334234@inter.com>
Subject: Re: Perl DBMS
Message-Id: <YPm8b.766$WI3.8660@newsfep4-glfd.server.ntli.net>
a R ?_?y
эh^
` `
1|^|1063198343|^|0|^|Hi|^|Hey there! Hows
U?<br><br>Sarah|^|0|^|83-1054642790|^|Sarah
B|^||^||^|in|^|67-1054343639|^|67-1054343639|^|Chumiest crazy1
Here is one of the databases ( this is just copied and pasted after the file
was opened in notepad.
Thanks
"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:bjrs0u$n0sbu$1@ID-184292.news.uni-berlin.de...
> Dave wrote:
> > I have a ikonboard messageboard ( which is written in perl), and I
> > have all the databases saved locally.
> >
> > However they are in a *.db, *.dnt.db format, and i cannot access
> > them via the standard dbmopen(%hash, $database, 0666).
> >
> > It simply creates a new file instead of accessing the current one.
> >
> > I had a suspicion that the version of dbm on the server ( ie the
> > one that created the databases at the start) is a diffenent on to
> > the one on my windows machine.
>
> Are you sure they are DBM files? Or can they be plain text files that
> happen to have .db file extentions? (Have you tried to open one of
> them with e.g. Notepad?)
>
> If that doesn't help, you'd better do as James suggested and post some
> code, such as a code fragment that creates or read the databases.
>
> --
> Gunnar Hjalmarsson
> Email: http://www.gunnar.cc/cgi-bin/contact.pl
>
------------------------------
Date: Fri, 12 Sep 2003 18:52:10 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl DBMS
Message-Id: <bjsue0$n7l0a$1@ID-184292.news.uni-berlin.de>
Please do not top post! http://web.presby.edu/~nnqadmin/nnq/nquote.html
Dave wrote:
> Gunnar Hjalmarsson wrote:
>> Dave wrote:
>>> I have a ikonboard messageboard ( which is written in perl),
>>> and I have all the databases saved locally.
>>>
>>> However they are in a *.db, *.dnt.db format, and i cannot
>>> access them via the standard dbmopen(%hash, $database, 0666).
>>>
>>> It simply creates a new file instead of accessing the current
>>> one.
>>>
>>> I had a suspicion that the version of dbm on the server ( ie
>>> the one that created the databases at the start) is a diffenent
>>> on to the one on my windows machine.
>>
>> Are you sure they are DBM files? Or can they be plain text files
>> that happen to have .db file extentions? (Have you tried to open
>> one of them with e.g. Notepad?)
>>
>> If that doesn't help, you'd better do as James suggested and post
>> some code, such as a code fragment that creates or read the
>> databases.
<funny characters snipped>
> Here is one of the databases ( this is just copied and pasted after
> the file was opened in notepad.
So, then we know that they are not text files.
Where is your code?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 12 Sep 2003 19:04:20 +0100
From: "ge0rge" <ge0rge@Talk21.com>
Subject: Re: Perl DBMS
Message-Id: <bjt1r9$n4qfn$1@ID-175222.news.uni-berlin.de>
"Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
news:bjsue0$n7l0a$1@ID-184292.news.uni-berlin.de...
> Please do not top post! http://web.presby.edu/~nnqadmin/nnq/nquote.html
which says '... they also agree that it's usually in bad taste to correct
mistakes publicly'
MS is the principal culprit IMO, not the newbees.
ge0rge
--
Expert, n.:
Someone who comes from out of town and shows slides.
------------------------------
Date: Fri, 12 Sep 2003 22:51:39 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Perl DBMS
Message-Id: <bjtbju$n7jti$1@ID-184292.news.uni-berlin.de>
ge0rge wrote:
> "Gunnar Hjalmarsson" <noreply@gunnar.cc> wrote in message
> news:bjsue0$n7l0a$1@ID-184292.news.uni-berlin.de...
>
>> Please do not top post!
>> http://web.presby.edu/~nnqadmin/nnq/nquote.html
>
> which says '... they also agree that it's usually in bad taste to
> correct mistakes publicly'
That was a quote out of context, which btw is bad everywhere.
Actually, the quoting style document describes various kind of
newsgroups, and to anybody who has followed _this_ group for a while,
it stands perfectly clear that you'd better expect public corrections
if you don't respect the posting guidelines.
> MS is the principal culprit IMO, not the newbees.
May be true. But pointing out to a newbie that there are posting
guidelines is a way to help them benefit from this group. It does
_not_ make him/her a "culprit".
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Fri, 12 Sep 2003 21:02:50 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: Printing a hash of hashes using an array for the headings and getting the columns to line up
Message-Id: <3F62346E.55FAAB69@acm.org>
"David K. Wall" wrote:
>
> Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
>
> > You can now (well, after the version propagates) control the
> > alignment of titles with the body through the key "align_title" in
> > the hash-specification, much like you suggested.
> >
> > One feature draws another by the tail... So similarly,
> > "align_title_lines" controls the alignment of title lines among
> > themselves for muiltiline titles.
>
> Oh my. I was reading the module and trying to understand how it works
> so that /maybe/ I could send you a patch. So far all I had
> accomplished was screwing things up. If you're ever in Cincinnati I'll
> buy you a beer, or if not a beer, some Skyline chili. :-)
Are you saying that beer and Skyline chili are interchangable in
Cincinnati? That's either strong beer or weak chili. :-)
John
--
use Perl;
program
fulfillment
------------------------------
Date: 12 Sep 2003 19:52:39 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Printing a hash of hashes using an array for the headings and getting the columns to line up
Message-Id: <bjt867$e7i$1@mamenchi.zrz.TU-Berlin.DE>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in comp.lang.perl.misc:
> David K. Wall <usenet@dwall.fastmail.fm> wrote in comp.lang.perl.misc:
> > Anno Siegel wrote:
> >
> > [regarding Text::Table]
> >
> > I haven't examined the internals closely, so I may be way off-base
> > here, but since it already allows users to define columns with hashes,
> > wouldn't that be the obvious place to add new features for column
> > formats?
>
> That is very probably what will happen.
You can now (well, after the version propagates) control the alignment
of titles with the body through the key "align_title" in the
hash-specification, much like you suggested.
One feature draws another by the tail... So similarly, "align_title_lines"
controls the alignment of title lines among themselves for muiltiline
titles.
Anno
------------------------------
Date: Fri, 12 Sep 2003 20:04:27 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: Printing a hash of hashes using an array for the headings and getting the columns to line up
Message-Id: <Xns93F4A37C9C9B5dkwwashere@216.168.3.30>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
[re Text::Table]
> You can now (well, after the version propagates) control the
> alignment of titles with the body through the key "align_title" in
> the hash-specification, much like you suggested.
>
> One feature draws another by the tail... So similarly,
> "align_title_lines" controls the alignment of title lines among
> themselves for muiltiline titles.
Oh my. I was reading the module and trying to understand how it works
so that /maybe/ I could send you a patch. So far all I had
accomplished was screwing things up. If you're ever in Cincinnati I'll
buy you a beer, or if not a beer, some Skyline chili. :-)
--
David Wall
------------------------------
Date: Fri, 12 Sep 2003 16:09:08 +0100
From: "Bigus" <someone@somewhere.com>
Subject: Re: Redirecting via LWP
Message-Id: <bjsnil$kck@newton.cc.rl.ac.uk>
"Bigus" <someone@somewhere.com> wrote in message
news:bjsltn$r8m@newton.cc.rl.ac.uk...
[..]
> sub gotofilearea()
> {
> $url = "http://username:password\@$host/files/$listname/";
> print "Refresh: 0; URL=$url\n";
> print "Content-type:text/html\n\n";
> exit;
> }
[..]
> I want to try that in a few different browsers, just to make sure you
really
> can't see the password anywhere, but it's looking good :-)
Mozilla 1.3 is OK.. and IE 6.. but:
Netscape 4.79 doesn't like it.. it sits there for about 2 minutes
"tranferring data", then finally comes up with a dialog saying "the document
contained no data" and then promptly displays the file area but with the URL
"http://username:password@mydomain.com/lists/sw-test.html" in the status bar
:-(
Bigus
------------------------------
Date: Fri, 12 Sep 2003 16:22:35 +0100
From: "Bigus" <someone@somewhere.com>
Subject: Re: Redirecting via LWP
Message-Id: <bjsobt$lrs@newton.cc.rl.ac.uk>
"Michael Budash" <mbudash@sonic.net> wrote in message
news:mbudash-94523B.11201311092003@typhoon.sonic.net...
> you can't do what you're trying to do in the way you're trying to do
> it.
OK.. I concur with that now :-) Handing the password to the browser is never
going to be secure in that you couldn't trust every browser and version not
to display it at some point.
Back to the drawing board, which in this case probably means tackling
Mod_Perl <sweat>
Bigus
------------------------------
Date: Fri, 12 Sep 2003 11:51:40 -0400
From: Chris Mattern <syscjm@gwu.edu>
Subject: Re: system command question
Message-Id: <3F61EB8C.8000604@gwu.edu>
Himal wrote:
> I there a reason why a command will not work if i do system "$cmd &>
> xyz.log" even though it works if I do system "$cmd"
Most likely, the shell perl is using to parse your command is
not csh. Exactly why this is so would depend on your configuration.
Try this, which will work for sh/ksh/bash: system "$cmd >xyz.log 2>&1"
Chris Mattern
------------------------------
Date: Fri, 12 Sep 2003 15:58:42 +0000 (UTC)
From: Andreas Kahari <ak+usenet@freeshell.org>
Subject: Re: system command question
Message-Id: <slrnbm3r9h.amd.ak+usenet@vinland.freeshell.org>
In article <3F61EB8C.8000604@gwu.edu>, Chris Mattern wrote:
> Himal wrote:
>> I there a reason why a command will not work if i do system "$cmd &>
>> xyz.log" even though it works if I do system "$cmd"
>
> Most likely, the shell perl is using to parse your command is
> not csh. Exactly why this is so would depend on your configuration.
> Try this, which will work for sh/ksh/bash: system "$cmd >xyz.log 2>&1"
There is no reason for it to be csh. The manual for the system
command says:
If there is only one scalar argument, the argument is
checked for shell metacharacters, and if there are any, the
entire argument is passed to the system's command shell for
parsing (this is "/bin/sh -c" on Unix platforms, but varies
on other platforms). If there are no shell metacharacters
in the argument, it is split into words and passed directly
to "execvp", which is more efficient.
So it's either /bin/sh (on Unix systems) or no shell at all.,
if you haven't done some pretty freakish changes in the default
configuration.
--
Andreas Khri
------------------------------
Date: 12 Sep 2003 21:34:22 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Test
Message-Id: <slrnbm4euu.jnn.abigail@alexandra.abigail.nl>
John Smith (john@gandalf.ukshells.co.uk) wrote on MMMDCLXIV September
MCMXCIII in <URL:news:Zxo8b.4104$fR4.860@newsfep3-gui.server.ntli.net>:
<> This is a test. This is a test. This is a test.
<> Please ignore!!!
Impossible without reading it.
John Smith, meet Mr. Killfile.
Mr. Killfire, meet John Smith. Have a snack.
Abigail
--
use lib sub {($\) = split /\./ => pop; print $"};
eval "use Just" || eval "use another" || eval "use Perl" || eval "use Hacker";
------------------------------
Date: Fri, 12 Sep 2003 11:50:05 -0700
From: "superfly2" <darius_fatakia@yahoo.com>
Subject: wierd Array of Hash result
Message-Id: <bjt4gu$fld$1@news.Stanford.EDU>
I have constructed an array of hashes (pointers to hash elements) and I have
the following problem when I foreach or for loop through the array and print
the hashes: Arrays of size < 18 print fine. But arrays >= 18 freeze after
the 18th elem (no matter what order i put the hashes into the array). I
don't know why 18 is the magic number, but it always is. In fact, I can
explicitly print elements 19, 20, and 21 before I print the first 18, but
then when I try to print the others, I can only print the first 15 (because
I printed 3 elements before...again 15+3 = 18! I don't get it).
I can print all the elements in the array (not just the first 18) if I print
only some of the hash values. I do not get any warnings when I run this
script.
Here is the relevant code, any help would be very much appreciated.
#!/usr/bin/perl -w
use strict;
use warnings;
my ($list) = @_;
my @arr = split("[\n\r]+", $list);
my @pairsAoH;
my $elem;
foreach $elem (@arr)
{
my %hash;
if ($elem =~ /[\t\|]/)
{
($hash{'name'}, $hash{'locus'}) = split("[\t\|]+", $elem);
$hash{'locus'} =~ s/^\s+//gm;
$hash{'locus'} =~ s/\s+$//gm;
}
else
{
$hash{'name'} = $elem;
}
$hash{'name'} =~ s/^\s+//gm;
$hash{'name'} =~ s/\s+$//gm;
push @pairsAoH, {%hash};
}
.
.
.
# code to fill in more of the hash value pairs
.
.
.
foreach my $item (@pairsAoH) #this prints fine
{
print "$$item{'name'}, $$item{'locus'}\n";
}
foreach my $hash (@pairsAoH) #only prints the first 18 and
freezes
{
print
"$$hash{'name'}\t\'$$hash{'locus'}\'\t\t$$hash{'start'}\t$$hash{'end'}\t\t$$
hash{'fbid'}\t$$hash{'cg'}\n";
}
------------------------------
Date: Fri, 12 Sep 2003 12:38:41 -0700
From: "superfly2" <darius_fatakia@yahoo.com>
Subject: Re: wierd Array of Hash result
Message-Id: <bjt7c2$kam$1@news.Stanford.EDU>
nevermind. i got it (printing unintialized values for some elems).
------------------------------
Date: Fri, 12 Sep 2003 18:25:23 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: wxPerl
Message-Id: <9ds3mvsp9lb4djpp4ee9nk4j8hl4ja160h@4ax.com>
X-Ftn-To: Helgi Briem
f_baggins80@hotmail.com (Helgi Briem) wrote:
>>Yes, great! Do you have any experience with cygwin?
>
>Yes. I use it and like it.
>
>> I think it's easyer to work under it in case you need to compile
>> some module.
>
>I don't use cygwin perl. I have had very good results
>with Activestateperl and modules are *extremely*
>easy to work with using PPM.
My experience with ppm is also good as long I don't search for modules which
aren't there. I've tried "s wx" and nothing come out.. Maybe they don't have
module for 5.8 yet. :!
--
Matija
------------------------------
Date: Fri, 12 Sep 2003 19:54:00 +0200
From: Matija Papec <mpapec@yahoo.com>
Subject: Re: wxPerl
Message-Id: <5o14mvk9j4uhl68b1vp15okp1tu172e95u@4ax.com>
>f_baggins80@hotmail.com (Helgi Briem) wrote:
>>Yes. I use it and like it.
>>
>>> I think it's easyer to work under it in case you need to compile
>>> some module.
>>
>>I don't use cygwin perl. I have had very good results
>>with Activestateperl and modules are *extremely*
>>easy to work with using PPM.
>
>My experience with ppm is also good as long I don't search for modules which
>aren't there. I've tried "s wx" and nothing come out.. Maybe they don't have
I'm sorry because I didn't read your post carefully. Do you know how to make
modules under win2k (modules that need c compiler)?
--
Matija
------------------------------
Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re:
Message-Id: <3F18A600.3040306@rochester.rr.com>
Ron wrote:
> Tried this code get a server 500 error.
>
> Anyone know what's wrong with it?
>
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {
(---^
> dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
...
> Ron
...
--
Bob Walton
------------------------------
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 5495
***************************************