[12559] in Perl-Users-Digest
Perl-Users Digest, Issue: 6159 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 28 21:07:15 1999
Date: Mon, 28 Jun 99 18:00:21 -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 Mon, 28 Jun 1999 Volume: 8 Number: 6159
Today's topics:
12.50$ per referral, new program - so get to be first t (Morag)
Apples and Oranges (doug edmunds)
blocking SIGINT and SIGQUIT (jaya)
Re: blocking SIGINT and SIGQUIT <emschwar@rmi.net>
Re: CGI and SSI <enduser@dont.spam.me.execpc.com>
Re: Constants and strict <dms@rtp-bosch.com>
DBI and Recursion <David@hounsell.freeserve.co.uk>
Re: double substitution (Tad McClellan)
Re: each-ing on $rec{'thing'}{'subthing'} (Bart Lateur)
Re: each-ing on $rec{'thing'}{'subthing'} <cassell@mail.cor.epa.gov>
Help in using library dilipc@my-deja.com
Help needed in using library dilipc@my-deja.com
Re: HELP: Thank you! roberthp@my-deja.com
Humbled with command completion (Joan Richards)
Re: Linux better than perl? <revjack@radix.net>
Re: NEWBIE TRYING TO CODE <gellyfish@gellyfish.com>
Re: NEWBIE TRYING TO CODE <rgaushell@hotmail.com>
Re: NEWBIE TRYING TO CODE <cameron_graham@clear.net.nz>
RE: offline testing of Perl/CGI's <torcu99@teleline.es>
open windows alternatives (ADSI=net::ldap,ADO=DBI,etc) (John Nielsen)
Re: perl CGI Redirection (Alastair)
Problem Installing Tk 8.000.14 - make => line too long <s.griffiths@virgin.net>
RE: Problem with CGI in IE but not Netscape <torcu99@teleline.es>
Re: Problem with CGI in IE but not Netscape <cassell@mail.cor.epa.gov>
Re: random numbers ? <jcreed@cyclone.jprc.com>
Re: random numbers ? <cassell@mail.cor.epa.gov>
Win32::API <aldricht@onslowonline.net>
Win32::EventLog Description parsing <aldricht@onslowonline.net>
XML::Parser Objects Style problem <malone@eagle.larscom.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 29 Jun 1999 00:54:23 +0200
From: agmonr@isdn.net.il (Morag)
Subject: 12.50$ per referral, new program - so get to be first to sign up and get lots of referrals!
Message-Id: <8DF4F052agmonrisdnnetil@news.isdn.net.il>
YO, LISTEN UP:
You can get $12.5 for each referral! yes, you read it correctly, $12.5 !
All u have to do is refer people, make 'em register with your number.
you dont have to buy anything and spend time or money on the internet!
Register for free , with any commitment at:
http://www.targetshop.com/users/level1.asp?refId=275579
Within 2 hours you will get an email, with info on how to activcate your
account (by pressing the link).
And then you can start referring people and collect $12.5 for each one!
Every $50 you collect they send you a check.
It is simple, and its working!!! so sign up NOW!
------------------------------
Date: Mon, 28 Jun 1999 23:35:13 GMT
From: edmundsMUNGED@pacifierMUNGED.com (doug edmunds)
Subject: Apples and Oranges
Message-Id: <3777f504.22678596@news.pacifier.com>
Can anyone explain why the 'oranges' test (below) fails?
In what way is a string that starts with a digit (other than 0)
different than any other string, or is this a bug?
#Doug Edmunds 6/28/99
Free Perl5 documentation in HTMLHelp format at
http://www.pacifier.com/~edmunds/perltools.html
#--------code starts-----------
#! perl -w
#apples_and_oranges.pl
# -------- first test
$a = "One apple";
print "first - $a \n";
$a_ref = \$a;
$$a_ref = "Two apples";
print "second - $a \n";
$$a = "Three apples";
print "third - \$\$a is $$a \$a is $a \n\n";
# -------- second test
$b = "One apple";
print "first - $b \n";
$b_ref = \$b;
$$b_ref = "Two apples";
print "second - $b \n";
$$b = "3 apples";
print "third - \$\$b is $$b \$b is $b \n\n";
# -------- third test
$c = "1 orange";
print "first - $c \n";
$c_ref = \$c;
$$c_ref = "2 oranges";
print "second - $c \n";
$$c = "3 oranges"; #the crash site
#you won't see the next line print
print "third - \$\$c is $$c \$c is $c \n\n";
#------code ends
------------------------------
Date: 28 Jun 1999 21:19:39 GMT
From: jaya@asdf (jaya)
Subject: blocking SIGINT and SIGQUIT
Message-Id: <7l8otb$3elud@fido.engr.sgi.com>
we have a large program that really needs to have a handler for SIGINT
and SIGQUIT.
looking at perlfunc manpage and grepping through the perlmanpages for
handling of signals did not help me. perhaps i am not looking for the
right keywords.
so i am wondering if there is a way to wrap the original program in
something that will allow me to clear up any temp files created when
the program sees a SIGINT.
also please let me know how you discovered the solution so that i can
figure stuff like this out in the future.
thanks,
jaya
------------------------------
Date: 28 Jun 1999 17:59:48 -0600
From: Eric The Read <emschwar@rmi.net>
Subject: Re: blocking SIGINT and SIGQUIT
Message-Id: <xkf9093lvuz.fsf@valdemar.col.hp.com>
jaya@asdf (jaya) writes:
> so i am wondering if there is a way to wrap the original program in
> something that will allow me to clear up any temp files created when
> the program sees a SIGINT.
It's amazingly easy-- just add water!
> also please let me know how you discovered the solution so that i can
> figure stuff like this out in the future.
perldoc perlvar
Search for "$SIG{expr}" (no quotes).
-=Eric
------------------------------
Date: Mon, 28 Jun 1999 19:58:01 -0500
From: "End User" <enduser@dont.spam.me.execpc.com>
Subject: Re: CGI and SSI
Message-Id: <7l95ba$f2f@newsops.execpc.com>
It sould be able to recognise the correct sytax:
<!--#INCLUDE xxxxxxxxxxxx-->
Abigail wrote in message ...
>Pippo (pippo@landptek.com) wrote on MMCXXVI September MCMXCIII in
><URL:news:7l4u8c$vlb$1@aquila.tiscalinet.it>:
>~~
>~~ I use Apache as web server. How can I configure it to recognize SSI
commands
>~~ in dynamic pages generated on the fly by perl CGI script.
>
>
>You call Apache Tech Support.
>
>What has Apache configuration to do with Perl?
>
>
>Abigail
>--
>perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>C
D=>(
>0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>
0=>0
>=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}f
or(;
>!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
>
>
> -----------== Posted via Newsfeeds.Com, Uncensored Usenet News
==----------
> http://www.newsfeeds.com The Largest Usenet Servers in the World!
>------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers
==-----
------------------------------
Date: Mon, 28 Jun 1999 18:19:10 -0400
From: Doug Seay <dms@rtp-bosch.com>
Subject: Re: Constants and strict
Message-Id: <3777F4DE.C432DDD6@rtp-bosch.com>
[posted and CC'd]
Robert de Geus wrote:
> use strict;
> require 'constants.pm';
I usually use constants like
use constant NAME => VALUE;
buy if you like to use "require", go for it. Just remember that "use"
is compile-time and "require" is run-time, so don't expect a whole lot
of constant folding or other tricks out of "require".
I think that a quick glance at "perldoc constant" would do you good, but
that is your call.
- doug
------------------------------
Date: Tue, 29 Jun 1999 00:06:11 +0100
From: "David Hounsell" <David@hounsell.freeserve.co.uk>
Subject: DBI and Recursion
Message-Id: <7l8v4o$eh3$1@news5.svr.pol.co.uk>
I am trying to learn Perl so that I may implement a Web Database system. I
am using Sybase with Perl and DBI/CGI.
The problem is this, I have a table containing parent/child relationships
such as
Parent Child
------------ -------------
Contact Person
Contact Company
Person Emploee
Employee Manager
Company Bank
And wish to parse this to display the data as:-
Contact
Person
Employee
Manager
Company
Bank
etc...
Here's the program I tried but I cannot figure out the error message, I
suspect it could be becuase I call the function recusively.
use DBI;
my $dbh = DBI->connect("dbi:Sybase:SYBASE",'sa','',{RaiseError=>1,
AutoCommit=>1});
$dbh->do("use conifers");
&print_tree("Contacts", 0);
sub print_tree
{
my $sql = "SELECT child FROM tree WHERE parent = '$_[0]'";
my $sth = $dbh->prepare($sql);
$sth->execute;
while((my $child)=$sth->fetchrow_array)
{
print "$child\n";
#Add Code to print tabs, number given by second parameter
&print_tree($child, $_[1]+1);
}
$sth->finish;
}
$dbh->disconnect;
Thanks,
------------------------------
Date: Mon, 28 Jun 1999 11:55:59 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: double substitution
Message-Id: <fu58l7.sp3.ln@magna.metronet.com>
Gerolf Scherr (gscherr@oeh.org) wrote:
: I have some files, which contain text & scalars, eg:
: ---
: today we have $weather weather.
: the weather today is $weather
: ---
: I want to read these files and substitute the $weather variable:
: I don't want to use s//g, if possible,
Please share your reason for that restriction.
Maybe it can be overcome.
Nobody knows unless you tell us *why* the "s///eeg" used for
solving exactly your problem in the Perl FAQ, part 4
is unacceptable for your application.
"How can I expand variables in text strings?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 28 Jun 1999 22:13:02 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: each-ing on $rec{'thing'}{'subthing'}
Message-Id: <3778f326.4158371@news.skynet.be>
Uri Guttman wrote:
>trust perl, it knows what is right for you.
So what should I eat for breakfast?
Bart.
------------------------------
Date: Mon, 28 Jun 1999 17:41:23 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: each-ing on $rec{'thing'}{'subthing'}
Message-Id: <37781633.3CA03099@mail.cor.epa.gov>
Bart Lateur wrote:
> Uri Guttman wrote:
> >trust perl, it knows what is right for you.
>
> So what should I eat for breakfast?
Umm, let's see.. 'perls before swine'... 'a perl of great
price'...
Okay, ham and caviar.
David, whose rabbi great-grandfather is probably spinning
like a lathe...
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 29 Jun 1999 00:19:10 GMT
From: dilipc@my-deja.com
Subject: Help in using library
Message-Id: <7l93dl$qb$1@nnrp1.deja.com>
Hi,
I am novice to perl.
I wrote small library called ReadEnv.pl, it's
fairly simple one and has a subroutine called:
"_readEnv"
I use another perl script (SyncDispCodes) which
calls this library using
"require ReadEnv.pl"
and then I call the subroutine _readEnv.
When I compile, I get following message:
ReadEnv.pl did not return a true value at
SyncDispCodes line 8.
Can somebody help me.
Thanks.
-dilip
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 29 Jun 1999 00:20:08 GMT
From: dilipc@my-deja.com
Subject: Help needed in using library
Message-Id: <7l93ff$qp$1@nnrp1.deja.com>
Hi,
I am novice to perl.
I wrote small library called ReadEnv.pl, it's fairly simple one and has
a subroutine called:
"_readEnv"
I use another perl script (SyncDispCodes) which calls this library using
"require ReadEnv.pl"
and then I call the subroutine _readEnv.
When I compile, I get following message:
ReadEnv.pl did not return a true value at SyncDispCodes line 8.
Can somebody help me.
Thanks.
-dilip
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 29 Jun 1999 00:32:52 GMT
From: roberthp@my-deja.com
Subject: Re: HELP: Thank you!
Message-Id: <7l947k$123$1@nnrp1.deja.com>
Thanks to everyone who posted: I got the thing working by explicitly
naming directories and by doing a chdir to force the CWD issue.
Thanks again,
Robert
In article <1dtvpml.1r7tjcd9l3jk8N@p15.tc1.metro.ma.tiac.com>,
rjk@linguist.dartmouth.edu (Ronald J Kimball) wrote:
> <roberthp@my-deja.com> wrote:
>
> > Can anyone tell me what I'm doing wrong???
>
> > opendir(Desktop,"C:/WINNT/Profiles/All Users/Desktop") ||
> > die "Opendir: $!";
> > while ($name = readdir(Desktop)) {
> > print "$name\n";
> > }
> > unlink("Acrobat Reader 4.0.lnk") || (<-Dies here without unlink)
> > die "Unlink: $!";
>
> You're trying to unlink the file in the current working directory, not
> in C:/WINNT/Profiles/All Users/Desktop. You need to chdir to that
> directory, or specify the full path when you unlink the file.
>
> --
> _ / ' _ / - aka -
> ( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
> /
http://www.tiac.net/users/chipmunk/
> "It's funny 'cause it's true ... and vice versa."
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Mon, 28 Jun 1999 21:05:26 GMT
From: richj@home.com (Joan Richards)
Subject: Humbled with command completion
Message-Id: <37777256.242664192@24.0.3.71>
BTW, thanks to all those who responded to my hash of list question, i
was able to figure it out.
I'm writing a script that CLI that is using the ReadLing style type
tricks. So, my prompt statement has been written in this manner,
$_ = $term->readline($prompt);
All is well here (Personally I want to thanks whoever wrote the
ReadLine module, this thing is great!). Okay, so now I'm trying to
use the Term::Complete module by doing something like this:
$_ = Complete($term->readline($prompt), @complete);
Where my @complete array is: @complete = ("edit", "copy");
So, my prompt comes up just fine, however, none of the completeion
stuff works. But, if I quote it like this:
$_ = Complete("$term->readline($prompt)", @complete);
My prompt now looks like:
Term::ReadLine::Perl=ARRAY(0x2f480c)->readline(prompt>)
and now the comand line completion stuff works just fine.
Can someone point out to me where I'm going wrong? I assume (might be
making an ass out ofmyself) it has something to do with quoting. But
I'm not sure.
Thanks,
-J
------------------------------
Date: 28 Jun 1999 23:04:47 GMT
From: Buxtehude Hagen <revjack@radix.net>
Subject: Re: Linux better than perl?
Message-Id: <7l8v2f$oqg$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight
Scratchie explains it all:
:Joseph Hertzlinger <jhertzli@ix.netcom.com> wrote:
::>In comp.lang.perl.misc, joey@hecnyyvr.com (J.Y.) writes:
::>:Linux better than perl?
::>
::>America better than roads!
:: Overheard remark: "Isn't HTML being replaced by Netscape?"
:"They have the Internet on computers now?"
: --Homer Simpson
"Do I need a computer to run this?"
--overheard at an Atari software convention table
------------------------------
Date: 28 Jun 1999 21:54:26 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: NEWBIE TRYING TO CODE
Message-Id: <7l8qui$1b0$1@gellyfish.btinternet.com>
On Mon, 28 Jun 1999 02:16:54 GMT Cameron Graham wrote:
> ok guys ive been doing perl for maybe 3 weeks, i think i have (some of)
> it sussed. i got a script that im writing that takes INPUTS from my
> Applications page and writes the details in an appending txt file...now
> i dont think this is extremely hard to do but i am having troubles....
> heres the script:-
>
> #!perl
> ### START OF SCRIPT ###
I think you have that ole too many errors error there ...
Global symbol "@input" requires explicit package name at hug.pl line 6.
Not enough arguments for read at hug.pl line 6, near "@input)"
Global symbol "@pairs" requires explicit package name at hug.pl line 7.
Variable "$input" is not imported at hug.pl line 7.
Global symbol "$input" requires explicit package name at hug.pl line 7.
Variable "%input" is not imported at hug.pl line 13.
Global symbol "%input" requires explicit package name at hug.pl line 13.
Variable "%input" is not imported at hug.pl line 17.
Global symbol "%input" requires explicit package name at hug.pl line 17.
Variable "%input" is not imported at hug.pl line 21.
Global symbol "%input" requires explicit package name at hug.pl line 21.
Variable "%input" is not imported at hug.pl line 24.
Global symbol "%input" requires explicit package name at hug.pl line 24.
Variable "%input" is not imported at hug.pl line 26.
Global symbol "%input" requires explicit package name at hug.pl line 26.
Variable "%input" is not imported at hug.pl line 30.
Global symbol "%input" requires explicit package name at hug.pl line 30.
Variable "%input" is not imported at hug.pl line 34.
Global symbol "%input" requires explicit package name at hug.pl line 34.
Variable "%input" is not imported at hug.pl line 36.
Global symbol "%input" requires explicit package name at hug.pl line 36.
Variable "%input" is not imported at hug.pl line 38.
Global symbol "%input" requires explicit package name at hug.pl line 38.
Global symbol "$name" requires explicit package name at hug.pl line 51.
Global symbol "$qname" requires explicit package name at hug.pl line 52.
Global symbol "$age" requires explicit package name at hug.pl line 53.
Global symbol "$pclans" requires explicit package name at hug.pl line 54.
Global symbol "$whyletu" requires explicit package name at hug.pl line 56.
Global symbol "$error_string" requires explicit package name at hug.pl line 72.
BEGIN not safe after errors--compilation aborted at hug.pl line 86.
I would start out by fixing those - and making a script that will
compile before going any further.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Mon, 28 Jun 1999 14:50:47 -0700
From: "Rich G." <rgaushell@hotmail.com>
Subject: Re: NEWBIE TRYING TO CODE
Message-Id: <3777EE37.42DE82D2@hotmail.com>
[ cc: sent to cited author ]
scott_mark@my-deja.com wrote:
> > I'd suggest removing the script, learn Perl, and start over.
> >
> > Abigail
>
> Your nice some poeple learn by jumping into coding. He asked for help
> not someone to tell him he should be coding. If all you wanted to do is
> cut him up. Why bother replying?
>
Actually, I think Abigail did this person a service. They made so many
fundamental errors in that code, that it needed to be thrown out and the
person pick up a copy of Learning Perl. What's the point of learning to
code, if all you're doing is learning bad habits? If it's not Abigail now,
it'll be that person's employer/client/team member sometime in the future,
and I hope to God that it's not me...
Rich G.
------------------------------
Date: Tue, 29 Jun 1999 12:25:47 +1200
From: "Cameron Graham" <cameron_graham@clear.net.nz>
Subject: Re: NEWBIE TRYING TO CODE
Message-Id: <bmUd3.1300$Dl.38938@news.clear.net.nz>
>Your nice some poeple learn by jumping into coding. He asked for help
>not someone to tell him he should be coding. If all you wanted to do is
>cut him up. Why bother replying?
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
thanx bro, i mean im trying my best here to learn but ppl like that dont
help....
------------------------------
Date: Mon, 28 Jun 1999 01:36:14 +0100
From: "Torcuato" <torcu99@teleline.es>
Subject: RE: offline testing of Perl/CGI's
Message-Id: <7l90ng$69s@telerad.teleline.es>
Laar <laar@ix.netcom.com> escribis en el mensaje de noticias
3775b811.86772142@nntp.ix.netcom.com...
> Hello all,
>
> I read everything twice looking for an answer to this -- anyone who
> can point me in the direction of the answer will be blessed with my
> eternal gratitude... and stuff...
>
> I'm writing a bunch of CGI scripts (in Perl) for handling a fairly
> complex set of databases. The scripts will be running on my ISP's
> server, and most of the hours of the day I can't be online to write,
> upload, test and debug the scripts on their system. My main problem is
> getting the code right (rookie Perl scripter that I am), and my life
> would become meaningful and filled with pleasure if I could just run
> the scripts on my own machine (W95 laptop, Perl 5.005, Netscape 4) via
> a web browser, interacting with the scripts the same way I would
> online.
>
> --> Problem: I've tried everything, but I can't seem to get the HTML
> doc to call the script properly. First, regardless of whether I
> specify the GET or POST method in the HTML form, the form seems to try
> to pass the data to the script with POST, and it invariably fails.
> Both the HTML pages and the scripts I'm trying to test are in c:\perl\
> and I've tried every possible combination of fixes (that I can think
> of) from both the HTML and script sides, and at best, the browser
> tries to download the script (as if downloading a file from on line)
> instead of execute it.
>
> Any ideas? Somebody? Please?
>
> --
> Laar
> www.netcom.com/~laar/index.html
I do it this way:
1) open your Perl editor (I use edit.com)
2) create a new file (program_test.pl)
3) define variables used in your program e.j:
for a text input:
$text="hello, this is a test";
4) when you have defined ALL variables needed to run yor program ,execute
it.
c:\perl\perl program_test.pl
It works o.k.
5) if your program generates HTML code:
c:\perl\perl perl program_test.pl >page.html
------------------------------
Date: 28 Jun 1999 18:07:33 -0400
From: jnielsen@chemistry.mps.ohio-state.edu (John Nielsen)
Subject: open windows alternatives (ADSI=net::ldap,ADO=DBI,etc)
Message-Id: <7l8rn5$rj8@chemistry.ohio-state.edu>
In the case where one is using NT, what are viable alternatives to Microsoft's
host of acronyms? What open (hopefully cross-platform) tools does the perl
programmer have? I can think of some:
ADSI -- Net::LDAP
ADO -- DBI
WSH -- perl win32 extensions
ASP/perlscript -- perlIS,CGI.pm
frontpage -- text::template (for web site management)
COM -- perl extensions
win32 locking -- flock
MTS -- fork (to be implemented for high performance process creation)
transactions -- ??? eval w/DBI
MSMQ -- ??????
In other words, if I have to, can I make similar applications using
standard tools?
For example, w/out using MSMQ, how does one handle async communication?
thanks for any input,
john
------------------------------
Date: Mon, 28 Jun 1999 21:45:55 GMT
From: alastair@calliope.demon.co.uk (Alastair)
Subject: Re: perl CGI Redirection
Message-Id: <slrn7nfute.69.alastair@calliope.demon.co.uk>
Ben Short <bshort@n0spam.shortboy.dhs.org> wrote:
>Hi,
>
>I was wondering if anybody has out there a *free* URL redirection script
>that also does "seamless redirection" (that is, user sees foo.org, but
>files are at someotherplace.com/~someuser/somedir/file.htm)
Wrong news group. This is not a perl issue - you'd be better asking in one of
the 'comp.infosystems.www.*' groups.
Good luck.
--
Alastair
work : alastair@psoft.co.uk
home : alastair@calliope.demon.co.uk
------------------------------
Date: Mon, 28 Jun 1999 21:57:49 +0100
From: Simon Griffiths <s.griffiths@virgin.net>
Subject: Problem Installing Tk 8.000.14 - make => line too long
Message-Id: <3777E1CD.9C0E7D03@virgin.net>
Hi to all you kind people out there !
I have perl 5.005_03 happily running loadsa modules on Sequent Dynix/ptx
4.4.2 - including DBD-Oracle, DBI and PerlTk 4.
However, I'm trying to upgrade to Perl/Tk 8.000.14 and getting problems.
"perl Makefile.PL" seems to run OK, but "make" always fails with a make
error :
make : line too long after substituting variables
Even a make -n fails with the same error, so its difficult even working
out where its failing, but it looks as if its in the "cd pTk ; make "
bit.
I also get the same problem on 8.000.013.
If anyone could help I'd be most grateful !
Simon.
------------------------------
Date: Mon, 28 Jun 1999 01:23:32 +0100
From: "Torcuato" <torcu99@teleline.es>
Subject: RE: Problem with CGI in IE but not Netscape
Message-Id: <7l8vvh$3p7@telerad.teleline.es>
Matthew Norris <mnorris@nospam.compuvisions.com> escribis en el mensaje de
noticias 3777CD33.BA4BEA51@nospam.compuvisions.com...
> I have written a script to add, remove, and delete information from
> a tab-delimited text file that is running on a Unix server. Each line
> of the file contains a number (time the record was created) and that is
> how the records are sorted. The following lines are where the problem
> arises, entryNum is the number for one of the records in the file. The
> correct HTML will be outputted in Netscape, but nothing was outputted in
> IE. I then but in the else clause. The else clause is outputted in
> IE. Why does this occur? I thought Perl ran only on the server side,
> so why would the output be different in IE than in Netscape? If anyone
> has any ideas, please inform me, I am quite puzzled. Also, if you
> should need to see anymore of my code, I will be glad to send it to you.
>
> while (<INFO>)
> {
> @line=(split(/\t/,$_));
> print "@line[8] $array{'entryNum'}"; # Test if numbers
> correct (they are)
> if (/$array{'entryNum'}/) # Had different form of test
> origionally, same problem.
> {
> # Here is the HTML that displays in Netscape but not IE
> }
> else
> {
> # This HTML is outputted instead of the above.
> }
> }
>
> Thanks,
> Matthew Norris
>
change @line[8] with $line[8]
------------------------------
Date: Mon, 28 Jun 1999 17:34:20 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Problem with CGI in IE but not Netscape
Message-Id: <3778148C.64086DCA@mail.cor.epa.gov>
Matthew Norris wrote:
>
> If the FAQ post was meant for me, I had already checked the FAQ's but they
Are you referring to the autobot post which *all* new posters to
this ng receive? If so, keep it in a safe place. It's full of
good advice.
> did not help (at least as far as I saw) I get output for both, only
> Netscape displays the if statement and IE diplays the accompaning else
> statement. It is not in the actual HTML as far as I can tell, it does
> display the HTML correctly, it seems to be in the if-else statement which is
> what has me confused.
Me too. But surely you see that this is not a Perl problem, but
a browser problem. Possibly a CGI or HTML problem, but it
smells like browsers. Nyetscape and Internet Exploder do
different things sometimes. You may need to ask this in a
cgi or browser-specific newsgroup.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 28 Jun 1999 19:29:30 -0400
From: Jason Reed <jcreed@cyclone.jprc.com>
Subject: Re: random numbers ?
Message-Id: <a1iu8752g5.fsf@cyclone.jprc.com>
Christoph Wernli <cw@dwc.ch> writes:
> You should set the an appropriate seed. Check out perldoc -f srand
>From perldoc -f srand:
In fact, it's usually not necessary to call C<srand()> at all, because if
it is not called explicitly, it is called implicitly at the first use of
the C<rand()> operator.
---Jason
------------------------------
Date: Mon, 28 Jun 1999 17:29:30 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: random numbers ?
Message-Id: <3778136A.63C6A3F0@mail.cor.epa.gov>
Jason Reed wrote:
> Christoph Wernli <cw@dwc.ch> writes:
> > You should set the an appropriate seed. Check out perldoc -f srand
> From perldoc -f srand:
>
> In fact, it's usually not necessary to call C<srand()> at all, because if
> it is not called explicitly, it is called implicitly at the first use of
> the C<rand()> operator.
Yes.. but only if your Perl is new enough. Before 5.004, you
needed to handle the seed()ing yourself, which led to all the
fun hacks around for getting a so-called 'random' start value
for srand(). And judging by the problem reported by the
original poster, I think that a pre-5.004 Perl is likely
to be a contributing factor.
But YMMV. I use Perl in some places where you *want* to be
able to reproduce the sequence of pseudo-random numbers,
so I have to specify a seed for srand() myself.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Mon, 28 Jun 1999 17:52:39 -0700
From: "Tim & Barbara Aldrich" <aldricht@onslowonline.net>
Subject: Win32::API
Message-Id: <930608583.212.7@news.remarQ.com>
I have noticed that the Eventlog has a FORMAT_MESSAGE_FROM_STRING. is there
any way to call this from Win32::API ??
------------------------------
Date: Mon, 28 Jun 1999 17:38:49 -0700
From: "Tim & Barbara Aldrich" <aldricht@onslowonline.net>
Subject: Win32::EventLog Description parsing
Message-Id: <930605921.344.4@news.remarQ.com>
by what character are the strings delimited ??
for example:
@strings = split "?",$event->{'strings'};
^
what do I put here to parse the strings
have tried \t but it doesn't work on all events
yes, I know not all events will have strings.
TIA
------------------------------
Date: 28 Jun 1999 13:10:47 -0700
From: Ken Malone <malone@eagle.larscom.com>
Subject: XML::Parser Objects Style problem
Message-Id: <wvwogk6w.fsf@eagle.larscom.com>
Using the XML:Parser "Ojects" style, I'm unable to access the returned hashed
parse tree. Using the "Tree" style:
my $str = "<address><street>Elm</street></address>";
my $pt = new XML::Parser(Style =>'Tree');
my $tree = $pt->parse($str);
print $tree->[0],"\n";
the printed value is "address" as expected. However using the "Objects" style:
my $po = new XML::Parser(Style =>'Objects',Pkg =>'myObj');
my $obj = $po->parse($str);
print keys %$obj,"\n";
print $obj->[0],"\n";
the printed values are "Kids" and "myObj::address=HASH(0xc7a14)" respectively.
Everything else I try to print returns errors. I've read the docs and still
can't figure out how to access the hashed XML elements. Please help.
Thanks,
Ken Malone
maloneSHIFT-2larscom.com
------------------------------
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 6159
**************************************