[11203] in Perl-Users-Digest
Perl-Users Digest, Issue: 4803 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 2 06:07:14 1999
Date: Tue, 2 Feb 99 03:00:20 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 2 Feb 1999 Volume: 8 Number: 4803
Today's topics:
Re: activeperl ppm help <emperry@swbell.net>
Re: Bath.pm-ish Meetings <leon@netcraft.com>
Can "push" be used on anonymous arrays - syntax help? <brett_s_r@hotmail.com>
Re: Can "push" be used on anonymous arrays - syntax hel (Larry Rosler)
Re: Can't return outside a subroutine <uri@home.sysarch.com>
Re: Can't return outside a subroutine (brian d foy)
Re: Can't return outside a subroutine <partha@mihy.mot.com>
Re: Comments in Perl code <design@raincloud-studios.com>
Re: Comments in Perl code <tchrist@mox.perl.com>
Re: debug this script please <elst.fels@nospam.ping.be>
Re: Filtering... <partha@mihy.mot.com>
Re: Filtering... Sultan@dumein.com
find&replace on multiple files <S.Manschot@Inter.NL.net>
Re: find&replace on multiple files (Staffan Hdmdld)
Re: find&replace on multiple files <S.Manschot@Inter.NL.net>
How can I use HTML code in PERL? blazek@sisblansko.cz
Re: How to get Perl for Red Hat Linux 5.2? <alfonsdg@medialabsperu.com>
Re: How to support both short and long option styles? (Johan Vromans)
Looking for Freelance Perl Programmers <martin.baur@mindpower.com>
Re: maths-tutor in perl-cgi <ion@aroma.com>
MIME converted to text <nospam@aol.com>
perl -S not parsing $PATH consistently <rchmllr@ix.netcom.com>
Perl way of getting HWND (in win32) <abramov@pacbell.net>
Re: Proposed module: GTK_Dialog <matthew.sergeant@eml.ericsson.se>
strange fork/pipe open behaviour (Christian Murphy)
Re: Trouble compiling Perl 5.005_2 with Apache on FreeB <bholzman@earthlink.net>
Re: Visual Perl? <design@raincloud-studios.com>
What characters are illegal in referer strings? <richly@samart.co.th>
Re: win32 perflib and processor statistics <david.richards@alderley.zeneca.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 02 Feb 1999 00:30:42 -0600
From: Edward Perry <emperry@swbell.net>
Subject: Re: activeperl ppm help
Message-Id: <36B69B92.50E3@swbell.net>
nite_eagle@hotmail.com wrote:
>
> Point you browser to http://www.activestate.com/packages/zips/
>
> You download zipped modules, follow directions in the readme.
>
YES! That did it. Hope the backdoor stays unlocked! Damn automation...
Thanks a million!
EdVenture
------------------------------
Date: Tue, 02 Feb 1999 10:09:07 +0000
From: Leon Brocard <leon@netcraft.com>
Subject: Re: Bath.pm-ish Meetings
Message-Id: <36B6CEC3.EDA14F21@netcraft.com>
brian d foy wrote:
> now, just how many groups do you plan on starting? ;)
Actually, I was thinking of doing it alphabetically: Amsterdam.pm,
Bath.pm, ....... Hmmmm, where shall I move to next? Any suggestions /
job offers in Cairo? ;-)
Leon
--
Leon Brocard...............................................Perl Hacker
leon@netcraft.com.............................http://www.netcraft.com/
... I have seen the truth and it makes no sense.
------------------------------
Date: Tue, 02 Feb 1999 18:29:33 +1100
From: Brett Randall <brett_s_r@hotmail.com>
Subject: Can "push" be used on anonymous arrays - syntax help?
Message-Id: <36B6A95D.3936AC2E@hotmail.com>
I think I need help with some correct syntax using "push". I have a
data structure like this :-
@rows is an array of anonymous array references and is populated as
follows :-
--- start code snip ---
while (<STDIN>) {
# split on delimiter
my (@fields) = split(/$delimiter/);
# increment count of rows with this field count
$count_row_fields{@fields}++;
# store a reference to the row
push(@rows, [@fields]);
}
--- end code snip ---
Later on, this array is sorted according to what is in the anonymous
arrays, to produce @sorted_rows (also an array of anonymous array
references). @sorted_rows is passed to a function by reference :-
--- start code snip ---
&add_key(\@sorted_rows, \@keyfields, $firstkey);
--- end code snip ---
Within the function &add_key, I would like to "push" a value onto each
anonymous array stored in @$sorted_rows, but I can't seem to get the
syntax correct. I am trying :-
--- start code snip ---
push(@$sorted_rows->[0], $new_field);
--- end code snip ---
to which I get the compilation error :-
Type of arg 1 to push must be array (not array element)
However, I can print $$sorted_rows[0] . "\n";, which displays
ARRAY(0x80c48d0) (an anonymous array?).
Can anyone please help?
Brett
------------------------------
Date: Tue, 2 Feb 1999 01:02:10 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Can "push" be used on anonymous arrays - syntax help?
Message-Id: <MPG.11205eeffe4e889899ef@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <36B6A95D.3936AC2E@hotmail.com> on Tue, 02 Feb 1999 18:29:33
+1100, Brett Randall <brett_s_r@hotmail.com> says...
...
> Within the function &add_key, I would like to "push" a value onto each
> anonymous array stored in @$sorted_rows, but I can't seem to get the
> syntax correct. I am trying :-
>
> --- start code snip ---
> push(@$sorted_rows->[0], $new_field);
> --- end code snip ---
push(@{$sorted_rows->[0]}, $new_field);
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 02 Feb 1999 01:23:48 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: Can't return outside a subroutine
Message-Id: <x7679lpbm3.fsf@home.sysarch.com>
>>>>> "i" == info <info@gadnet.com> writes:
i> What is wrong with this:
i> if ($ENV{'QUERY_STRING'} =~ /ID=([^\s&]*)&/)
i> {
i> $thisuser = $1;
i> &getad;
i> &updateuser;
i> return;
i> }
i> It comes up with error: Can't return outside a subroutine at line
i> (line number of 'retuurn'.
i hate to get sarcastic but this is calling out for it. i will try to be
nice. what is unclear about the error statement above? you are not in a
subroutine. return is only allowed inside a subroutine. if the code
below works fine, then why do you want a return statement? what will it
do that you possibly need above and beyond the exiting of the if clause
which happens naturally?
i> This works fine:
i> if ($ENV{'QUERY_STRING'} =~ /ID=([^\s&]*)&/)
i> {
i> $thisuser = $1;
i> &getad;
i> &updateuser;
i> }
so use it.
and as always, use CGI.pm instead of parsing cgi params by yourself. cgi
code tends to be buggy and convoluted. let CGI.pm do all the work for you.
hth,
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Tue, 02 Feb 1999 03:44:09 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Can't return outside a subroutine
Message-Id: <comdog-ya02408000R0202990344090001@news.panix.com>
In article <36b6d200.5718298@news.newsguy.com>, info@gadnet.com posted:
> What is wrong with this:
[snip]
> It comes up with error: Can't return outside a subroutine at line
> (line number of 'retuurn'.
> Why?
the short answer is that there is no place to which to return. returning
implies that you left somewhere and now are going back there, which is
exactly what happens when you "return" from a subroutine. in your case,
you never left, so you can't return.
perhaps you wanted something like 'last'? hard to tell based on your
snippet.
and i didn't even mention machine code. D'oh!
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: Tue, 02 Feb 1999 14:09:29 +0530
From: Ramanujam Parthasarathi <partha@mihy.mot.com>
To: info@gadnet.com
Subject: Re: Can't return outside a subroutine
Message-Id: <36B6B9C0.16257B83@mihy.mot.com>
Hi,
If you are outside a sub-routine, then you cannot 'return'. I think in
your case you tried to 'return' from the main chunk of code - here by
'main', I mean the code where execution starts. If you want to exit the
script with some value use 'exit'.
HTH
-Partha
info@gadnet.com wrote:
> What is wrong with this:
>
> if ($ENV{'QUERY_STRING'} =~ /ID=([^\s&]*)&/)
> {
> $thisuser = $1;
> &getad;
> &updateuser;
> return;
> }
>
> It comes up with error: Can't return outside a subroutine at line
> (line number of 'retuurn'.
------------------------------
Date: 2 Feb 1999 09:07:17 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: Comments in Perl code
Message-Id: <796f85$559@bgtnsc02.worldnet.att.net>
>
>My estimates give about 10 ms per 1000 lines of comments.
Hardly
>worth worrying about in the slightest.
>
Definitely not worth wasting my time futzing with then. :)
------------------------------
Date: 2 Feb 1999 03:16:13 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Comments in Perl code
Message-Id: <36b6d06d@csnews>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
"Charles R. Thompson" <design@raincloud-studios.com> writes:
:This is probably total ignorance on my part, but I too don't
:worry about the parser as much as I worry about the combined
:filesizes of a main CGI script, modules, databases, and
:libraries in a multiuser situation.
:
:I mean... maybe I misunderstand this... but isn't there a bit of
:a server performance difference where memory is an issue when
:you are opening about 137,000 bytes of files with comments
:compared with 98,000 bytes without when you have about 65+ users
:accessing the system at the same time? Unix servers are fast and
:rule the natural universe, but geez, *everything* has to have
:some breaking point, or at least a downward curve.
No. Your reasoning is flawed. It doesn't matter whether it's
single-tasking or multi-tasking. The effect of comments on the execution
speed of Perl code is precisely the same as the effect of comments on
the execution speed of C code : to wit, exactly zero, zilch, and nada.
No matter how many comments you put in C code, it will never run any
slower. No matter how many comments you put in Perl code, it will never
run any slower. Perhaps I might interest you in a compiler class?
--tom
--
Whenever people agree with me I always feel I must be wrong.
--Oscar Wilde
------------------------------
Date: Tue, 2 Feb 1999 07:24:38 +0100
From: "myname@mydomain.com" <elst.fels@nospam.ping.be>
Subject: Re: debug this script please
Message-Id: <7965ji$loe$1@news3.Belgium.EU.net>
No, that was not the error.
I just forgot to type it in the mail ;)
Ok thank you everybody the script works !
Can anybody tell me how I can call the script ?
A SSI doesn't seem to work and in an image tag it won't work either.
Do I have to link it directly in a frame or is there an other way ?
Thank you,
Peter
Steve Palincsar heeft geschreven in bericht <36B648C0.26A885AC@his.com>...
>myname@mydomain.com wrote:
>>
>> Can anyone tell me what is wrong with this script ?
>> I really don't get it, I always get an internal server error.
>> I chmod te files read/write/execute
>>
>> Please help,
>>
>> Peter
>>
>> netket@dma.be
>>
>> #!/usr/bin/perl -w
>> use strict;
>> srand;
>> my $whichImg = rand(4);
>> my $img;
>> if ($whichImg < 1) <================== guess what is missing here
>>
>> $img = '1.gif';
>> } <=================================== close brace. Where is the open
brace?
>> elsif ($whichImg < 2) <=============== and you've done it again
>>
>> $img = '2.gif';
>> } <=================================== there's that close again; where
is the open?
>> elsif ($whichImg < 4) <=============== ditto
>>
>> $img = '3.gif';
>> } <=================================== ditto once again
>> print "<img src=\"$img\">\n";
------------------------------
Date: Tue, 02 Feb 1999 14:21:05 +0530
From: Ramanujam Parthasarathi <partha@mihy.mot.com>
To: PsIoNnEkE <bdispa@bigfoot.com>
Subject: Re: Filtering...
Message-Id: <36B6BC79.C5FE108B@mihy.mot.com>
Hi,
Try something like
if($file_name =~ /^\./) {
print "File name starts with a .";
}
else {
print "File name does not start with a ".";
}
HTH
-Partha
PsIoNnEkE wrote:
> Hi !I have a script that display's all filenames of a dir. Now I
> want that every file beginning with a '.' (dot) is filtered out...
> Every file comes in through a variable and is directly printed via the
> print-command. So no arrays are involved.I though of an IF-THEN
> sequence, but I don't seem to get it work...Somebody can help me ?(if
> possible, pls reply via e-mail)tnx...
>
> --
> Bram Dispa
> bdispa@bigfoot.com
> 308692 [SP]
------------------------------
Date: Tue, 02 Feb 1999 09:32:45 GMT
From: Sultan@dumein.com
Subject: Re: Filtering...
Message-Id: <796gnt$lq6$1@nnrp1.dejanews.com>
In article <jJot2.31$5q4.885@afrodite.telenet-ops.be>,
"PsIoNnEkE" <bdispa@bigfoot.com> wrote:
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0008_01BE4E2F.62657BC0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> Hi !
>
> I have a script that display's all filenames of a dir. Now I want that =
> every file beginning with a '.' (dot) is filtered out... Every file =
> comes in through a variable and is directly printed via the =
> print-command. So no arrays are involved.
> I though of an IF-THEN sequence, but I don't seem to get it work...
>
> Somebody can help me ?
>
> (if possible, pls reply via e-mail)
>
> tnx...
>
> --=20
> Bram Dispa
> bdispa@bigfoot.com
> 308692 [SP]
>
Bram, you can use the if then sequence in this way:
if($FileName!~/\.\b/)
{
print $FileName;
}
that will filter out all the files that begin with '.' if however you are
tryign to get rid of all files that have a dot in them at all then simply use:
if($FileName !~/\./)
{
print $FileName;
}
i would have preffered doing what you are trying to do with an array though,
then i could've just used grep to take the filenames i wanted.
Jim
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 2 Feb 1999 09:08:32 GMT
From: Steven Manschot <S.Manschot@Inter.NL.net>
Subject: find&replace on multiple files
Message-Id: <36B6BEDF.DE522787@Inter.NL.net>
Hi,
I have to do a find and replace on multiple files in seperate
directories now...
I remember either that in either the latest Perl Journal or The Perl
Cookbook there
was a snippet to do this. But, they are at home, and i'm at my work now.
I'm a little short on expirience and time right now so I can't figure it
out on myself.
Does anybody has the code or can it look up for me or has another
solution?
Thanks in advance,
Steven Manschot.
------------------------------
Date: Tue, 02 Feb 1999 09:26:57 GMT
From: staham@algonet.se (Staffan Hdmdld)
Subject: Re: find&replace on multiple files
Message-Id: <36cec4b0.1022424418@news.rsv.rsv.se>
On 2 Feb 1999 09:08:32 GMT, Steven Manschot <S.Manschot@Inter.NL.net> wrote:
>I remember either that in either the latest Perl Journal or The Perl
>Cookbook there
>was a snippet to do this. But, they are at home, and i'm at my work now.
I tried this, and it seems to work:
perl -pi -e "s/href/olle/gi" *.html
/Staffan - staham@algonet.se
------------------------------
Date: 2 Feb 1999 09:41:21 GMT
From: Steven Manschot <S.Manschot@Inter.NL.net>
Subject: Re: find&replace on multiple files
Message-Id: <36B6C692.9EAB3967@Inter.NL.net>
Yup, it works, Thanks a lot.
Beautifull, isn't it?
steven
"Staffan Hdmdld" wrote:
> On 2 Feb 1999 09:08:32 GMT, Steven Manschot <S.Manschot@Inter.NL.net> wrote:
>
> >I remember either that in either the latest Perl Journal or The Perl
> >Cookbook there
> >was a snippet to do this. But, they are at home, and i'm at my work now.
>
> I tried this, and it seems to work:
>
> perl -pi -e "s/href/olle/gi" *.html
>
> /Staffan - staham@algonet.se
------------------------------
Date: Tue, 02 Feb 1999 10:34:47 GMT
From: blazek@sisblansko.cz
Subject: How can I use HTML code in PERL?
Message-Id: <796kc7$oh0$1@nnrp1.dejanews.com>
Hi,
I am a beginner in PERL.
I have Drop-Down Menu in HTML language like this.
<select name="D1" size="1">
<option value="1">a</option>
<option value="2">b</option>
</select>
Depending on user`s choice, D1 variable receives value "1" or "2";
I can insert this HTML code into PERL program
but how I can test user`s choice in PERL program? (D1 is not variable but must
be with $ ). Can I use $D1 instead of D1?
Please respond via email.
Thank you for help.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 02 Feb 1999 01:31:00 -0500
From: alfonso de la guarda <alfonsdg@medialabsperu.com>
Subject: Re: How to get Perl for Red Hat Linux 5.2?
Message-Id: <36B69BA4.C7B638AA@medialabsperu.com>
Perls is installed by default, however you can check using the RPM manage=
r a
find perl. The apache works with perl without any problem and if you don=
=B4t
change the conf archives for httpd
Franky wrote:
> Hi, I've just installed Linux 5.2 (red hat) and would like to know how =
I can
> get Perl for Appache installed... I'm new to setting up my own web serv=
er so
> I'd appreciate any help I can get... I would like to know where to get =
it
> how to install and set it up, thanks.
>
> Franky
------------------------------
Date: 02 Feb 1999 09:09:05 +0100
From: JVromans@Squirrel.nl (Johan Vromans)
Subject: Re: How to support both short and long option styles?
Message-Id: <wl3vhhlkz1a.fsf@plume.nl.compuware.com>
abigail@fnx.com (Abigail) writes:
> But even with 2.19, neither setting "bundling", nor setting
> "bundling_override" recognizes "-f" and "-s" as valid options. *Without*
> any of those settings, "-f" and "-s" are recognized.
True. bundling (and bundling_override) do not combine very well with
autoabbrev. You can obtain the desired effect by adding one-character
alternatives (e.g. "f" for "force"), like this:
#!/usr/local/bin/perl -w
use strict;
use Getopt::Long;
Getopt::Long::Configure ("bundling_override");
GetOptions ("force|f" => \my $force,
"state|s=s" => \my $state,
"d" => \my $d,
"v" => \my $v);
if (defined $force) {print "Force option present.\n";}
if (defined $state) {print "State option present (value = $state)\n";}
if (defined $d) {print "D option present\n";}
if (defined $v) {print "V option present\n";}
But you must be careful, since it can become quite confusing for the
end user. Personally I would advice to use "bundling", not
"bundling_override". This will allow -f -s -d -v (and combinations),
but require --f --fo --for --force etc. for long names.
Hope this helps,
Johan
------------------------------
Date: Tue, 02 Feb 1999 11:40:16 +0100
From: Martin Baur <martin.baur@mindpower.com>
Subject: Looking for Freelance Perl Programmers
Message-Id: <36B6D610.7E44185C@mindpower.com>
Hi
We are using Interhop, the so-called industry standard for Internet
shops. There, we need some constant Perl supporting programmer. Anyone
interested? No need to be at our place. All necessary things are
accessible from the Internet. Workload about 40%-80%, sometimes 100% if
a Perl intensive project is underway.
Please mail with $/h wishes and availability time frames. OUr location
is Switzerland, so Swiss or German guys are very welcome. Others too,
but without the change to ever meet them .. :-)
Read you!
--
MindPower
EDV-Dienste
__________________________________________________________
Internet-Mail: martin.baur@mindpower.com.xyz
Internet (biz): http://www.mindpower.com
Internet (priv): http://www.mindpower.com/mb-es (german)
PGP-Key: http://www.mindpower.com/pgp.htm
Voice: +41-1-687 11 66
__________________________________________________________
Visit and join our Web-based BBS! If you're pleased, why
not run your own? We're happy to get into contact! Try:
http://www.mindpower.com/scripts/dbh.isa/EnterBBS?d=6931
__________________________________________________________
To prevent SPAM: When mailing to us, remove xyz first!
------------------------------
Date: Mon, 1 Feb 1999 23:07:21 -0800
From: "Ion Chalmers Freeman" <ion@aroma.com>
Subject: Re: maths-tutor in perl-cgi
Message-Id: <36b6a024.0@news.prostar.com>
George,
Pick up a copy of _The _Perl _Cookbook
(http://www.oreilly.com/catalog/cookbook/). It may lend you some
inspiration. It's got a chapter on CGI, and three more on other Internet
programming aspects. I don't own a copy of _CGI _Programming _On _The _World
_Wide Web (http://www.oreilly.com/catalog/cgi/,) as I don't do CGI, but you
may find it useful.
You may also want to familiarize yourself with these:
http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
ion
****
George Stefanidis wrote in message <36B6428B.72FF@mcmail.com>...
i have been assigned a project of creating in a web site a maths-tutor
using cgi-perl . i need some help about sources and addresses where can
i find examples . THANK you.
------------------------------
Date: Tue, 2 Feb 1999 01:30:31 -0500
From: "news1.coastalnet.com" <nospam@aol.com>
Subject: MIME converted to text
Message-Id: <TXwt2.402$rU3.725@news3.ispnews.com>
What would be the quickest way to convert a MIME message to plain text using
PERL? Do all MIME messages the use HTML type, have a copy of the text in
the Content:Text/plain section as well as in HTML? Or do only some E-mail
programs do this? If so then I could just cut the HTML section and not try
to convert it.
I can use the MIME tools but they seem a bit over kill for reducing messages
down to text or just leaving the text?
I would love to convert a MIME message to plain text, no HTML, no attached
binaries.
Thanks in advance!!!
gibbs (at) cheerful.com
------------------------------
Date: Mon, 01 Feb 1999 20:57:23 -0600
From: Rich Miller <rchmllr@ix.netcom.com>
Subject: perl -S not parsing $PATH consistently
Message-Id: <36B66993.9C0C1948@ix.netcom.com>
Under both the Korn and Bourne shells, the $PATH environment variable
can be
set to include the current directory in any of the following four ways:
PATH=:/bin:/usr/bin; export PATH (a leading colon)
PATH=/bin::/usr/bin; export PATH (two consecutive colons)
PATH=/bin:.:/usr/bin; export PATH (an explicit reference to .)
PATH=/bin:/usr/bin:; export PATH (a trailing colon)
When I run perl with the -S switch, however, it only recognizes the
first
three of these syntax variations as including the current directory.
For
example, if I create two scripts foo and bar in the same directory:
foo:
#!/bin/ksh
echo "found foo"
/usr/bin/perl -S bar
bar:
print "found bar\n";
and then execute foo from that directory without a qualifying pathname
and
with $PATH set to any of the first three variations, I get the expected
result:
>foo
found foo
found bar
>
If I set $PATH to the fourth variation (with the trailing colon),
however,
I get some variant (depending on the flavor of Unix) of the following:
>foo
found foo
Can't execute bar
>
I've tested this with Perl 5.004 under Linux and Solaris, and with Perl
4.0.1.7 under HP-UX, and found the same behavior everywhere. Is this a
bug,
or is there some reason the trailing colon syntax isn't recognized by
the
perl interpreter while all the others are?
Rich Miller
rchmllr@ix.netcom.com
richard.a.miller@nmb.norwest.com
------------------------------
Date: Mon, 01 Feb 1999 22:36:44 -0800
From: "Andrey L. Abramov" <abramov@pacbell.net>
Subject: Perl way of getting HWND (in win32)
Message-Id: <36B69CFB.E505CFF@pacbell.net>
I need to call a function in a Win32 DLL (i know how to do that).
The function requires an hwnd (window handler) as a parameter.
How do I get a window handler (hwnd) of ANY (at all) window
in a Perl program?
How can I get it? There has to be a way........
Help!!!
Please!
--
--
===================================================================
Andrey L. Abramov | "Try not. Do.
MBA'97, Stanford Graduate School Of Business | Or do not.
mailto:abramoa@leland.stanford.edu | There is no 'try'".
Phone: (650)947-8827 | - Yoda
=====================================================================
------------------------------
Date: Tue, 02 Feb 1999 09:28:17 +0000
From: Matt Sergeant <matthew.sergeant@eml.ericsson.se>
Subject: Re: Proposed module: GTK_Dialog
Message-Id: <36B6C531.F84D0E56@eml.ericsson.se>
Alistair Cunningham wrote:
>
> Dear All,
> As part of my degree project, I have to implement a dialog
> entry system that reads data supplied by a user and enters it into an
> SQL database. This must be scriptable - ie. users of my system must be
> allowed to easily modify the form. It should run under X.
>
> The obvious solution is to use a general purpose dialog module. None
> seem to exist for any X toolkit. Could anyone point me towards one?
>
> If, as I suspect, none exist, I intend to create one using GTK.pm
> Details are not finalised yet, but I'd like to put in the following
> features:
My suggestion would be to not re-invent the wheel. Besides there being
the widely used Tk module, there's also a Qt interface, and a GTK
interface that uses XML to describe the GUI - the GTK one is on CVS at
gnome.org.
--
<Matt email="matt@teamamiga.org" />
| Fastnet Software Ltd | Perl in Active Server Pages |
| Perl Consultancy, Web Development | Database Design | XML |
| http://come.to/fastnet | Information Consolidation |
------------------------------
Date: 2 Feb 1999 09:38:18 GMT
From: r28874@email.sps.mot.com (Christian Murphy)
Subject: strange fork/pipe open behaviour
Message-Id: <796h2a$f4s$1@newsgate.sps.mot.com>
When I run this test program I expect it to print numbers from 0 upwards
until I kill it. In fact, Perl 5.004_04 prints the following:
0
close: $? = 13 $! = at ./x.pl line 10.
Perl 5.005_51 prints just a line of garbage. Both versions die without
generating any more output.
I realise that opening a pipe/fork and never reading from it is a strange
thing to do. (Uncommenting just the line that reads from TEST is enough
to make version 5.004_04 to behave as expected.)
When this came up on an internal newsgroup, the speculation was that
the number 13 refers to SIGPIPE and the pipe was being closed before
the child could write to it. But perl close() should wait() for the
child according to perlfunc (and call waitpid() according to util.c).
Comments, anybody?
#!/usr/local/bin/perl -w
use strict;
undef $/;
$| = 1;
for (my $i=0; ; $i++) {
print "$i\n";
open(TEST,"ls|") or die "open: $!";
# my $list = <TEST>;
# print $list;
close(TEST) or die "close: \$? = $? \$! = $!";
}
Regards,
-christian
------------------------------
Date: Mon, 01 Feb 1999 23:54:19 -0500
From: Benjamin Holzman <bholzman@earthlink.net>
Subject: Re: Trouble compiling Perl 5.005_2 with Apache on FreeBSD 3.0 dual Pentium IIs
Message-Id: <36B684FB.C6788F80@earthlink.net>
[cc'ed to author]
Nick Tonkin wrote:
>
> Hey
>
> Has anybody had success compiling the new Perl 5.005 (whatever rev) on
> FreeBSD 3.0 on a dual processor Pentium machine? This has failed on
> all machines tested for us.
> Many modules, including the Apache modules, also fail to compile with
> tons of fatal library errors.
Like we say on #perl,
> purl, doesn't work?
<purl> Look buddy, doesn't work is a strong statement. Does it sit on
the couch all day? Does it want more money? Is it on IRC all the
time? Please be specific!
If you have trouble building perl, please send a report to
perlbug@perl.com, giving all relevant information, including the exact
output from make, the output of uname -a and the version number of the
compiler you're using, and anything else useful which I forgot to
mention.
Benjamin Holzman
------------------------------
Date: 2 Feb 1999 09:12:07 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: Visual Perl?
Message-Id: <796fh7$5qt@bgtnsc02.worldnet.att.net>
>>Yeah, this reminds me of a popular program called GirlFriend
1.0. It
>>doesn't always know what you want either. But then again, I
don't think
>>it is a Perl Script.
>
>My license expired :(
Hmm.. obviously, you didn't agree with the licensing terms. Too
bad MS didn't make Girlfriend, or you could get your money back.
:)
CT
------------------------------
Date: Tue, 2 Feb 1999 13:15:58 +0700
From: "Robert White" <richly@samart.co.th>
Subject: What characters are illegal in referer strings?
Message-Id: <796585$3fr$1@chatta.samart.co.th>
I have a tracker cgi that gives me referrer information,
operating system, screen and such. Works well but
I'd like to make it easier to parse the Log files that it
writes to as the present regex is a bit too complex.
I'd like to do a split on each line, simplest solution,
so what I need is a character on which to split.
Character should be illegal within a URL or within
the REFERER string, which could include search engine
form data, launches from email, or newsgroups.
Suggestions for something safe?
This has probably been asked before but couldn't find
it and RFC 2068 didn't help much, ah well ;-)
Robert
http://members.xoom.com/robertmwhite/
------------------------------
Date: 2 Feb 1999 09:30:59 GMT
From: "David Richards" <david.richards@alderley.zeneca.com>
Subject: Re: win32 perflib and processor statistics
Message-Id: <01be4e8e$c18e3ec0$55a0479c@UKMCPHISFW051.ukmcph.zeneca.com>
Jeff
Have a look at COUNTERS.HLP (counter types) in the NTRESKIT\CNTRTOOL
installation.
David
Jeff Beitzel <cheetah@epix.net> wrote in article
<795o70$nto$1@news1.epix.net>...
> I'm trying to tie into the performance monitor objects for the win32
version
> of perl by using the perflib module.
> documentation mentions about different return types and the need for
> calculation for the real result, unfortuntantly I can't seem to find the
> documentation on what these calculations are.
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 4803
**************************************