[13357] in Perl-Users-Digest
Perl-Users Digest, Issue: 767 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Sep 11 22:07:22 1999
Date: Sat, 11 Sep 1999 19:05:10 -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 Sat, 11 Sep 1999 Volume: 9 Number: 767
Today's topics:
Re: /etc/passwd (Abigail)
Re: /etc/passwd <SternSZ@gmx.de>
ANNOUNCE: Perl packrats mailing list <elaine@chaos.wustl.edu>
Re: baffle about flock() please help! <gellyfish@gellyfish.com>
Re: baffle about flock() please help! <collin.starkweather@colorado.edu>
countdown timer on web page <wedeking@msa.attmil.ne.jp>
Re: countdown timer on web page <dove@synopsys.com>
Re: countdown timer on web page <rootbeer@redcat.com>
Re: fork? (Kai Henningsen)
Re: Format an variable <gellyfish@gellyfish.com>
how can I check a list of words to see which ones are c <wedeking@msa.attmil.ne.jp>
Re: how can I check a list of words to see which ones a (Abigail)
Re: how can I check a list of words to see which ones a <rootbeer@redcat.com>
Re: How to make a dynamically updating Tk page? (David Salvador Flores)
Re: I want to exit my script without sending anything b (Abigail)
Re: I want to exit my script without sending anything b (Abigail)
Re: IPC daemonization <gellyfish@gellyfish.com>
Re: MSQL.pm Please Help (Abigail)
perl -w strangeness <jcokos@ccs.net>
Re: perl -w strangeness <jeffp@crusoe.net>
Re: Perl Compilation Roblems on RedHat 6.0 <gellyfish@gellyfish.com>
Re: PERL4 vs PERL5 (David Salvador Flores)
Re: Possibly Simple problem? <asquith@macconnect.com>
Re: Pros/cons of using Perl vs. C to develop web site? <gellyfish@gellyfish.com>
Re: Removing a line from a text file (Kai Henningsen)
Re: s/// problem (Abigail)
Re: UNCRAP project proposal (Abigail)
win32 disk formatting <ez062634@mailbox.ucdavis.edu>
Re: Win32::MAPI problem - reading and sending <gellyfish@gellyfish.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 11 Sep 1999 20:07:13 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: /etc/passwd
Message-Id: <slrn7tlvb3.71l.abigail@alexandra.delanet.com>
Elaine -HFB- Ashton (elaine@chaos.wustl.edu) wrote on MMCCII September
MCMXCIII in <URL:news:37DACDFB.C54FE96A@chaos.wustl.edu>:
$$ Ubu wrote:
$$
$$ > Abigail (whoever you are), you're certainly free to continue insulting
$$ > and berating everyone who stoops to ask a question you find unworthy,
$$ > but really, what are you trying to accomplish? You seem so angry at who
$$ > knows what, and you're taking it out on complete strangers, some of whom
$$ > might actually take it personally (although that's pretty unlikely). I'm
$$ > not telling you you need to shut up (freedom of speech for all, etc.),
$$ > but would it kill you to be a bit less ignorant or - just for the hell
$$ > of it - actually post something helpful? Instead of insulting others
$$ > intelligence, why not dazzle us with your own?
$$
$$ Oh, I'll let Abs have a go at this but, you know, I hate it when guys
I won't bother. Ubu might have a point if (s)he had been around for a
few years in this group, and if Deja.com had a couple of thousand of
his/her postings in this newsgroup archived, but I've never heard of this
Ubu person before. And all (s)he does is whine, not even hinting to the
original question. Whining is easy - everyone can do that.
$$ get whiney when they get picked on instead of taking the point of the
Exactly.
$$ message. Abs is abrasive, but only the countless scores of people who
$$ don't look at the documentation, don't or can't read, can't construct a
$$ simple sentence if they tried, and are generally wankers first class.
$$ >
$$ > Barry Hemphill
$$ > (Hopefully helpful) Systems Administrator
$$
$$ A sensitive new age system administrator?! Holy cow, where have all the
$$ BOFH's gone to!?
Where have all the admins gone,
long time passing?
Where have all the admins gone,
long time ago?
Where have all the admins gone?
Usenet picked them, every one;
Oh, when will you ever learn,
Oh, when will you ever learn?
Where have all the Usenauts gone,
long time passing?
Where have all the Usenauts gone,
long time ago?
Where have all the Usenauts gone?
They've become nice men, every one;
Oh, when will you ever learn,
Oh, when will you ever learn?
Where have all the nice men gone,
long time passing?
Where have all the nice men gone,
long time ago?
Where have all the nice men gone?
They're all in strait-jackets;
Oh, when will we ever learn,
Oh, when will we ever learn?
$$ Abs, I'm scared, hold me!
*Abigail huggelihugs Happy Fun Ball*
Abigail
--
-----------== 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: 12 Sep 1999 02:38:01 +0200
From: Benjamin Schweizer <SternSZ@gmx.de>
Subject: Re: /etc/passwd
Message-Id: <m3puzphsly.fsf@anthrax.local.net>
+-->Elaine -HFB- Ashton <elaine@chaos.wustl.edu>:
| Much you English do speak you?
|
| Considering your .sig, I would assume that you are on the win32
| platform. I would suggest having a look at the win32 FAQ, and, if all
| else fails, just install BackOrifice or wait a day or so for the next MS
| hack on rootshell :)
|
| User management and NT in the same breath...now _there_ is an oxymoron.
I´m sorry if my English is so poor, but I´ll try to improve. Windows
is a pretty nice OS and I enjoy watching it´s Users. You know about
the X-Mailer line in the mail header?-)
regards
-Benjamin
--
100% Sig.
------------------------------
Date: Sat, 11 Sep 1999 19:32:17 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: ANNOUNCE: Perl packrats mailing list
Message-Id: <37DAE5EB.BF5C1D1E@chaos.wustl.edu>
This is to announce the resurrection of the packrats mailing list for
people interested in archiving things of interest to the Perl community.
Simply send a message with 'subscribe packrats <your@email.adress.com>' in
the body, an empty subject, to 'majordomo@history.perl.org'.
e.
---
What is this list about?
Way back in 1993 the packrats list was organised to discuss archiving
Perl-ish bits and generally keeping track of things of interest. This
list, among other things, is noted for helping to establish CPAN in
the form which we now know and love.
The list, sadly, fizzled out in 1995.
Since then, Perl has changed quite much with a community of users that is
growing everyday. However, other than CPAN, there isn't a centralised
group of people who are interested in archiving things that CPAN doesn't
as well as things that may be of interest to the community in years to
come.
This list will, hopefully, be an extension of the work being done at
history.perl.org and stir interest in cataloging, organising and
archiving all the Perl-ish bits that fall through the cracks and into
the aether.
One idea would be to collect and archive the more noteable JAPH's and
the haiku's inspired by Damian Conway's Coy.pm.
So, please join the fun of sifting for gems worth saving for next week,
next month, or 10 years from now.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"Those who forget history are condemned to repeat it." -George Santayana
"...too often it is those who can remember the past who are condemned to
repeat it." -Arthur Schlesinger Jr.
"If they do remember it and repeat it, one hopes it is the more
enjoyable parts like chocolate or espresso." -HFB
------------------------------
Date: 11 Sep 1999 23:59:50 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: baffle about flock() please help!
Message-Id: <7reqdm$178$1@gellyfish.btinternet.com>
On Sat, 11 Sep 1999 13:47:17 -0600 Collin Starkweather wrote:
> The first thing you should do is use Fcntl to make sure you've got your
> constants right (though chances are LOCK_EX is 2 as you suppose) and the
> second thing is test the lock with LOCK_NB:
>
I am genuinely interested as to why you think this is necessary.
After all a blocking flock will do is required here.
/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: Sat, 11 Sep 1999 18:57:15 -0600
From: Collin Starkweather <collin.starkweather@colorado.edu>
To: jns@gellyfish.com
Subject: Re: baffle about flock() please help!
Message-Id: <37DAFA6B.FC490DD7@colorado.edu>
It's entirely unnecessary. I just intended it as a suggestion.
I should have s/should do/might want to do/ and s/test the lock/give the
request the opportunity to fail with error/.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Collin Starkweather (303) 492-4784
University of Colorado collin.starkweather@colorado.edu
Department of Economics http://ucsu.colorado.edu/~olsonco
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jonathan Stowe wrote:
>
> On Sat, 11 Sep 1999 13:47:17 -0600 Collin Starkweather wrote:
> > The first thing you should do is use Fcntl to make sure you've got your
> > constants right (though chances are LOCK_EX is 2 as you suppose) and the
> > second thing is test the lock with LOCK_NB:
> >
>
> I am genuinely interested as to why you think this is necessary.
>
> After all a blocking flock will do is required here.
>
> /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: Sun, 12 Sep 1999 08:45:35 +0900
From: "Dan and/or Shelly" <wedeking@msa.attmil.ne.jp>
Subject: countdown timer on web page
Message-Id: <7rephu$r31$1@news.misawa.attmil.ne.jp>
I want to use perl to create a web page count down timer that will display
how many days I have left here in Misawa, Japan. Then I can set the web
page as my desktop background. Will this work? Is there a way to make it
continuously update and show how many Months, Days, Hours, Minutes, and
seconds I have left in Misawa? My wife and I are leaving Japan on 1
December 2000.
Dan
------------------------------
Date: Sat, 11 Sep 1999 17:40:01 -0700
From: David Amann <dove@synopsys.com>
Subject: Re: countdown timer on web page
Message-Id: <37DAF661.972B1112@synopsys.com>
Hi Dan
Dan and/or Shelly wrote:
> I want to use perl to create a web page count down timer that will display
> how many days I have left here in Misawa, Japan.
I think you want Javascript rather than perl. Check out this web page for an
example of a Javascript millenium countdown clock.
http://www.coolnerds.com/jscript/millennium.htm
Hope this helps,
-=dav
> Dan
------------------------------
Date: Sat, 11 Sep 1999 18:12:10 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: countdown timer on web page
Message-Id: <Pine.GSO.4.10.9909111809200.25903-100000@user2.teleport.com>
On Sun, 12 Sep 1999, Dan and/or Shelly wrote:
> I want to use perl to create a web page count down timer that will
> display how many days I have left here in Misawa, Japan. Then I can
> set the web page as my desktop background. Will this work?
If it can be done with pretty much any programming language, it can be
done with Perl. You should probably search for the docs, FAQs, and
newsgroups about programming for the web and related issues to learn
whether what you're trying to do is possible. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 11 Sep 1999 16:14:00 +0200
From: kaih=7OdVEKrXw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: fork?
Message-Id: <7OdVEKrXw-B@khms.westfalen.de>
dan@tuatha.sidhe.org (Dan Sugalski) wrote on 10.09.99 in <uL7C3.176$wW2.4447@news.rdc1.ct.home.com>:
> Kai Henningsen <kaih=7ObHEaFHw-B@khms.westfalen.de> wrote:
> > dan@tuatha.sidhe.org (Dan Sugalski) wrote on 07.09.99 in
> > <RlbB3.390$9v5.5433@news.rdc1.ct.home.com>:
>
> >> Dan Sugalski <dan@tuatha.sidhe.org> wrote:
> > (1) *understand* about concurrency issues (such as the dining philosopher
> > problem and so on)
>
> Or at least know where the dicey places are and how to avoid them.
That's why I said "understand about issues" and not "understand issues"
:-)
> > (2) be able to find the right abstractions to minimize thread interaction
> > (a useful skill in general, but one that's in sadly short supply in the
> > general programming public)
>
> You could've stopped that sentence after abstraction and the parenthetical
> statement would still apply. :)
Well, I meant it with s/thread //. But I agree it's even true with
s/to[^(]*//. The stuff cut out is one of the things that makes an
abstraction right.
> > Object oriented programming style is actually a pretty good match for
> > threads; you get to hide all the ugly locking inside your object
> > implementation. Getting it right with procedural style is quite a bit
> > harder.
>
> The big win that objects usually bring is encapsulation of data--it's not
> so much that they make locking easier as they tend to collect all the bits
> that need locking in a single place. (Or so it's always seemed to me, but
> YMMV of course)
No, that's pretty much how I meant it. Because it encapsulates data, you
can just make it encapsulate locked data.
> Oh, yes. And one of the most important things to know is when *not* to use
> threads. Like objects, they have this 'cool' factor that makes folks want
> to use them in places they ought not be.
Well, anyplace where they don't offer either a clearer algorithm, or
better performance (according to whatever metric of clear and/or
performance you happen to be using - and in the performance case, you
really want to test that). Ok, there's the places where you have to use
them because you're using someone else's code who decided to use them.
I implemented home-grown pseudo threads once for a server running under
DOS (written in Pascal) because I just couldn't get the various
interactions right any more; the various tasks had become too complex. It
still has some bad quirks, but it's amazing how much more maintainable it
has become. Performance is ambivalent, though - it *can* be improved more
easily, but it still needs both work and thought, and there's quite a bit
of overhead from the scheduler. For the port of that beast to Unix and
Objective C, I'm switching to *real* threads to get rid of this. Oh, and I
design several parts very different than on a server where threads were an
afterthought. (Also, I might imbed Perl somewhere, now that's become much
easier :-))
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 11 Sep 1999 23:53:23 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Format an variable
Message-Id: <7req1j$174$1@gellyfish.btinternet.com>
On Fri, 10 Sep 1999 04:03:46 GMT Kragen Sitaker wrote:
> In article <7r9t98$52c6$1@newssvr03-int.news.prodigy.com>,
> Rich Harris <rich.harris@#prodigy.net> wrote:
>>I guess you use printf %something or another?!!??!!??
>>
>>Help with the syntax please.
>
> The Unix man pages for the printf function should help. man 3 printf,
> or if you're on some SysV monstrosity, man -s 3 printf.
>
Now thats just off-putting to the newbie isnt it ?
The sprintf entry in the perlfunc document has the full description of
the conversion characters implemented by Perl's s?printf.
/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: Sun, 12 Sep 1999 08:39:23 +0900
From: "Dan and/or Shelly" <wedeking@msa.attmil.ne.jp>
Subject: how can I check a list of words to see which ones are contained in another list of words?
Message-Id: <7rep6a$qpp$1@news.misawa.attmil.ne.jp>
How can I check a list of words to see which ones are contained in another
list of words? I have a file with a long list of words, a different word on
each line. I want to find an easy way to go through this list and check
each word to see if it is contained in another file with an even longer list
of words. Can perl do this easily?
Dan
wedeking@msa.attmil.ne.jp
------------------------------
Date: 11 Sep 1999 20:34:53 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: how can I check a list of words to see which ones are contained in another list of words?
Message-Id: <slrn7tm0uk.71l.abigail@alexandra.delanet.com>
Dan and/or Shelly (wedeking@msa.attmil.ne.jp) wrote on MMCCII September
MCMXCIII in <URL:news:7rep6a$qpp$1@news.misawa.attmil.ne.jp>:
^^ How can I check a list of words to see which ones are contained in another
^^ list of words? I have a file with a long list of words, a different word on
^^ each line. I want to find an easy way to go through this list and check
^^ each word to see if it is contained in another file with an even longer list
^^ of words. Can perl do this easily?
Yes. It's in the FAQ. You might gain something by reading it.
Abigail
--
$" = "/"; split $, => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
-----------== 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: Sat, 11 Sep 1999 17:51:29 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: how can I check a list of words to see which ones are contained in another list of words?
Message-Id: <Pine.GSO.4.10.9909111746390.25903-100000@user2.teleport.com>
On Sun, 12 Sep 1999, Dan and/or Shelly wrote:
> Subject: how can I check a list of words to see which ones are contained in
another list of words?
> Can perl do this easily?
So easily that the FAQ tells you how. See section four. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 12 Sep 1999 00:31:21 GMT
From: dsf3g@node8.unix.Virginia.EDU (David Salvador Flores)
Subject: Re: How to make a dynamically updating Tk page?
Message-Id: <7res8p$lfe$1@murdoch.acc.Virginia.EDU>
In article <37D37399.780853E@home.com>,
Douglas Galbraith <douglas@home.com> wrote:
>I would like to use Tk to make a page that updates its contents
>continuously. I believe that I saw an example using a simple clock (time
Are you sure you want to use Tk? Tk is for creating GUI elements. The
way you phrased the question makes me think you want to create a dynamic
web-page. if so you want to use GCI.pm.
Try this URL for samples of dynamic web-pages and source:
http://www.wiley.com/compbooks/stein/source.html
>and date updating continually), but I can't find the code for it. If
>anyone has an example of code that continually updates the contents of a
>page, I'd appreciate a copy (examples are the best teachers).
>
>Thanks for the help,
>DGalbra862@aol.com
-Dave
------------------------------
Date: 11 Sep 1999 20:44:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: I want to exit my script without sending anything back to the users browser
Message-Id: <slrn7tm1g6.71l.abigail@alexandra.delanet.com>
cLive hoLLoway (cLive@direct2u.co.uk) wrote on MMCCI September MCMXCIII
in <URL:news:37D95B5E.4F19DF0D@direct2u.co.uk>:
%%
%% I would also add an onSubmit javascript to your form so that the user
%% gets a pop-up alert() saying 'Thank you for submitting your form. This
%% page will remain. This is meant to happen!' or something like that...
%% Users expect a new page, so they'll keep clicking submit otherwise....
And people who don't do JavaScript will just keep on clicking?
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== 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: 11 Sep 1999 20:42:45 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: I want to exit my script without sending anything back to the users browser
Message-Id: <slrn7tm1dp.71l.abigail@alexandra.delanet.com>
Taylor (taylor@dynamical.org) wrote on MMCCI September MCMXCIII in
<URL:news:37D93292.E375F3ED@dynamical.org>:
?? I'm a graphic designer not a programmer. I know HTML but I've only just
?? begun with PERL. This may sound tike a very basic question to some of
?? you but none of my friends have a clue as to what I'm talking about.
It's spelled Perl, not PERL.
?? I have a script that emails form data to me. I wrote it from a
?? tutorial. It sends the email fine but it insists upon sending a
?? confirmation URL back to the users browser. I do not want this because
?? I am using Flash and my Flash file is nearly 300k which takes a long
?? time to reload. I tried deleting the part of my script that sends the
?? confirmation URL but now I get an error message from the server saying
?? the script failed to execute. I know it's executing because I am
?? receiving the email.
??
?? Is it possible to make my script send the email and die?
Of course. But I doubt that is what you want, as users of your script
will have no idea what's going on. They will just get an error message
from their browser - not a very helpful one because the browser doesn't
know what's going on either.
Have you considered using a document that isn't more than 60 times the
size of the King James version of the bible?
?? Does my script
?? have to send a URL back to the users browser? I just don't want the
?? page to reload.
No it doesn't. But that's not an Perl issue, that's HTTP. Your question
would be the same if you had written in TECO, or troff.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
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}for(;
!$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: 12 Sep 1999 00:12:11 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: IPC daemonization
Message-Id: <7rer4r$17g$1@gellyfish.btinternet.com>
On Fri, 10 Sep 1999 08:42:00 -0700 Bill Moseley wrote:
>
> Ya, that was my question also. The perlipc example uses setsid and you
> mention using setpgrp. Neither I'm clear on or when/why you would use
> them.
You will use them when the parent process is likely to decease before the
child to ensure the child can have a life of its own.
/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: 11 Sep 1999 20:46:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: MSQL.pm Please Help
Message-Id: <slrn7tm1kg.71l.abigail@alexandra.delanet.com>
CNspots (cnspots@mindspring.com) wrote on MMCCI September MCMXCIII in
<URL:news:7rbdkh$v9k$1@nntp9.atl.mindspring.net>:
^^ I used print statements to tell when the program stopped.. The error logs
^^ unfortunately arent giving me SQL error info
Use an database server that uses callbacks to inform you of errors,
and set up the appropriate callback function.
You could even have it send messages to your pager!
Abigail
--
split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_) {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};
-----------== 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: Fri, 10 Sep 1999 01:59:36 -0700
From: "John Cokos" <jcokos@ccs.net>
Subject: perl -w strangeness
Message-Id: <37daff5e_4@goliath.newsfeeds.com>
I'm getting strange errors when running perl -w on a program:
Error:
Use of uninitialized value at test.cgi line 119.
Line 119:
$global{'action'}="$PROG_URL";
First line in program:
use vars qw (%global,%users,$misc,$sth,$rc,@rows);
Why would that line cause an error, when clearly, it was defined.
I've replace "use vars qw" with "my" to try and localize, but the same
error shows.
Thanks, John
-----------== 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: Sat, 11 Sep 1999 22:03:07 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: perl -w strangeness
Message-Id: <Pine.GSO.4.10.9909112202330.14148-100000@crusoe.crusoe.net>
> use vars qw (%global,%users,$misc,$sth,$rc,@rows);
You don't know how to use qw( ... );
qw() means quote on whitespace. meaning, separate vars with whitespace.
meaning, don't use commas.
--
jeff pinyan japhy@pobox.com
perl stuff japhy+perl@pobox.com
CPAN ID: PINYAN http://www.perl.com/CPAN/authors/id/P/PI/PINYAN
------------------------------
Date: 11 Sep 1999 22:32:18 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perl Compilation Roblems on RedHat 6.0
Message-Id: <7rel9i$111$1@gellyfish.btinternet.com>
On Fri, 10 Sep 1999 13:59:54 -0700 Duncan Kinder wrote:
> Yeah, but since this is a virgin RedHat install and since there is no reason
> why Perl should not be able to compile perfectly under these circumstances,
> I have ordered Caldera and Mandrake from Linuxmall. (A big $4.00).
>
>
> A pity, because RedHat 6.0 otherwise seems like a nice distribution. But
> this sort of bug is unacceptable and I have other things to do with my time
So you consider this a Perl bug ?
/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: 12 Sep 1999 00:18:11 GMT
From: dsf3g@node8.unix.Virginia.EDU (David Salvador Flores)
Subject: Re: PERL4 vs PERL5
Message-Id: <7rerg3$kuc$1@murdoch.acc.Virginia.EDU>
In article <37D1459C.A5A1EFE4@earthlink.net>,
Natalie Murphy <nmurphy708@earthlink.net> wrote:
>What's a good reference to understand the differences between PERL4 and
>PERL5? Can they run at the same time on the same machine?
>
To answer your second question: Yes, they can both run on the same
machine. I learned Perl last semester at UVA (on my own) and was
bedevilled early on with crazy errors that didn't make sense to me until i
asked someone on this newsgroup and they suggested that my machine might
be running Perl4. It was. When I cornered one of the school's sysadmins,
she told me that to run my scripts in Perl5 I had to call Perl5. So
instead of typing "Perl test.pl" I had to type "Perl5 test.pl" Kinda
silly. Don't know why UVA did it that way. But it works.
-Dave
------------------------------
Date: Sat, 11 Sep 1999 17:33:40 -0500
From: "Asquith" <asquith@macconnect.com>
Subject: Re: Possibly Simple problem?
Message-Id: <7relc9$gq0@enews1.newsguy.com>
In article <19990911173750.29178.00005231@ng-ff1.aol.com> ,
firstagyg@aol.com (FirstAGYG) wrote:
> Im not exactly sure.
>
> i have a very simple one file database, with fields seperated by tabs. Looks
> much like this:
>
> 1 filename1 45
> 2 filename2 52
> 3 filename3 98
>
> the first field is the record number, 2ndd is filename, 3rd is "hits" to that
> file. (much like a download counter.)
>
> Ive been trying to think of how, but cant...to sort the records in order of
> most hits to least...in other words, sorting the whole record by just that 3rd
> field? Any suggestions appreciated.
>
> John
#!/usr/bin/perl -w
#while(<FH>) { push(@data, (split(/\t/,$_,-1)) ); }
#or any other technique to get your data looking like the following
# UNDERSTAND REFERENCES?
@_ = ( [ 1,'filename1',999],
[ 2,'filename2',52 ],
[ 3,'filename3',98 ] );
# NEET TRICK?
@index = sort { $_[$a]->[2] <=> $_[$b]->[2] } (0..$#_);
@newdata = @_[@index]; # ARRAY SLICE
map { print "@$_\n"; } (@newdata);
print "Or with extremely really ugly code\n";
&_s_(@_);
# SUBROUTINE
sub _s_ {
map{print "@$_\n";}(@_[(sort{$_[$a][2]<=>$_[$b][2]}(0..$#_))]);
}
__END__
Try that, others will have more creative ways, I'm sure. Good luck.
William
------------------------------
Date: 12 Sep 1999 00:04:03 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Pros/cons of using Perl vs. C to develop web site?
Message-Id: <7reqlk$17d$1@gellyfish.btinternet.com>
On Sat, 11 Sep 1999 14:42:58 -0500 Jim wrote:
> I understand the advantages of speed for C and ease of coding in Perl.
> Aside from these issues, does anyone have comments about the desireability
> of using one versus the other?
>
Depends on what you are trying to do I guess. I sure aint gonna try
writing adevice driver in Perl.
/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: 11 Sep 1999 19:50:00 +0200
From: kaih=7OdVEu9mw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Removing a line from a text file
Message-Id: <7OdVEu9mw-B@khms.westfalen.de>
ebohlman@netcom.com (Eric Bohlman) wrote on 10.09.99 in <7r9vh1$p5d@dfw-ixnews6.ix.netcom.com>:
> I'm more inclined to think that it's a result of thinking of files as
> array-like structures of physical records rather than as streams of
> bytes. As late as 20 years ago, I could understand why people would be
> automatically inclined to think that way (22 years ago, *I* had a hard
> time thinking of a file as anything other than an array of fixed-size
> records), but I'm not sure why people think that now.
Uh - what about array-like structuires is it that makes people think
insertions are not done by rewriting?
Or did you mean lists instead of arrays?
Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
- Russ Allbery (rra@stanford.edu)
------------------------------
Date: 11 Sep 1999 20:31:33 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: s/// problem
Message-Id: <slrn7tm0op.71l.abigail@alexandra.delanet.com>
Blair Heuer (ab@cd.com) wrote on MMCCII September MCMXCIII in
<URL:news:7rejhh$m29$1@fir.prod.itd.earthlink.net>:
&&
&& $advert = "<SCRIPT LANGUAGE=\"javascript\">\n<!--\nwindow.open('$adurl',
&& '_pj_ad', 'width=515,height=125');\n//-->\n</SCRIPT>";
&&
&& foreach $each (@file) { #puts each line of file through the block
&& $each =~ s/$advert//g; #should search for the advertising in the
Not only does $advert contain regex meta characters, it also contains
newlines. So, when you write it to the file, it becomes multiple lines,
if you read it back, you only get parts of the line in each $each.
You need a different concept. Playing with $/ might be an option.
And use eq, not s///.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
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}for(;
!$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: 11 Sep 1999 20:18:15 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: UNCRAP project proposal
Message-Id: <slrn7tlvvr.71l.abigail@alexandra.delanet.com>
Elaine -HFB- Ashton (elaine@chaos.wustl.edu) wrote on MMCCII September
MCMXCIII in <URL:news:37DAC439.AE37A56C@chaos.wustl.edu>:
"" Abigail wrote:
"" > XML is just for wussies who are afraid of SGML. XML isn't a magic wand.
"" > But it's being hyped more than Java.
""
"" I'm glad someone, especially you, say this. I'm not a document jockey
"" and like my LaTex and such just fine, but I've heard _so_ much about XML
"" it puts me off of the idea of even having a look.
I think XML will have its purpose. I'm still not convinced we need XML
instead of SGML, but if people prefer simplicity, so be it. After all,
VB is popular as well. However, XML can never replace HTML, just like BNF
will never replace Perl. It's just too bad that many people would like to
see HTML be replaced with XML + stylesheets. They prefer the bad old days.
"" > I don't know about my programs. But I do know it's very likely that HTML
"" > will be around in 20 years.
""
"" Just out of curiosity, do you have something you could cite that
"" documents the original purpose and proposed longevity of HTML?
I would suggest searching the archives of the mailing lists of the HTML
workgroups, when HTML was still an open standard. Unfortunally, not
everything that's archived is as easily accessable, and I don't know the
current address of the archives. You could contact Arjun Ray (you'll find
him in the HTML and SGML groups) [1], he seems to be a walking index when it
comes to the HTML and WWW archives.
[1] Email me if you want his email address.
Abigail
--
Anyone who slaps a "this page is best viewed with Browser X" label
on a Web page appears to be yearning for the bad old days, before the
Web, when you had very little chance of reading a document written on
another computer, another word processor, or another network.
[Tim Berners-Lee in Technology Review, July 1996]
-----------== 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: Sat, 11 Sep 1999 17:24:25 -0700
From: Michael Nguyen <ez062634@mailbox.ucdavis.edu>
Subject: win32 disk formatting
Message-Id: <Pine.GSO.4.10.9909111718130.24395-100000@runner.ucdavis.edu>
I'm trying to get an application I am writing to allow a user to format a
disk in the floppy drive on a win 95/98 . I thought of using the system
command 'format a:' but how do I know if the formatting resulted in a
clean disk (w/o bad sectors)? I know I can specify the volume label via
the dos command but that is of no use to me if the disk has bad sectors.
In summary: I just want to be able to format a disk for copying files but
return an error if the disk has bad sectors. The app I'm writing is in
perl so any help would be appreciated.
I've looked through the Cookbook and Programming Perl books and so far
Can't find any clues as to how to do this. They have examples of copying
files but that's all I can find
-= Michael Nguyen =-
-= Computer Consultant =-
-= Information Technology =-
-= UC Davis, CA 95616 =-
Fear can sometimes be a useful emotion. For instance, let's say you're an astronaught on the moon and you fear that your partner has been turned into Dracula. The next time he goes out for the moon pieces, wham!, you just slam the door behind him and blast off. He might call you on the radio and say he's not Dracula, but you just say, "Think again, bat man."
Deep Thoughts - Jack Handey
------------------------------
Date: 12 Sep 1999 00:14:41 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Win32::MAPI problem - reading and sending
Message-Id: <7rer9h$17j$1@gellyfish.btinternet.com>
On Fri, 10 Sep 1999 16:43:44 -0400 shapirojNOSPAM@logica.com wrote:
>
> Well, I wanted to do some automated processing of the mail I receive at
> work, where everything is done via Microsoft Exchange/Outlook, so I was
> delighted to find Win32::MAPI. But it's acting a bit wacky. I don't know
> if it's the module, or imapi.dll, or my system's mapi dll.
>
I would try out using Win32::OLE with the MAPI provider as described in
the Activestate documentation - but that is only a bias on my part.
/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: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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.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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 V9 Issue 767
*************************************