[10342] in Perl-Users-Digest
Perl-Users Digest, Issue: 3935 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 9 09:07:13 1998
Date: Fri, 9 Oct 98 06:00:19 -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, 9 Oct 1998 Volume: 8 Number: 3935
Today's topics:
Re: [OT] London.pm (was "Many Jars" Mystery) dave@mag-sol.com
Re: [OT] London.pm (was "Many Jars" Mystery) dave@mag-sol.com
Re: anyone got a rtf->html converter in perl? <l.brocard@elsevier.nl>
Re: anyone got a rtf->html converter in perl? scott@softbase.com
Re: Are there any "perl.newbie" group or forum? <ckc@dmi.dk>
Re: Can I FORMAT variables to be a specific length? <perlguy@inlink.com>
Re: CGI perl book dave@mag-sol.com
Convert C struct to Perl -easy one? <seanr@rmci.net>
Re: Curious perl -pe Question? <eike.grote@theo.phy.uni-bayreuth.de>
Re: Database Search Output >Help!! <perlguy@inlink.com>
Re: Difficulty with HTML & Perl & CGI droby@copyright.com
Does Win32::EventLog::Backup work? <metalshop@yahoo.com>
how to CLEARLY indicate a mailed copy of a Usenet post <Russell_Schulz@locutus.ofB.ORG>
IO:Socket problem lesparke@alice.topend.com.au
Perl Gurus..... <glahea@wwdsi.com>
PERL in Business andy.williams@clara.net
PERL in Business andy.williams@clara.net
Re: Please help with time... <bfb@att.net>
Problems with dyn load of SDBM_File <horst.k@netway.at>
Re: run a script Perl with a form <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: run a script Perl with a form <gjensen@eia.com.na>
Re: strange problem with shift()... (Lack Mr G M)
Re: When did you last use AWK <Russell_Schulz@locutus.ofB.ORG>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 09 Oct 1998 10:40:40 GMT
From: dave@mag-sol.com
Subject: Re: [OT] London.pm (was "Many Jars" Mystery)
Message-Id: <6vkp78$q2o$1@nnrp1.dejanews.com>
In article <361D902A.BC26925@bbnplanet.com>,
Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
> Jonathan Stowe wrote:
>
> > >> The Cittie of Yorke on High Holborn. Sam Smiths Old Brewery Bitter at
#1.50 a
> > >> pint.
>
> Ah, High Holborn. Lovely place. I used to live in Chelsea. Miss the beer
> and the civilisation.
Chelsea! Blimey, that's a bit posh.
> > >> London.pm meetings are on the first Thursday of the month and have so far
all
> > >> been held at the same pub. All visiting Perl Mongers will be made very
welcome
> > >> (ask Chris Masto).
>
> I still have my passport and may just get a jag to come and visit. :)
You would be made very welcome (especially if you bring us some of brian's
T-Shirts!)
> > > How does one recognise london.pm ? By the badges or by the
> > > conversation topics ?
>
> If you cannot listen you must feel. Pay attention. If you are listening
> you can always tell those who are of you.
Or alternatively, you just look for a bunch of people in scruffy T-Shirts.
Dave...
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 09 Oct 1998 10:36:50 GMT
From: dave@mag-sol.com
Subject: Re: [OT] London.pm (was "Many Jars" Mystery)
Message-Id: <6vkp03$q13$1@nnrp1.dejanews.com>
In article <361CD8A9.55CBB9D6@despam.idea.co.uk>,
Kiril <work@despam.idea.co.uk> wrote:
> dave@mag-sol.com wrote:
> > The Cittie of Yorke on High Holborn. Sam Smiths Old Brewery Bitter at #1.50
a
> > pint.
> >
> > London.pm meetings are on the first Thursday of the month and have so far
all
> > been held at the same pub. All visiting Perl Mongers will be made very
welcome
> > (ask Chris Masto).
> >
> I knew something good will come out of reading this newsgroup :-))))))
> I work across from it..... Every first Thursday did you say ?
> How does one recognise london.pm ? By the badges or by the
> conversation topics ?
A bunch of techies in a City pub are very easy to spot. No-one's ever had any
problems before. There are also a few photos on the web site - try the links
from <http://london.pm.org/London.pm/WhatDone.html>. Last meeting, someone had
downloaded a photo to a Palm Pilot and was going round the pub trying to
recognise us!
Dave...
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 09 Oct 1998 11:57:32 +0000
From: Leon Brocard <l.brocard@elsevier.nl>
Subject: Re: anyone got a rtf->html converter in perl?
Message-Id: <361DFA2C.BD94E59A@elsevier.nl>
Chris Denman wrote:
> anyone got a rtf->html converter in perl?
>
> If not I'll code one myselft (not looking forward to it, really!)
I did delve into this about a year ago, and but didn't get further
than fonts, colours, bold, italic, and bulletted lists ;-).
RTF is quite parsable, although making it accept RTF from multiple
sources could be, um, interesting.
Start with the spec, read and reread it until you think you've
understood it, and then read it again.
I'd be glad to help, of course...
Leon
--
Leon Brocard...............................................Perl Hacker
l.brocard@elsevier.nl...........................http://www.astray.com/
... Slug Sautee: a hors of a different d'oeuvre.
------------------------------
Date: 9 Oct 1998 12:04:09 GMT
From: scott@softbase.com
Subject: Re: anyone got a rtf->html converter in perl?
Message-Id: <361dfbb9.0@news.new-era.net>
Elaine -HappyFunBall- Ashton (eashton@bbnplanet.com) wrote:
> John Porter wrote:
> > "Abandon all hope," as they say.
> > RTF is a hellaciously nasty format.
> It would be an interesting challenge, would it not? I never like to
> think that MS is the only option and I never like being told I have no
> choice.
RTF is not that bad, it's just the standard for it is "whatever the
current version of MS Word generates" -- MS breaks their own WinHelp
compiler with every release of Word. Even MS is abandoning rtf/WinHelp
for HTML now. I wouldn't waste my time with it.
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: Fri, 9 Oct 1998 11:10:04 +0100
From: Casper Kvan Clausen <ckc@dmi.dk>
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <Pine.GSO.3.92.981009110106.12706p-100000@edb>
On Tue, 6 Oct 1998, madame philosophe wrote:
> If the people at this group are tired of hearing the same questions.. why
> doesn't someone start a newbie perl newsgroup?
Because that isn't fair. The question should be this:
"If people ask questions that are already in the FAQ, and aren't happy
with just being pointed to the answer contained therein, why don't they
start a newbie perl newsgroup?"
> Or why don't you
> "professionals" migrate to another more stylin' hangout? As the web grows
> there will be more newbies. GET USED TO IT. And don't shoot me for saying so.
There will be more newbies, but that does NOT mean that everybody should
just lean back and go, "well, there'll be more newbies anyway, so we might
as well give up". The very fact that newbies are growing in number makes
it more important than ever that we try to help them in their education. I
think that what you're not understanding is this: Pointing someone to the
FAQ or the docs is _the best possible help_. What RTF(M|FAQ) answers are
doing is helping the newbie not only with his immediate problem, but with
finding solutions to future problems.
> I would love to write a decent Perl book or publish a Perl Faq. When I have a
> free moment I may do it.
May I ask what's wrong with the current FAQ? Also, what kind of book is it
you feel is missing?
> However, what I'm more interested in is solutions than combat. If this is a
> FAQ then let it be one. If it is some sort of clique, get over yourselves!
Well, then I don't understand why you're posting this:
PerlFAQ.pod:=head2 How do I shuffle an array randomly?
It is an FAQ, and was answered as such. No clique involved.
Kvan.
-------Casper Kvan Clausen------ | 'Screw you guys, I'm going home!
----------<ckc@dmi.dk>---------- | Talking poo is where I draw the
Lokal 544 | line!'
I do not speak for DMI, just me. | - Eric Cartman.
------------------------------
Date: Fri, 9 Oct 1998 11:01:50 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Can I FORMAT variables to be a specific length?
Message-Id: <361DED1E.2CC223A9@inlink.com>
Guy Doucet wrote:
>
> I am receiving data from users. I need to format that data to a certain
> length. Is there a quick function. The only thing I know is this:
>
> do {$i=$i . " ";}until length($i) = max ;
>
> Thanks,
> Guy Doucet
I am thinking that the substr function would be a more efficient hack.
Something along the lines of:
$input = "Brent Michalski";
$length=7; # Just a number I picked.
$value = substr($input,0,$length);
Result: $value is equal to "Brent M"
hth
brent
--
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: Fri, 09 Oct 1998 08:17:22 GMT
From: dave@mag-sol.com
Subject: Re: CGI perl book
Message-Id: <6vkgqh$fs1$1@nnrp1.dejanews.com>
In article <361D3D21.AF03C117@whiterabbit.co.uk>,
Matt Pryor <matt@whiterabbit.co.uk> wrote:
> When I was learning, I used CGI Programing on the world wide web by
> Shishir Gundavaram (published by O'Reilly Asscts - ISBN 1-56592-168-2).
> Great resource for learning and for reference.
>
> nguyen.van@imvi.bls.com wrote:
> >
> > Hi guys,
> >
> > I want to know which book is the excellent one for Perl CGI. I want to buy
one
> > so that I can write CGI scripts.
> >
> > Thanks
> > Van
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Shisir's book is looking a little dated now (no mention of CGI.pm for
example). A new edition (renamed to 'CGI Programming with Perl') is listed on
the O'Reilly web site as being published in January.
In the meantime, you might also look at Licoln Stein's 'Official Guide to
Programing with CGI.pm' pbulished by Wiley (I think!)
hth,
Dave...
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 8 Oct 1998 17:16:40 -0600
From: "Sean Rietze" <seanr@rmci.net>
Subject: Convert C struct to Perl -easy one?
Message-Id: <361d485c.0@news.rmci.net>
Read every book and post about pack and unpack, but I am having trouble
converting the
following struct. I guess what is throwing me is the "struct sockaddr_in
rAddr" line.
I have created the following (and a lot of other combinations) with no luck.
package AUTHPACKET;
$sockaddrstruct = "n c14";
$structure = "L L l " . $sockaddrstruct . "A* A" . $sockaddrstruct . " A64
n A32 A256 A64 l l L l A128 l l A256 A256"; 1;
When I include AUTHPACKET in my code I do get some of the data back, but my
assignments
must be wrong, because some of the data is chopped.
Any help is greatly appreciated,
Sean Rietze
************************************START
typedef struct FTPAuthState {
long mType;
long state;
long duplicate;
/* Init message. */
struct sockaddr_in rAddr; /* of remote client. */
char hostName[64]; /* of remote client. */
char ipstr[32]; /* of remote client. */
struct sockaddr_in lAddr; /* of FTP server. */
char cfname[64]; /* of FTP server. */
time_t connectTime;
/* Init reply message. */
/* Username message. */
char username[32];
/* Username reply message. */
char passPrompt[256];
/* Password message. */
char passwd[64];
/* Password reply message. */
long uid;
long gids[1 + kAuthdMaxSupplementaryGroups]; /* pri + supp */
unsigned long ngids;
long restrictedUser;
char homedir[128];
long denied;
long allowed;
char ncftpdPrivate[256];
char authdPrivate[256];
} FTPAuthState, *FTPAuthStatePtr;
#define kFTPAuthStateMType 1
#define kFTPAuthStateInitMessage 1
#define kFTPAuthStateInitReply 2
#define kFTPAuthStateUserMessage 3
#define kFTPAuthStateUserReply 4
#define kFTPAuthStatePassMessage 5
#define kFTPAuthStatePassReply 6
************************************END
------------------------------
Date: Fri, 09 Oct 1998 10:47:02 +0200
From: Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>
Subject: Re: Curious perl -pe Question?
Message-Id: <361DCD86.83F94CB8@theo.phy.uni-bayreuth.de>
liteindie@my-dejanews.com wrote:
>
> Hi y'all,
>
> I am pondering over the mechanics of the -p and -n switches. After executing
> the following:
>
> perl -pe '$a=<STDIN>;print (a);'
>
> I type in:
>
> hello
> there
>
> and it produces:
> hello
> there
> there
> Control D to end it
>
> Ain't the -p and -n switch suppose to put a enclose the statements in a loop?
Those switches assume a loop, but maybe not the type of loop you
expect here...
I think in you wanted your one-line to be something like
perl -e 'while(1){$a=<STDIN>;print($a)}'
But '-p' uses a while(<>){...} loop which is different - it reads from
a file or STDIN. This means that the first line you enter ("hello") is
read by the '<>' in the while-loop and the second line ("there") by
'<STDIN>' which in turn is assigned to $a and print-ed. That's why
only every second line you enter is being printed by your code.
Bye, Eike
--
=======================================================================
>>--->> Eike Grote <eike.grote@theo.phy.uni-bayreuth.de> <<---<<
-----------------------------------------------------------------------
Home Page, Address, PGP,...: http://www.phy.uni-bayreuth.de/~btpa25/
-----------------------------------------------------------------------
PGP fingerprint: 1F F4 AB CF 1B 5F 4B 1D 75 A1 F9 C5 7B 3F 37 06
=======================================================================
------------------------------
Date: Fri, 9 Oct 1998 10:56:31 GMT
From: Brent Michalski <perlguy@inlink.com>
Subject: Re: Database Search Output >Help!!
Message-Id: <361DEBDF.50A7FDB0@inlink.com>
AMIP wrote:
>
> How can include my four variables (or fields) inside the <pre></pre> tags?
Have you tried anything like:
print "<PRE>";
foreach (@whatever){
print "$field1 -- $field2 -- $field3 -- $field4\n";
}
print "</PRE>";
Granted, the format will look like shit but I don't really know what you
are trying to achieve, but it really shouldn't be hard to get your
printout how you want it. If you can print it out without the "PRE"
tags, putting them in is really a trivial task...
hth
Brent
--
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ Brent Michalski $
$ -- Perl Evangelist -- $
$ E-Mail: perlguy@technologist.com $
$ Resume: http://www.inlink.com/~perlguy $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
------------------------------
Date: Fri, 09 Oct 1998 12:07:54 GMT
From: droby@copyright.com
Subject: Re: Difficulty with HTML & Perl & CGI
Message-Id: <6vkuaq$ue$1@nnrp1.dejanews.com>
In article <361D3EBF.49E7734B@mkt2mkt.com>,
madame philosophe <mp@mkt2mkt.com> wrote:
> Hi John,
>
> it could have to do with your capitalization for start_html attributes.
> you might try:
> this instead:
>
> #!/usr/bin/perl
>
> use CGI;
> use CGI::Carp qw(fatalsToBrowser);
> $query = new CGI;
>
> print $query->header(),
>
> $query->start_html(-title=>'No Title', -bgcolor=>'white'),
>
> $query->h4({-align=>'center'}, "Testing 4..."),
>
> $query->end_html;
>
> NOTE: I think if you are creating a new CGI object you want to write:
>
> use CGI;
>
> rather than
>
> use CGI qw( :standard);
>
> This is because the standard group of methods in the module is only for
> html, cgi, and forms if my memory serves me right. What does that mean? I
> think it means you can't use the method new(), as in:
>
> $query = new CGI;
>
> also you can print out with commas after each html shortcut which means
> this:
>
> #!/usr/bin/perl
>
> use CGI;
> use CGI::Carp qw(fatalsToBrowser);
> $query = new CGI;
>
> print $query->header(), $query->start_html(-title=>'No Title',
> -bgcolor=>'white'), $query->h4({-align=>'center'}, "Testing 4..."),
> $query->end_html;
>
> is the same as the first entry. Make sure you check your commas appear
> after your parentheses WHEN YOU ARE USING PRINT, and also that they appear
> after the curly brackets:
>
Really before posting a bunch of 'corrections' to someone's code, you should
check whether the code as posted actually works.
His use statement was fine.
Collapsing four print statements to one is a style improvement.
His code was ok. It in fact worked. It wasn't a perl problem. It was a
server problem or an environment problem.
--
Don Roby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 09 Oct 1998 04:33:39 -0400
From: Metal Shop <metalshop@yahoo.com>
Subject: Does Win32::EventLog::Backup work?
Message-Id: <361DCA61.BC81D937@yahoo.com>
I am using ActiveState's Perl-Win32 (v. 3.15) to manage event logs
across servers in a single domain, and I was hoping to use the
Win32::EventLog::Open
...function -- does anyone know if this function really works on remote
servers?
I've tried all the following variations to no avail:
$ServerName = "homestead";
Win32::EventLog::Open ($EventObj, "System", $ServerName) ||
die "Nope, don`t work";
Win32::EventLog::Open ($EventObj, "System", "homestead")
|| die "No way";
Win32::EventLog::Open ($EventObj, "System", "\\\\homestead")
|| die "Yaargh";
Win32::EventLog::Open ($EventObj, "System", "\\HOMESTEAD") || die
"Forget it...";
The weird thing is, all works perfectly openiing the event log locally:
Win32::EventLog::Open ($EventObj, "System", ''); # default is
open locally -- works great!
...anyone ever been able to get this thing to actually open a log on a
remote server? Yes, the executing user account is domain
administrative. I can access administrative shares like \\homestead\c$
or whatever . . .
. . . what does the Win32 Modules guide mean when it says "use the UNC
name"? Last I checked, that would be "\\homestead", but that obviously
will not work (and of course not "\\\\homestead" either).
Is it some dumb little thing? I hope! Thanks, in advance!
Off the topic, anyone care to recommend a good freeware editor for
Perl? I use PFE (darned execute doesn't work).
------------------------------
Date: Fri, 9 Oct 1998 08:13:30 -0400
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: how to CLEARLY indicate a mailed copy of a Usenet post (was Re: Are there any "perl.newbie" group or forum?)
Message-Id: <19981009.081330.2n1.rnr.w164w_-_@locutus.ofB.ORG>
[ CHANGE THOSE SUBJECT HEADERS PEOPLE! why is NOBODY doing this?! ]
bart.mediamind@ping.be (Bart Lateur) writes:
>> Oh, and Uri, you have "stealth cc's".
>
> I think that in that case, the e-mail has a "Newsgroups" header.
this is likely, but: it also happens in simple replies (with Larry's
own rn, if memory serves) -- so this is useless data.
> "If in doubt, check the headers!"
no. if cc:ing, add the correct headers:
Posted-And-Mailed: yes
configure your news software to generate it, and your mail software
to look for it.
--
Russell_Schulz@locutus.ofB.ORG Shad 86c
------------------------------
Date: Fri, 09 Oct 1998 08:12:51 GMT
From: lesparke@alice.topend.com.au
Subject: IO:Socket problem
Message-Id: <361dc553.1645129@news.topend.com.au>
G'Day
I was wondering if anyone has seen this problem
before.
Problem
********
Installing PERL on a SPARC20, OS version 2.6 (5/98) I tried to
run the harness test suit and failed the io-sock.t and io-udp.t
tests. All other tests passed. The error message was
Bad file number at lib/io-socket.t line 29.
Line 29 is
$listen = IO::Socket::INET->new(Listen =>2,
Proto => 'tcp',
) or die "$!";
I copied the entire perl directory to another SPAR20 but
it also failed the IO::Socket tests. I then copied the entire perl
directory to a SUN Enterprise machine and all tests PASSED.
All OS's are Solarise 2.6. I pinged the localhost on the SPARC20s and
received a good response so I figured that the network conf is in
order.
The SPARC 20s are in an DNS/NIS configuration.
Cheers
Laurence Sparke
------------------------------
Date: Fri, 9 Oct 1998 08:28:41 -0400
From: "Aaron Glahe" <glahea@wwdsi.com>
Subject: Perl Gurus.....
Message-Id: <6vkvml$m16$1@callisto.clark.net>
The creators of SAINT would like to inform everyone that
WWDSI will now maintain a module depository.
Any developer who has created a check for a particular application
vulnerability and would like to see it help the world, please stop
by
http://www.wwdsi.com/saint
to have it added to the list of SAINT checks.
We here at WWDSI will not stop creating, researching, and
developing other checks. We just know that if people from around the world
get involved, then SAINT will be a better application all together.
------------------------------
Date: Fri, 09 Oct 1998 10:23:31 GMT
From: andy.williams@clara.net
Subject: PERL in Business
Message-Id: <6vko71$os0$1@nnrp1.dejanews.com>
I have a bit of a problem, thankfully not code related.
My boss requires justification for using PERL (running on NT with Tk) for a
business database application. It's a fairly large application and he wants to
know of any other big companies that use (or are developing) a similar
application.
Please email me if you're invovled in such a project.
Thanks in advance
Andy Williams
mailto:andy_williams@pa.press.net
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 09 Oct 1998 10:24:05 GMT
From: andy.williams@clara.net
Subject: PERL in Business
Message-Id: <6vko82$os4$1@nnrp1.dejanews.com>
I have a bit of a problem, thankfully not code related.
My boss requires justification for using PERL (running on NT with Tk) for a
business database application. It's a fairly large application and he wants to
know of any other big companies that use (or are developing) a similar
application.
Please email me if you're invovled in such a project.
Thanks in advance
Andy Williams
mailto:andy_williams@pa.press.net
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 9 Oct 1998 12:18:47 GMT
From: Bernie <bfb@att.net>
Subject: Re: Please help with time...
Message-Id: <361DFEDE.F73A7574@att.net>
Thanks. I thought their might be date/time methods
I could use.
Martien Verbruggen wrote:
> In article <361D88B9.D0DD494B@att.net>,
> Bernie <bfb@att.net> writes:
> > I have to add many time values together in
> > a format like 00:01:23
> >
> > What's the easiest way to accomplish this?
>
> This is hours minutes seconds?
>
> One way:
> Convert all three to seconds, add, and
> convert back. Use split to split the three values, multiply the first
> and second by 3600 and 60 respectively, etc.
>
> Another way:
> Start by adding the last ones, use % and ? to figure out how many
> minutes and seconds that is, carry over the minutes to the sum of all
> the fields in the middle, etc.
>
> I'd probably use the first.
>
> Martien
> --
> Martien Verbruggen |
> Webmaster www.tradingpost.com.au | The world is complex; sendmail.cf
> Commercial Dynamics Pty. Ltd. | reflects this.
> NSW, Australia |
>
------------------------------
Date: Fri, 09 Oct 1998 10:57:25 +0200
From: virgil <horst.k@netway.at>
Subject: Problems with dyn load of SDBM_File
Message-Id: <361DCFF5.7A443AD1@netway.at>
Hi there,
I am trying to use the Apache::ASP Module. The whole installation seams
to be ok,
but at runtime I get the following error message (in
/var/log/httpd-error.log):
# log begin
/usr/sbin/httpd: can't resolve symbol 'Perl_markstack_ptr'
/usr/sbin/httpd: can't resolve symbol 'Perl_stack_sp'
/usr/sbin/httpd: can't resolve symbol 'Perl_sv_yes'
/usr/sbin/httpd: can't resolve symbol 'Perl_stack_base'
/usr/sbin/httpd: can't resolve symbol 'Perl_Sv'
/usr/sbin/httpd: can't resolve symbol 'Perl_na'
[Fri Oct 9 09:55:48 1998] [error] Can't load
'/usr/lib/perl5/i586-linux/5.00404/auto/SDBM_File/SDBM_File.so' for
module SDBM_File: Unable to resolve symbol at
/usr/lib/perl5/i586-linux/5.00404/DynaLoader.pm line 166.
at /usr/lib/perl5/site_perl/Apache/ASP.pm line 39
BEGIN failed--compilation aborted at
/usr/lib/perl5/site_perl/Apache/ASP.pm line 39.
[Fri Oct 9 09:55:48 1998] [error] Undefined subroutine
&Apache::ASP::handler called.
#log end
Can somebody give me a hint?
Thanx,
Horst
------------------------------
Date: 09 Oct 1998 10:47:35 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: run a script Perl with a form
Message-Id: <83d882glzs.fsf@vcpc.univie.ac.at>
Re: run a script Perl with a form, isabellec
<isabellec@my-dejanews.com> said:
isabellec> Hello, I want to run a script Perl (which is in
Why the RPN? "perl script"
isabellec> the cgi-bin repertory) from a form. If it works,
isabellec> I will have some results to be written in a
isabellec> hidden file. But I have an Internal error of
isabellec> misconfiguration. Maybe some access rights are
isabellec> not good.
isabellec> Can someone tell me the steps I have to follow to
isabellec> run my program ?
No, because you gave us no information about what the script
does, what it looks like, what the error message is...
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Fri, 09 Oct 1998 12:48:52 +0100
From: Gerard Jensen <gjensen@eia.com.na>
Subject: Re: run a script Perl with a form
Message-Id: <361DF824.7E7CB9EC@eia.com.na>
Tony Curtis wrote:
> isabellec> Can someone tell me the steps I have to follow to
> isabellec> run my program ?
>
> No, because you gave us no information about what the script
> does, what it looks like, what the error message is...
True, that would help. But what it does is rather irrelevant (apart from the fact
that it creates a file) - at the moment it only "does" an error message when called
from the web - and that can mean many things: either Perl could not be found or
access rights are not correct or ownership of the file to write to is not correct
or there is an actual error within the script.
Without the script, I couldn't possible pinpoint the problem for you. But even as a
Perl "newbie" myself I can at least give some indication where to look:
a) Isbaelle, you seem to work on an NT box (judging from the headers of your
message) - is your server a UNIX (e.g. Linux) box? If so, check that when you FTP
your script to that server you transfer it as TEXT file, not as a binary -
Linefeeds/Carriage Returns are differently handled under UNIX: this one gets me all
the time, especially when I've been uploading the graphics of an HTML document just
prior to uploading my script. And although I know that my FTP client should have
been uploading in text, not binary mode... my personal "Murphy"... ;-)
b) Access rights might indeed be a problem. With your FTP program (or via Telnet in
your directory using ls -l) check if your script is world readable and executable:
the last three characters for your rights should read "r-x". I'd suggest to set
them to "rwxr-xr-x" in total - and AFAIK an FTP client won't be able to do that, so
you need to telnet to your box and do it via chmod yourself (chmod 759 <yourscript>
if I remember right - check the results before you leave it like that). Next your
script has to be able to read and write to the neatly "hidden" file of yours (it's
probably not hidden but has the "readable" flags turned off). As the script will
attempt to write to it as the user "nobody", file ownership may be the issue here,
if you're sure the rights are correct. Your FTP client won't do that either, so use
chown via telnet (use "man chown" to learn more about chown - and don't use it with
parameters you don't understand on files you don't know: it can have *very* whacky
effects on your server... :-)
d) Are you sure you use the right path to your perl interpreter? Check the first
line of your script against what "which perl" gives you on your UNIX box: some
ready made scripts expect it to be at a specific position (via that very first
#!... line in your script) and Perl just might not be where they expect it to be.
e) Best test of a script before calling it "live" from the web: telnet into your
box, go to the directory that contains your script and call it via "perl
<yourscript> <parameters>". Most of the problems that stem from an error in your
Perl program yourself simply report as a "server misconfiguration" if you only go
through the web browser.
> hth
> tony
> --
> Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
> Liechtensteinstrasse 22, A-1090 Wien, | <URI:http://www.vcpc.univie.ac.at/>
> "You see? You see? Your stupid minds! | private email:
> Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
Well, we all start stupid, then learn, learn a bit more... and more... and after
some learning we're not all that stupid anymore... :-))
Bye,
Gerard
------------------------------
Date: Fri, 09 Oct 1998 12:03:23 BST
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: strange problem with shift()...
Message-Id: <1998Oct9.120323@ukwit01>
In article <361C174D.AE81115A@mindspring.com>, Peter Smith <psmith01@mindspring.com> writes:
|>
|> I wrote a small script to read-in a fixed-length text file and spit out
|> to STDOUT only unique records - records are newline delimited. Each new
|> line is 'push()'ed into an output array. Problem is, whenever I push a
|> '\n' with the 'list' I'm pushing, my output gets completely whacked -
|> spitting out everything it reads.
Try thinking through the logic of what you write. Try adding a few
useful print statements. Or (>>gasp<<) try using the debugger.
|> My code below. It reads a text file (full of records) from STDIN,
Why force it to read from STDIN??? It will do that by default *and*
will also handle multiple fiels on teh command line, if you give them...
|> checks to see if each already exists in the output @array,
That's what you think. You are wrong.
|> while($line = <STDIN>) {
"while($line = <>)" is better, but still wrong.
"while (defined ($line = <>))" is correct
"while (<>)" is the best.
|> #Chop-off newline for output brevity sake
|> chop($line) if $line =~ /\n$/;
Remember this - you have removed the trailing newline.
|> #Set 'duplicate' marker -> returns true or false
|> $match = &isMatch($line);
So you are matchign the text *without* a newline....
|> push(@Array,"$line\n"); #Produces bad output
...against the text *with* a newline!!!
Make sure you check like with like....
--
----------- Gordon Lack ----------------- gml4410@ggr.co.uk ------------
The contents of this message *may* reflect my personal opinion. They are
*not* intended to reflect those of my employer, or anyone else.
------------------------------
Date: Fri, 9 Oct 1998 08:18:38 -0400
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: When did you last use AWK
Message-Id: <19981009.081838.6z0.rnr.w164w_-_@locutus.ofB.ORG>
jari.aalto@poboxes.com (Jari Aalto+mail.perl) writes:
> I use AWK all the time instead of perl for handling my email with
> procmail, because
>
> -- AWK is smaller binary
> -- AWK startup time is faster
this is basically reason #5 in the awk FAQ (why would I use awk when
there's perl).
so I guess we can add another level to the Programmer Maxim:
never use perl if awk will do
never use awk if C will handle the job
never use C if sed is powerful enough
never use sed if tr has what it takes
never use tr if cat is capable of the task
avoid cat wherever possible
> Message-ID: <ptrzpb759gy.fsf@
> olkikukka.i-have-a-misconfigured-system-so-shoot-me>
I'd rather not, thanks...
> [In spite of that, I'm a heavy Perl programmer]
yeah, I'm a lot heavier than I used to be, too. :-)
--
Russell_Schulz@locutus.ofB.ORG Shad 86c
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3935
**************************************