[16222] in Perl-Users-Digest
Perl-Users Digest, Issue: 3634 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 12 11:05:36 2000
Date: Wed, 12 Jul 2000 08:05:20 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <963414320-v9-i3634@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 12 Jul 2000 Volume: 9 Number: 3634
Today's topics:
"Deep copying" in perl? <kj0@mailcity.com>
Re: "Deep copying" in perl? <kjetilskotheim@iname.com>
Re: Anyone heard anything about "Aestiva HTML/OS" <iltzu@sci.invalid>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <foo@bar.va>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! (Csaba Raduly)
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! (Young H Lee)
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <sariq@texas.net>
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
Re: Average Salary? dejajason@my-deja.com
Re: Beyond perl? Need advice... dejajason@my-deja.com
Re: Beyond perl? Need advice... dejajason@my-deja.com
Re: Bit shifting...should be exponentiation <Simon.Armstrong@nojunkmail.uk.origin-it.com>
Re: CGI-to-NT service communication..... <gtreece@vhbtech.com>
Re: CGI-to-NT service communication..... <gtreece@vhbtech.com>
display directory structure with Perl/Tk <andreas.voerg@sican.de>
Re: display directory structure with Perl/Tk <care227@attglobal.net>
Re: display directory structure with Perl/Tk <lusol@Pandora.CC.Lehigh.EDU>
Re: Drag and Drop files onto Perl Script <mjcarman@home.com>
executing system commands via cgi? pkey@sghms.ac.uk
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 12 Jul 2000 10:15:51 -0400
From: kj0 <kj0@mailcity.com>
Subject: "Deep copying" in perl?
Message-Id: <8khuin$2mp$1@panix3.panix.com>
I'm sure this is in The Manual, but I haven't been able to find it.
What's the most convenient way of performing a "deep copy" in Perl?
By this I mean that if
@a = ([qw(uno dos tres)], [qw(cuatro cinco seis)])
and I deep-copy @a to @b, then we have the following:
@c = @a;
print "$a[0][0] $b[0][0] $c[0][0]\n";
===> uno uno uno
$b[0][0] = 'ichi';
print "$a[0][0] $b[0][0] $c[0][0]\n";
===> uno ichi uno
$c[0][0] = 'bat';
print "$a[0][0] $b[0][0] $c[0][0]\n";
===> bat ichi bat
(Assume that, at run time, we don't know the structure of @a, i.e. the
numbers of rows, columns, or even its dimensions.)
Thanks,
KJ
------------------------------
Date: Wed, 12 Jul 2000 15:55:21 +0200
From: Kjetil Skotheim <kjetilskotheim@iname.com>
To: kj0 <kj0@mailcity.com>
Subject: Re: "Deep copying" in perl?
Message-Id: <396C86D9.590C0FA9@iname.com>
Try:
perldoc Data::Dumper
or
man Data::Dumper
There is something about "deep copy" there. Also see:
perldoc perlref
...if deep understanding of perl references and nested
data structures is what you need.
kj0 wrote:
>
> I'm sure this is in The Manual, but I haven't been able to find it.
> What's the most convenient way of performing a "deep copy" in Perl?
> By this I mean that if
>
> @a = ([qw(uno dos tres)], [qw(cuatro cinco seis)])
>
> and I deep-copy @a to @b, then we have the following:
>
> @c = @a;
> print "$a[0][0] $b[0][0] $c[0][0]\n";
>
> ===> uno uno uno
>
> $b[0][0] = 'ichi';
> print "$a[0][0] $b[0][0] $c[0][0]\n";
>
> ===> uno ichi uno
>
> $c[0][0] = 'bat';
> print "$a[0][0] $b[0][0] $c[0][0]\n";
>
> ===> bat ichi bat
--
Kjetil Skotheim
kjetilskotheim@iname.com
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
------------------------------
Date: 12 Jul 2000 11:54:53 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: Anyone heard anything about "Aestiva HTML/OS"
Message-Id: <963402406.9143@itz.pp.sci.fi>
In article <8kfgqk$tpv$0@216.155.32.201>, The WebDragon wrote:
>Apparently they are making claims like :
>> The product eliminates the need for systems
>> integration tools like Perl, Cold Fusion and ASP.
>
>which at face value I highly doubt. :-j
Indeed. I see no trace of the original, so I can't comment on that,
but that claim looks like eliminating the rope from waterskiing.
Sure, you can do that, if you put the skier in the boat itself, but
why on earth would you want to? Eliminating any layer between HTML
and just about anything else is IMHO generally a bad move..
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method." -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Wed, 12 Jul 2000 12:07:26 +0200
From: Marco Natoni <foo@bar.va>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396C435E.5A999DAC@bar.va>
Ganesha,
p3rlc0dr@my-deja.com wrote:
> Ive been reading this board for awhile and Im very disaponted with
> the atitudes and acts of many of the so-called "PERL elites". When
> a person comes to this board and asks for help do they get
> it NO!!!!!!!!
UseNet is free: Ideas you can get here and in other newsgroups are
(use)net earnings, if no one gives an answer to your questions, you have
lost nothing other but few seconds of your time.
Best regards,
Marco
------------------------------
Date: 12 Jul 2000 10:02:46 GMT
From: csaba_r@my-deja.com (Csaba Raduly)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8F6F78633quuxi@194.203.134.200>
11 Jul 2000: A formal bug report was sent to Seti@Home, because the
following message originated from PerLover@PerLove.com (PerLover) was
reported as containing signs of intelligence:
>In article <8kfs35$2eq$1@nnrp1.deja.com>, p3rlc0dr@my-deja.com
>wrote:
>
[snip]
>
># Guestbooks, hit counters, shopping carts: Get Matt's Script
>Archive
>
>This is the reason people like you get made fun of: the scripts on
>Matt's Scripts Archive are shit. They are insecure, and if you have
>them on your site, expect to get hacked. They are horribly written
>and virtually impossible to fix. If you run them, you are clueless.
>
And his C code sucks, too !
>
># "There is no such thing as being a stupid woman."
>
>I beg to differ. I submit this post as evidence.
>
LOL !
--
Csaba Raduly, Software Developer (OS/2), Sophos Anti-Virus
mailto:csaba.raduly@sophos.com http://www.sophos.com/
US Support +1 888 SOPHOS 9 UK Support +44 1235 559933
Life is complex, with real and imaginary parts.
------------------------------
Date: 12 Jul 2000 13:33:55 GMT
From: yhlee@mail.med.upenn.edu (Young H Lee)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khs43$667$2@netnews.upenn.edu>
: I'll bite, even though this "I don't speak good english" crap is a
: bit tired. Your usage and grammer are markedly worse in every
: subsequent post you make. You started out using common slang and
: mixed case haXor speak, and now you have degraded into some kind of
: Godzilla movie psuedo-english.
: ^^^^^^^^
In her defense, a lot of the foreigners out there who learn a little bit
of english in high school/college/whatever and learn the rest "as they go
along" on the internet pick up what they see, which include slang/haxor (I
cant say i know exactly what haxor is) speak. I've spoken/written with
several koreans and heck, they know more slang than I do.
But her post is not entirely false.. I mean, I am not stupid but when it
comes to programming, it is like trying to learn math (i'm bad at math
too). I have difficulty even understanding the perldocs and it gets
really old when you ask someone a question and they say "look at perldoc
this or that." I've seen my share of stupid questions on this group that
could be learned by reading chapter one of o'reilly's book but I feel no
need to say anything because the next person could think my question is
dumb. Bottom line, assume people have read the faq and have read the
perldoc. If you think it is too trivial then just dont answer. Don't
insult the poster's ability to read the faq and say "perldoc this or that."
Do whatever you want though.
--
-----
Young H. Lee
"Never try to teach a pig to sing. It wastes your time and annoys the pig."
------------------------------
Date: Wed, 12 Jul 2000 13:47:18 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khst3$gs4$1@nnrp1.deja.com>
In article <smo7qdbind659@corp.supernews.com>,
cberry@cinenet.net (Craig Berry) wrote:
>
> We like to keep this Perl cocktail party pleasant. Causing a scene to
> drive away those who are problematic is better than allowing them to
> become a continuing irritation.
Craig your nice. Are you telling that being mean is okay if it keeps
comp.lang.perl.misc happy?
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 13:50:50 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kht3l$h55$1@nnrp1.deja.com>
In article <8kgs8e$f7k$1@bcrkh13.ca.nortel.com>,
bmetcalf@nortelnetworks.com wrote:
> care227@attglobal.net writes:
>
> > Godzilla movie psuedo-english.
> ^^^^^^^^
>
> Bingo!!!! Didn't take too long to spot.
I dont know what you mean but I think your being mean to ME!!!
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 13:54:11 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kht9u$h6b$1@nnrp1.deja.com>
In article <m166qbu3j6.fsf@halfdome.holdit.com>,
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
> >>>>> "Craig" == Craig Berry <cberry@cinenet.net> writes:
>
> Craig> : or why Randal did not want to say
> Craig> : hello to me. That is how I mean.
>
> Craig> Randal is rather a busy guy, you know! He'd get no work done
if he
> Craig> stopped to say hello to each Perl newcomer.
Randal had writen a book but does that make him famous or better
NO!!!!!!! He makes me nerves.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 13:57:51 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khtgp$h8p$1@nnrp1.deja.com>
In article <87puokvzkk.fsf@limey.hpcc.uh.edu>,
Tony Curtis <tony_curtis32@yahoo.com> wrote:
> >> On Wed, 12 Jul 2000 02:19:11 GMT,
> >> p3rlc0dr@my-deja.com said:
>
> > Matt is nice. He explained me about localtime and 19100
> > and why guestbook will do okay without file locking.
>
> Unfortunately,
>
> nice != correct
But Perl people can be MEAN for no reason like the tv show WHEN ANIMALS
ATTACK.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
"DONT BE MEAN TONY CURTIS"
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 14:01:40 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khtnu$hi6$1@nnrp1.deja.com>
In article <slrn8mnmq5.pm6.sjs@john.sympatico.ca>,
sjs@yorku.ca wrote:
> p3rlc0dr@my-deja.com <p3rlc0dr@my-deja.com> wrote:
>
> >I have not been come across one 'Perl of wisdom' from 'uri'.
>
> You've not lurked long enough. Reading Uri's work has been a
> 'transforming' experience for me.
has it make you type like this?
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 14:05:05 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khtua$his$1@nnrp1.deja.com>
In article <396C2838.3BFF4A9F@stomp.stomp.tokyo>,
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
>
> A notion to heed well and, a bit of oxymoronic
> humor contrasting your empty barrel beating.
My English is not good but I laugh when Perl ELITE get mad and mean
becase they know that Im right. Your scary Godzilla NO!!!!!!!!!!!!
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 14:03:10 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khtqn$hie$1@nnrp1.deja.com>
In article <396BE356.F1C499B3@Home.Com>,
David Ness <DNess@Home.Com> wrote:
>
> Again, I guess our experiences differ. I have graded several thousand
> students over the years and the `quiet ones' were quite often quiet
because
We are talking not of school. School people dont have real jobs.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 09:26:45 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <396C8025.4AE377F2@texas.net>
Craig Berry wrote:
>
> p3rlc0dr@my-deja.com wrote:
>
> : for awhile and Im very disaponted with the
> : atitudes and acts of many of the so-called "PERL elites".
>
> I'm not sure who calls us/them that. Most highly experienced Perlers are
> rather charmingly self-deprecating.
Much like a number of perlvars!
- Tom
------------------------------
Date: Wed, 12 Jul 2000 14:24:59 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khv3f$icm$1@nnrp1.deja.com>
In article <brian-ya02408000R1207000051150001@news.panix.com>,
brian@smithrenaud.com (brian d foy) wrote:
>
Brian! Your being MEAN! You need Ganesh in your life!
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 14:29:25 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khvbo$ifo$1@nnrp1.deja.com>
In article <396C435E.5A999DAC@bar.va>,
mnatoni@rumbanet.it wrote:
>
> UseNet is free: Ideas you can get here and in other newsgroups are
> (use)net earnings, if no one gives an answer to your questions, you
have
> lost nothing other but few seconds of your time.
I never asked anything from comp.lang.perl.misc except for you to stop
being MEAN.
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 14:28:10 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8khv9d$if9$1@nnrp1.deja.com>
In article <x7aefoko3a.fsf@home.sysarch.com>,
Uri Guttman <uri@sysarch.com> wrote:
>
> finally, your nickname is kewltawk and foolish. you are not a
perlcoder
> and shouldnt claim it no matter how you encode it.
How do you know I dont know how to write Perl program? QUIT BEING
MEAN. YOUR STALKING ME!
--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 14:14:29 GMT
From: dejajason@my-deja.com
Subject: Re: Average Salary?
Message-Id: <8khufr$hvl$1@nnrp1.deja.com>
In article <8i98mg$q82$1@nnrp1.deja.com>,
paul_maas@my-deja.com wrote:
> Hi,
>
> I am trying to find out the average salary of a Web Developer
> (CGI/PERL) and Database Administrator. So one person.
>
> I have seen people asking/offering from $63,000 to $84,000.
> Is that about right?
Depends on what you're worth. Here's what I consider key:
* Wide knowledge and experience with web technology, and not just a
single tool like perl, or Java, or whatever. I'd rather use the best
tool for the application rather than some programmer's favorite.
* Good with more than one OS and can integrate them. (NT-only people
are the WORST followed closely by linux-only)
* Strong database design and admin experience. Real easy to botch an
entire system with bad database design or failure to do backups
correctly.
* Good track record with previous projects.
* Emacs user :)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 14:49:54 GMT
From: dejajason@my-deja.com
Subject: Re: Beyond perl? Need advice...
Message-Id: <8ki0ie$j8q$1@nnrp1.deja.com>
In article <slrn8mn7ud.4q5.tadmc@magna.metronet.com>,
> >I'm not sure how the algorithm applies to the point.
>
> Eh?
>
> You are discussing the running time of a program.
>
> Algorithms are *central* to bounding the running time.
>
> If the Perl and C programs do not use the same algorithm,
> then a meaningful comparison cannot be done.
Exactly! But the claim was the it is NOT a reasonable comparison
because both programs used the exact same code with only syntax
changes.
Just code a quick bubble sort in both languages, and you'll see speed
difference of 30 or more. It DOES NOT MATTER that a sort could be
done more efficiently, since the only purpose was to compare basic
engine speed and not the speed of library functions. You can use the
same libraries in either case.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 14:53:21 GMT
From: dejajason@my-deja.com
Subject: Re: Beyond perl? Need advice...
Message-Id: <8ki0or$ji0$1@nnrp1.deja.com>
In article <MPG.13d542332a07cfb398abb9@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
> How about code that extracts substrings using regexes, rather than
> character-by-character analysis?
Well, it comes doen to character-by-character anyway. Plenty of
very effecient regex libraries you can plug into your programs.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 15:25:42 +0200
From: "Simon Armstrong" <Simon.Armstrong@nojunkmail.uk.origin-it.com>
Subject: Re: Bit shifting...should be exponentiation
Message-Id: <0E16861EE7BCD111BE9400805FE6841F11018D8D@c1s5x001.cor.srvfarm.origin-it.com>
Steffen,
Thanks for your response.
Yep, I goofed. The bit shifting part was removed in the simplified example I
posted, and my real problem is with the exponentiation.
Your response pointed out that exponentiation is just multiplying a number
by itself... I guess I sort of forgot this!... and so I'm experimenting with
doing that in a loop and masking out the top part of the result each time
round. Can't get the "right" answer so far, and perhaps I'm on the wrong
track, but I'll give it a try.
You also probably noticed the other glaring error in my code... the "& 256"
should be "& 255"!
I've downloaded the bit vector stuff and will take a look at it shortly.
Thanks
Simon Armstrong
(remove .nojunkmail to email)
------------------------------
Date: Wed, 12 Jul 2000 08:01:14 -0500
From: Greg Treece <gtreece@vhbtech.com>
Subject: Re: CGI-to-NT service communication.....
Message-Id: <DD65450413BBB5C7.CB82F8D55BF0619C.F5DAE63887E408F0@lp.airnews.net>
Thanks for your response.
The service is straight from the book "Visual C++ 5 Unleashed", chapter 52
"Writing A Windows NT Service" and uses straight-up, off-the-shelf socket
techniques:
%%--snip--%%
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd == INVALID_SOCKET) goto cleanup;
sin.sin_family = AF_INET;
sin.sin_port = SVCPORT;
sin.sin_addr.s_addr = 0;
if (bind(sockfd, (LPSOCKADDR)&sin, sizeof(sin))) goto cleanup;
if (listen(sockfd, 5) < 0) goto cleanup;
if (!ReportStatusToSCMgr(SERVICE_RUNNING, NO_ERROR, 0))
goto cleanup;
while (1)
{
unsigned long ul;
SOCKET newsockfd = accept(sockfd, NULL, NULL);
if (g_bStop)
{
if (newsockfd != INVALID_SOCKET) closesocket(newsockfd);
break;
}
if (newsockfd == INVALID_SOCKET)
{
if (bDebug) cout << "Socket error " << WSAGetLastError() << endl;
}
else
{
struct linger l;
l.l_onoff = TRUE;
l.l_linger = 1;
setsockopt(newsockfd, SOL_SOCKET, SO_LINGER, (LPSTR)&l, sizeof(l));
CSlot *pSlot = new CSlot(pSvc, newsockfd, id++);
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)thread, pSlot, 0, &ul);
}
}
%%--snip--%%
The client is in PERL as follows:
%%--snip--%%
use IO::Socket;
$socket = IO::Socket::INET->new
(
PeerAddr => $SvcHost,
PeerPort => $SvcPort,
Proto => "tcp",
Type => SOCK_STREAM
) or die "Could not create client.\n";
print $socket $cmd;
%%--snip--%%
I believe that the real problem is NT security based because I can run the
PERL client manually
with success; it dies only when launched as a CGI script from APACHE with
the error "Could not create client.".
kbcafe@my-deja.com wrote:
> If you are using TCP/IP or UDP/IP sockets, then there should not be any
> interprocess security issues.
> --
> Randy Charles Morin [MVP] - http://www.kbcafe.com/
> Author of "Programming Windows Services"
> http://www.amazon.com/exec/obidos/ASIN/047138576X/kbcafe
>
> In article
> <56CEC26EFF90B73F.82AEAF49592F5301.5CCB9E915F9DB48F@lp.airnews.net>,
> Greg Treece <gtreece@vhbtech.com> wrote:
> > I am trying to feed some information from a cgi program (Apache) to an
> > NT service via a socket and
> > my perl script cannot open its socket connection. This works when run
> > from the command
> > line. Are there interprocess security settings somewhere to make this
> > happen?
> >
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Wed, 12 Jul 2000 08:02:10 -0500
From: Greg Treece <gtreece@vhbtech.com>
Subject: Re: CGI-to-NT service communication.....
Message-Id: <DE83959BF38DE129.35B7ADD662088B4D.DDE2866596F3BE83@lp.airnews.net>
Thanks for your response.
The service is straight from the book "Visual C++ 5 Unleashed", chapter 52
"Writing A Windows NT Service" and uses straight-up, off-the-shelf socket
techniques:
%%--snip--%%
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd == INVALID_SOCKET) goto cleanup;
sin.sin_family = AF_INET;
sin.sin_port = SVCPORT;
sin.sin_addr.s_addr = 0;
if (bind(sockfd, (LPSOCKADDR)&sin, sizeof(sin))) goto cleanup;
if (listen(sockfd, 5) < 0) goto cleanup;
if (!ReportStatusToSCMgr(SERVICE_RUNNING, NO_ERROR, 0))
goto cleanup;
while (1)
{
unsigned long ul;
SOCKET newsockfd = accept(sockfd, NULL, NULL);
if (g_bStop)
{
if (newsockfd != INVALID_SOCKET) closesocket(newsockfd);
break;
}
if (newsockfd == INVALID_SOCKET)
{
if (bDebug) cout << "Socket error " << WSAGetLastError() << endl;
}
else
{
struct linger l;
l.l_onoff = TRUE;
l.l_linger = 1;
setsockopt(newsockfd, SOL_SOCKET, SO_LINGER, (LPSTR)&l, sizeof(l));
CSlot *pSlot = new CSlot(pSvc, newsockfd, id++);
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)thread, pSlot, 0, &ul);
}
}
%%--snip--%%
The client is in PERL as follows:
%%--snip--%%
use IO::Socket;
$socket = IO::Socket::INET->new
(
PeerAddr => $SvcHost,
PeerPort => $SvcPort,
Proto => "tcp",
Type => SOCK_STREAM
) or die "Could not create client.\n";
print $socket $cmd;
%%--snip--%%
I believe that the real problem is NT security based because I can run the
PERL client manually
with success; it dies only when launched as a CGI script from APACHE with
the error "Could not create client.".
Ha Quach wrote:
> source code may be useful.
> -ha.
>
> Greg Treece wrote:
> >
> > I am trying to feed some information from a cgi program (Apache) to an
> > NT service via a socket and
> > my perl script cannot open its socket connection. This works when run
> > from the command
> > line. Are there interprocess security settings somewhere to make this
> > happen?
------------------------------
Date: Wed, 12 Jul 2000 15:27:38 +0200
From: Andreas Voerg <andreas.voerg@sican.de>
Subject: display directory structure with Perl/Tk
Message-Id: <396C724A.85AE0D83@sican.de>
This is a multi-part message in MIME format.
--------------4DB20306BE7307682936635E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello,
does anybody know if there is a module or just a program that displays a
directory structure on the screen with the posibility to open a
directory or file by clicking on the displayed entrys? I want to do the
coding with Perl/Tk.
Thanks
Andreas Voerg
--------------4DB20306BE7307682936635E
Content-Type: text/x-vcard; charset=us-ascii;
name="andreas.voerg.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Andreas Voerg
Content-Disposition: attachment;
filename="andreas.voerg.vcf"
begin:vcard
n:Voerg;Andreas
tel;fax:+49 (0)511 277-2410
tel;home:+49 (0)511
tel;work:+49 (0)511 277-2553
x-mozilla-html:FALSE
org:Sican GmbH Design & Reuse;MCD
adr:;;Garbsener Landstr. 10;Hannover;;30419;Germany
version:2.1
email;internet:andreas.voerg@sican.de
x-mozilla-cpt:;-21752
fn:Andreas Voerg
end:vcard
--------------4DB20306BE7307682936635E--
------------------------------
Date: Wed, 12 Jul 2000 10:09:36 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: display directory structure with Perl/Tk
Message-Id: <396C7C20.59BF7D84@attglobal.net>
Andreas Voerg wrote:
>
> Hello,
>
> does anybody know if there is a module or just a program that displays a
> directory structure on the screen with the posibility to open a
> directory or file by clicking on the displayed entrys? I want to do the
> coding with Perl/Tk.
>
Perl/Tk questions are best asked (and better answered) in
comp.lang.perl.tk
HTH
------------------------------
Date: 12 Jul 2000 14:07:37 GMT
From: "Stephen O. Lidie" <lusol@Pandora.CC.Lehigh.EDU>
Subject: Re: display directory structure with Perl/Tk
Message-Id: <8khu39$fcg@fidoii.CC.Lehigh.EDU>
Andreas Voerg <andreas.voerg@sican.de> wrote:
> This is a multi-part message in MIME format.
> --------------4DB20306BE7307682936635E
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> Hello,
> does anybody know if there is a module or just a program that displays a
> directory structure on the screen with the posibility to open a
> directory or file by clicking on the displayed entrys? I want to do the
> coding with Perl/Tk.
Yes, there are Tree and HList widgets - come on over to comp.lang.perl.tk.
--
@_=map{eval"100${_}"}split/!/,'/5!*2!+$]!/10+$]';use Tk;$m=tkinit;$t='just an'.
'other perl hacker';$z='createText';$c=$m->Canvas(-wi,$_[1],-he,25)->grid;$c->$
z(@_[2,3],-te,$t,-fi,'gray50');$c->$z($_[2]-$],$_[3]-$],-te,$t);$m->bind('<En'.
'ter>',sub{$y=int(rand($m->screenheight));$m->geometry("+$y+$y")});MainLoop;
------------------------------
Date: Wed, 12 Jul 2000 08:30:59 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: Drag and Drop files onto Perl Script
Message-Id: <396C7313.4EEF2352@home.com>
Drew Simonis wrote:
>
> mpressnall@my-deja.com wrote:
> >
> > Is there a way to drag a file onto a perl script (on Win32 platform),
> > have the perl script recognize the filename of the dropped file, and
> > then have the script do something to the dropped file?
>
> Thats like asking to drag-drop a text file on a text file. Its not
> the way Windows works.
True, but it is (crudely) possible. When I tried to do this a while
back, the only thing I could come up with was to create a batch file
wrapper to call the script with the file as an argument.
e.g.
rem Wrapper to allow drag & drop
perl myscript.pl "%1"
Then drag your input file onto the *.BAT file. Unfortunately, the %1 arg
doesn't seem to include the path, and as Bart said it's in 8.3 format. A
little limiting, but it may work for you.
-mjc
------------------------------
Date: Wed, 12 Jul 2000 12:12:30 GMT
From: pkey@sghms.ac.uk
Subject: executing system commands via cgi?
Message-Id: <396c608e.16263338@news.sghms.ac.uk>
Solaris
Apache 1.3.12
Perl
I am having problems with a perl cgi script.
I want a user to have access to their disc quota info via the web.
The script is posted their user name and then executes the quota
command:
$quota1 = `quota -v $user`;
The problem is that the 'quota' command needs to be run by root.
The cgi is attempting to run the script as the user who entered their
name (I think) as I get the following message:
user (uid 123456): permission denied
I set the script permission to:
chmod 4755 my.cgi
and quota still won't execute.
Also, another thing - I do a ypmatch on the user to see if they exist
before doing the quota:
if (system("ypmatch $test_user passwd")==0)
now, the output from the ypmatch command gets displayed in the web
browser. Why is this? I thought it went to stdout and as it doesn't
have backticks around it the web browser should not be sent the
output?
How do I sort the above out?
Thanks for your help,
Paul
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 3634
**************************************