[18281] in Perl-Users-Digest
Perl-Users Digest, Issue: 449 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Mar 9 00:07:04 2001
Date: Thu, 8 Mar 2001 21:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <984114310-v10-i449@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 8 Mar 2001 Volume: 10 Number: 449
Today's topics:
Re: ASP in Perl <mischief@velma.motion.net>
Re: ASP/PerlScript - Database Connection Problem <mischief@velma.motion.net>
Re: ASP/PerlScript - Database Connection Problem (Miguel Cruz)
Can a regex do this? <blah@blah.com>
Re: Can a regex do this? <wyzelli@yahoo.com>
Re: Can a regex do this? <blah@blah.com>
Re: Can a regex do this? (Sam Holden)
Re: Can a regex do this? <blah@blah.com>
Re: Can a regex do this? (Sam Holden)
Re: Can a regex do this? (Tad McClellan)
Re: Can a regex do this? <blah@blah.com>
Re: Can a regex do this? <blah@blah.com>
Re: Count matches? <c_clarkson@hotmail.com>
Re: eval "..." security problem <mischief@velma.motion.net>
execution problem <wleung@engin.umich.edu>
Re: Free Linux account NO-jkstark-SPAM@freenet.nether.net
Hidden URL <hilda@invopower.com>
Re: How to convert morse to ascii using perl? <johnlin@chttl.com.tw>
Re: How to gret rid of Warning message? "Value of <HAND (Martin Vorlaender)
Re: Newbies welcome <justin@indent.com.au>
Re: Newbies welcome <raman@raman-sinha.com>
Re: Perl fortune database - where? (was: Dynamic naming (David H. Adler)
Re: PERL PROGRAMERS OFFERING (FROM ITALY) (David H. Adler)
Re: Pine compatible Perl mailbox module? <tony_curtis32@yahoo.com>
Re: Programmer with vision required (David H. Adler)
Running ActiveState scripts fully in background on NT (Matthew Byrd)
Re: Running ActiveState scripts fully in background on <wyzelli@yahoo.com>
Re: Skilled discussion: Multiple inheritance (MI) of at <uri@sysarch.com>
Re: Tk based alarm clock <sun_tong_001@yahoo.com>
Re: What information can I get from a GLOB reference? <johnlin@chttl.com.tw>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 09 Mar 2001 02:52:47 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: ASP in Perl
Message-Id: <taghbvs141k532@corp.supernews.com>
Hernux <hernux@etherac.com.ar> wrote:
> I mean Session vars,
> like
> if (!Session("loginOK")){
> &CheckLogin;
> }
You're looking to use Perl to write CGI applications. While
Perl is not the only language in which you can write CGI,
and CGI is but a tip of the iceberg that is Perl, the two
do form a popular duo.
What you want to do is to use something like the CGI.pm
module (standard part of the distribution for reasonable
values of Perl) to read a form, use a module that interfaces
to an authentication system to do authentication, and use
any other of the myriad modules on CPAN to do other things.
Or, if you're bound to Windows, IIS, FrontPage Extensions,
etc., then you can use Perl-based CGI programs in conjunction
with ASP. I wish you great luck finding help, though, when
you ask an ASP group how to mate it to Perl or a Perl group
how to mate it to ASP. There will be help available in both
camps, I'm sure, but not nearly as much as one or the other
alone, since I don't know of many people who use them
together.
Chris
--
Christopher E. Stith
The purpose of a language is not to help you learn the
language, but to help you learn other things by using the
language. --Larry Wall, The Culture of Perl, August 1997
------------------------------
Date: Fri, 09 Mar 2001 03:12:57 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: ASP/PerlScript - Database Connection Problem
Message-Id: <tagihp3lnb5719@corp.supernews.com>
John Brown <junk@spam.com> wrote:
> Hi,
> I've got an ASP page, and am trying to use PerlScript to access a database
> with a DSN-less connection.
It seems you've been mislead by marketing hype. PerlScript is
not Perl, just like JavaScript (now INScript) is not Java. It
therefore is not topical in the comp.lang.perl.* family of
newsgroups. Perhaps Microsoft or ActiveState has a place for
you to ask for help, although I'm not sure what those are.
I'm not posting this to be rude, but it does help the group
if we only get posts that are topical. I'm glad you got it
working.
Chris
--
Christopher E. Stith
Parking for people we like only. All other vehicles will be vandalized.
------------------------------
Date: Fri, 09 Mar 2001 04:35:41 GMT
From: mnc@admin.u.nu (Miguel Cruz)
Subject: Re: ASP/PerlScript - Database Connection Problem
Message-Id: <x4Zp6.1044$8I5.680100@typhoon2.ba-dsg.net>
John Brown <junk@spam.com> wrote:
> I've got an ASP page, and am trying to use PerlScript to access a database
> with a DSN-less connection.
Not to be difficult, but what is "PerlScript"? I occasionally hear Windowsy
people using this word. Is it a Windowsification of the word "perl"? Or is
it a different product?
miguel
------------------------------
Date: Thu, 08 Mar 2001 20:39:03 -0600
From: blahblah <blah@blah.com>
Subject: Can a regex do this?
Message-Id: <2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com>
I am looking for a regex that will do two replacements on the same
line. For example:
$test = "test1 test2 test3";
$test =~ s/1/a/g;
$test =~ s/2/b/g;
$test =~ s/3/c/g;
print $test;
The effect is that 1, 2 and 3 will be changed to a, b and c.
Can this be done on the same line?
Thanks for any input, regexes are cool!
------------------------------
Date: Fri, 9 Mar 2001 12:40:28 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Can a regex do this?
Message-Id: <SEXp6.24$Cy2.5051@vic.nntp.telstra.net>
"blahblah" <blah@blah.com> wrote in message
news:2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com...
> I am looking for a regex that will do two replacements on the same
> line. For example:
>
> $test = "test1 test2 test3";
> $test =~ s/1/a/g;
> $test =~ s/2/b/g;
> $test =~ s/3/c/g;
> print $test;
>
> The effect is that 1, 2 and 3 will be changed to a, b and c.
>
> Can this be done on the same line?
>
Perfect use for tr///
$test = "test1 test2 test3";
$test =~ tr/123/abc/;
print $test;
Wyzelli
--
push@x,$_ for(a..z);push@x,' ';
@z='092018192600131419070417261504171126070002100417'=~/(..)/g;
foreach $y(@z){$_.=$x[$y]}y/jp/JP/;print;
------------------------------
Date: Thu, 08 Mar 2001 21:26:06 -0600
From: blahblah <blah@blah.com>
Subject: Re: Can a regex do this?
Message-Id: <e9jgatsf4s3gv9kgoc2sbo2erbv6jrmsnn@4ax.com>
On Fri, 9 Mar 2001 12:40:28 +0930, "Wyzelli" <wyzelli@yahoo.com>
wrote:
>"blahblah" <blah@blah.com> wrote in message
>news:2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com...
>> I am looking for a regex that will do two replacements on the same
>> line. For example:
>>
>> $test = "test1 test2 test3";
>> $test =~ s/1/a/g;
>> $test =~ s/2/b/g;
>> $test =~ s/3/c/g;
>> print $test;
>>
>> The effect is that 1, 2 and 3 will be changed to a, b and c.
>>
>> Can this be done on the same line?
>>
>
>Perfect use for tr///
>
>$test = "test1 test2 test3";
>$test =~ tr/123/abc/;
>print $test;
>
>Wyzelli
OK... but can it be done with s///?
------------------------------
Date: 9 Mar 2001 03:33:30 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Can a regex do this?
Message-Id: <slrn9agjoa.2cp.sholden@pgrad.cs.usyd.edu.au>
On Thu, 08 Mar 2001 21:26:06 -0600, blahblah <blah@blah.com> wrote:
>On Fri, 9 Mar 2001 12:40:28 +0930, "Wyzelli" <wyzelli@yahoo.com>
>wrote:
>
>>"blahblah" <blah@blah.com> wrote in message
>>news:2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com...
>>> I am looking for a regex that will do two replacements on the same
>>> line. For example:
>>>
>>> $test = "test1 test2 test3";
>>> $test =~ s/1/a/g;
>>> $test =~ s/2/b/g;
>>> $test =~ s/3/c/g;
>>> print $test;
>>>
>>> The effect is that 1, 2 and 3 will be changed to a, b and c.
>>>
>>> Can this be done on the same line?
>>>
>>
>>Perfect use for tr///
>>
>>$test = "test1 test2 test3";
>>$test =~ tr/123/abc/;
>>print $test;
>>
>>Wyzelli
>
>OK... but can it be done with s///?
%mapping = ( 1 => 'a', 2 => ' b', 3 => 'c');
$test =~ s/([123])/$mapping{$1}/g;
--
Sam
comments on data are usually much more helpful than on algorithms
--Rob Pike
------------------------------
Date: Thu, 08 Mar 2001 21:44:23 -0600
From: blahblah <blah@blah.com>
Subject: Re: Can a regex do this?
Message-Id: <65kgatchf3dga5qj1596os0e8p2k0o4pqg@4ax.com>
On 9 Mar 2001 03:33:30 GMT, sholden@pgrad.cs.usyd.edu.au (Sam Holden)
wrote:
>On Thu, 08 Mar 2001 21:26:06 -0600, blahblah <blah@blah.com> wrote:
>>On Fri, 9 Mar 2001 12:40:28 +0930, "Wyzelli" <wyzelli@yahoo.com>
>>wrote:
>>
>>>"blahblah" <blah@blah.com> wrote in message
>>>news:2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com...
>>>> I am looking for a regex that will do two replacements on the same
>>>> line. For example:
>>>>
>>>> $test = "test1 test2 test3";
>>>> $test =~ s/1/a/g;
>>>> $test =~ s/2/b/g;
>>>> $test =~ s/3/c/g;
>>>> print $test;
>>>>
>>>> The effect is that 1, 2 and 3 will be changed to a, b and c.
>>>>
>>>> Can this be done on the same line?
>>>>
>>>
>>>Perfect use for tr///
>>>
>>>$test = "test1 test2 test3";
>>>$test =~ tr/123/abc/;
>>>print $test;
>>>
>>>Wyzelli
>>
>>OK... but can it be done with s///?
>
>%mapping = ( 1 => 'a', 2 => ' b', 3 => 'c');
>$test =~ s/([123])/$mapping{$1}/g;
I'm starting to lose faith... is there no way to do it all in one
line? I thought maybe an anchor or something could map a match to a
replacement.
------------------------------
Date: 9 Mar 2001 04:13:31 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Can a regex do this?
Message-Id: <slrn9agm3a.2ic.sholden@pgrad.cs.usyd.edu.au>
On Thu, 08 Mar 2001 21:44:23 -0600, blahblah <blah@blah.com> wrote:
>On 9 Mar 2001 03:33:30 GMT, sholden@pgrad.cs.usyd.edu.au (Sam Holden)
>wrote:
>
>>On Thu, 08 Mar 2001 21:26:06 -0600, blahblah <blah@blah.com> wrote:
>>>On Fri, 9 Mar 2001 12:40:28 +0930, "Wyzelli" <wyzelli@yahoo.com>
>>>wrote:
>>>
>>>>"blahblah" <blah@blah.com> wrote in message
>>>>news:2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com...
>>>>>
>>>>> The effect is that 1, 2 and 3 will be changed to a, b and c.
>>>>>
>>>>> Can this be done on the same line?
>>>>>
>>>>
>>>>$test =~ tr/123/abc/;
>>>
>>>OK... but can it be done with s///?
>>
>>%mapping = ( 1 => 'a', 2 => ' b', 3 => 'c');
>>$test =~ s/([123])/$mapping{$1}/g;
>
>I'm starting to lose faith... is there no way to do it all in one
>line? I thought maybe an anchor or something could map a match to a
>replacement.
$test =~ s/([123])/{1 => 'a', 2 => ' b', 3 => 'c'}->{$1}/ge;
But that would be a pretty silly way of doing it. Why not just:
%m=( 1 => 'a', 2 => ' b', 3 => 'c');$test =~ s/([123])/$m{$1}/g;
If one line is so important...
--
Sam
PC's are backwards ... throw them out! Linux is ok though.
--Rob Pike (on the subject of CR/LF etc)
------------------------------
Date: Fri, 09 Mar 2001 04:20:43 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Can a regex do this?
Message-Id: <slrn9agj6i.g82.tadmc@tadmc26.august.net>
blahblah <blah@blah.com> wrote:
>On 9 Mar 2001 03:33:30 GMT, sholden@pgrad.cs.usyd.edu.au (Sam Holden)
>wrote:
>>On Thu, 08 Mar 2001 21:26:06 -0600, blahblah <blah@blah.com> wrote:
>>>On Fri, 9 Mar 2001 12:40:28 +0930, "Wyzelli" <wyzelli@yahoo.com>
>>>wrote:
>>>
>>>>"blahblah" <blah@blah.com> wrote in message
>>>>news:2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com...
>>>>> I am looking for a regex that will do two replacements on the same
>>>>> line. For example:
>>>>>
>>>>> $test =~ s/1/a/g;
>>>>> $test =~ s/2/b/g;
>>>>> $test =~ s/3/c/g;
>>>>>
>>>>> The effect is that 1, 2 and 3 will be changed to a, b and c.
>>>>>
>>>>> Can this be done on the same line?
Yes.
>>>>Perfect use for tr///
>>>>
>>>>$test = "test1 test2 test3";
>>>>$test =~ tr/123/abc/;
^^^^^^^^^^^
There it is on one line.
>>>>print $test;
>>>>
>>>>Wyzelli
>>>
>>>OK... but can it be done with s///?
>>
>>%mapping = ( 1 => 'a', 2 => ' b', 3 => 'c');
>>$test =~ s/([123])/$mapping{$1}/g;
>
>I'm starting to lose faith...
How come?
>is there no way to do it all in one
>line?
Yes there is a way. Wyzelli has already shown you how. Are you
reading this thread?
In the spirit of TMTOWTDI, here is another one-line way:
$test =~ s/1/a/g; $test =~ s/2/b/g; $test =~ s/3/c/g;
>I thought maybe an anchor or something could map a match to a
>replacement.
Just use tr///
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 08 Mar 2001 22:54:10 -0600
From: blahblah <blah@blah.com>
Subject: Re: Can a regex do this?
Message-Id: <7bogat464ultkou24k7hooobslln6cv2it@4ax.com>
On 9 Mar 2001 04:13:31 GMT, sholden@pgrad.cs.usyd.edu.au (Sam Holden)
wrote:
>On Thu, 08 Mar 2001 21:44:23 -0600, blahblah <blah@blah.com> wrote:
>>On 9 Mar 2001 03:33:30 GMT, sholden@pgrad.cs.usyd.edu.au (Sam Holden)
>>wrote:
>>
>>>On Thu, 08 Mar 2001 21:26:06 -0600, blahblah <blah@blah.com> wrote:
>>>>On Fri, 9 Mar 2001 12:40:28 +0930, "Wyzelli" <wyzelli@yahoo.com>
>>>>wrote:
>>>>
>>>>>"blahblah" <blah@blah.com> wrote in message
>>>>>news:2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com...
>>>>>>
>>>>>> The effect is that 1, 2 and 3 will be changed to a, b and c.
>>>>>>
>>>>>> Can this be done on the same line?
>>>>>>
>>>>>
>>>>>$test =~ tr/123/abc/;
>>>>
>>>>OK... but can it be done with s///?
>>>
>>>%mapping = ( 1 => 'a', 2 => ' b', 3 => 'c');
>>>$test =~ s/([123])/$mapping{$1}/g;
>>
>>I'm starting to lose faith... is there no way to do it all in one
>>line? I thought maybe an anchor or something could map a match to a
>>replacement.
>
>$test =~ s/([123])/{1 => 'a', 2 => ' b', 3 => 'c'}->{$1}/ge;
This does not work because it's utilizing parts of the perl language
and not regexes.
>But that would be a pretty silly way of doing it. Why not just:
>
>%m=( 1 => 'a', 2 => ' b', 3 => 'c');$test =~ s/([123])/$m{$1}/g;
Because that's two lines of code, not one.
Looks like it can't be done!
------------------------------
Date: Thu, 08 Mar 2001 22:55:34 -0600
From: blahblah <blah@blah.com>
Subject: Re: Can a regex do this?
Message-Id: <jfogat08n3fpogqdkfc8fsau9i5jsg1kn7@4ax.com>
On Fri, 09 Mar 2001 04:20:43 GMT, tadmc@augustmail.com (Tad McClellan)
wrote:
>blahblah <blah@blah.com> wrote:
>>On 9 Mar 2001 03:33:30 GMT, sholden@pgrad.cs.usyd.edu.au (Sam Holden)
>>wrote:
>>>On Thu, 08 Mar 2001 21:26:06 -0600, blahblah <blah@blah.com> wrote:
>>>>On Fri, 9 Mar 2001 12:40:28 +0930, "Wyzelli" <wyzelli@yahoo.com>
>>>>wrote:
>>>>
>>>>>"blahblah" <blah@blah.com> wrote in message
>>>>>news:2dggatgkelcs2t0ub7fdst8s9jgrup4c8m@4ax.com...
>>>>>> I am looking for a regex that will do two replacements on the same
>>>>>> line. For example:
>>>>>>
>>>>>> $test =~ s/1/a/g;
>>>>>> $test =~ s/2/b/g;
>>>>>> $test =~ s/3/c/g;
>>>>>>
>>>>>> The effect is that 1, 2 and 3 will be changed to a, b and c.
>>>>>>
>>>>>> Can this be done on the same line?
>
>
>Yes.
>
>
>>>>>Perfect use for tr///
>>>>>
>>>>>$test = "test1 test2 test3";
>>>>>$test =~ tr/123/abc/;
> ^^^^^^^^^^^
>
>There it is on one line.
>
>
>>>>>print $test;
>>>>>
>>>>>Wyzelli
>>>>
>>>>OK... but can it be done with s///?
>>>
>>>%mapping = ( 1 => 'a', 2 => ' b', 3 => 'c');
>>>$test =~ s/([123])/$mapping{$1}/g;
>>
>>I'm starting to lose faith...
>
>
>How come?
>
>
>>is there no way to do it all in one
>>line?
>
>
>Yes there is a way. Wyzelli has already shown you how. Are you
>reading this thread?
Are you? I responded to him. He used perl, not a pure regex.
>
>In the spirit of TMTOWTDI, here is another one-line way:
>
> $test =~ s/1/a/g; $test =~ s/2/b/g; $test =~ s/3/c/g;
Again, that's not one line of code.
>
>
>>I thought maybe an anchor or something could map a match to a
>>replacement.
>
>
>Just use tr///
------------------------------
Date: Thu, 8 Mar 2001 21:10:27 -0600
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: Count matches?
Message-Id: <933985AE09DB9DFA.A21A44956B99CCD5.BBF891C23D7CB454@lp.airnews.net>
<emelin@my-deja.com> wrote
: foreach ...whatever... {
: if ...whatever... {
: print $match;
: }
: }
:
:
: Can I somehow count the number of matches???
Yes you can. You need to determine a few things first.
- Look at your data set. How do you define an 'item'?
- What constitues a match? Is case important?
HTH,
Charles K. Clarkson
my $matches = grep $_ eq $possible_match, @data;
------------------------------
Date: Fri, 09 Mar 2001 03:02:19 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: eval "..." security problem
Message-Id: <taghtr147faf61@corp.supernews.com>
David Bakhash <cadet@alum.mit.edu> wrote:
> Hi,
Hullo.
> The problem is program extensibility. If you're writing an
> application in Perl, or in any language that's expressive --
> especially one with an interpretive nature to it, with constructs like
> eval() -- you might consider that the ultimate provision for extension
> would stem from allowing the user to write native application code
> (e.g. in Perl for a Perl application, Common Lisp for a CL
> application, etc. for Python). It might work as follows:
I agree with the others who say to look into Safe.pm, but I also
meed to mention Opcode.pm, which comes with perl, too. Its docs
say it is not normally used directly, and that it can be used
to disable certain opcodes and operator lists.
The docs for Opcode.pm also say to look at Safe.pm for more typical
uses, but you might want the lower-level hooks for how you are trying
to approach the issue. I'd say look at Safe first, then at Opcode if
Safe isn't exactly what you need.
As for browsing the parse tree, it's widely said that only perl can
parse Perl. The B family of modules is meant to help with this, by
letting you use perl to parse Perl and then see the results.
Chris
--
Christopher E. Stith
Disclaimer: Actual product may not resemble picture in ad in any way.
------------------------------
Date: Fri, 09 Mar 2001 05:01:29 GMT
From: "Stephanie" <wleung@engin.umich.edu>
Subject: execution problem
Message-Id: <JsZp6.1311$mI.146570@typhoon.mw.mediaone.net>
Hi,
I'm trying to execute a cgi script in apache written in perl, but when I run
it on the server using './<script_name>' I get a 'No such file or directory'
error. When I type 'perl <script_name>' it runs. I'm fairly sure that apache
was set up correctly, and I've included the path of perl in the first line
of the script, and set it to 755.
Can anybody tell me what's wrong? I'd appreciate it very much.
Thanks,
Stephanie
------------------------------
Date: Fri, 09 Mar 2001 03:57:43 GMT
From: NO-jkstark-SPAM@freenet.nether.net
Subject: Re: Free Linux account
Message-Id: <XwYp6.2966$ws2.179701@ord-read.news.verio.net>
In comp.os.linux.networking Alfred Schetelig <schetelig@web.de> wrote:
> Does anybody know of a free linux account offer on the WEB? Alfred
They may hate me for this one.... Compaq developer alliance... Check out
their site - you'll find more info there...
------------------------------
Date: Fri, 9 Mar 2001 13:23:21 +0800
From: "Hilda" <hilda@invopower.com>
Subject: Hidden URL
Message-Id: <3aa8628a$0$19564@wodc7nh1.news.uu.net>
Hi,
Hoping this is not quite off-topic.
I am now using perl to write some web pages and want to open a new page
without the user knowing the IP and port that shown in the URL...
Is that a way to hide this URL???
eg.
http://123.123.2.4:9999/cgi-bin/test.pl
becomes
http://cgi-bin/test.pl or something else not showing 123.123.2.4:9999
Thanks
Hilda
------------------------------
Date: Fri, 9 Mar 2001 11:38:20 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: Re: How to convert morse to ascii using perl?
Message-Id: <989j4n$ocm@netnews.hinet.net>
"Logan Shaw" wrote
> > LS> @backwards{ values %morse_hash } = keys %morse_hash;
> My way could be a little weird
> if keys %morse_hash is shorter than values %morse_hash
I have a question: can this happen? (keys shorter than values, or vice versa)
Thank you.
John Lin
------------------------------
Date: Fri, 09 Mar 2001 04:24:46 +0100
From: martin@radiogaga.harz.de (Martin Vorlaender)
Subject: Re: How to gret rid of Warning message? "Value of <HANDLE>"
Message-Id: <3aa84cfe.524144494f47414741@radiogaga.harz.de>
[As this has neither to do with modules nor with Tk, Newsgroups & F'up snipped]
Thanh Q Lam (thanh.q.lam@alcatel.com) wrote:
> I keep getting this warning message when I run listChg.pl script
>
> Value of <HANDLE> construct can be "0"; test with defined() at
> ./listChg.pl line 65535.
...
> Do you know how to get rid of that warning message?
>
> See my code in below:
...
> while ($rmstodo = <RMSTODO>)
Change this to
while (defined($rmstodo = <RMSTODO>))
cu,
Martin
--
One OS to rule them all | Martin Vorlaender | VMS & WNT programmer
One OS to find them | work: mv@pdv-systeme.de
One OS to bring them all | http://www.pdv-systeme.de/users/martinv/
And in the Darkness bind them.| home: martin@radiogaga.harz.de
------------------------------
Date: Fri, 09 Mar 2001 04:12:16 GMT
From: Justin French <justin@indent.com.au>
Subject: Re: Newbies welcome
Message-Id: <3AA857F4.33A84172@indent.com.au>
Darren wrote:
> Do not ever be afraid of asking a question on something relevent to the
> newsgroup you are visiting.
> Bear in mind that every single person on any newsgroup was a newbie once, so
> if they slate you for being a newbie then they are hypocrites and should be
> ignored. Do not give up. Everybody learns, even the so called experienced
> though they would often not admit it
Yeah, but consulting the manuals, or searching archives (if they exist)
might help cut dwon the the traffic and abuse.
------------------------------
Date: Fri, 09 Mar 2001 04:44:58 GMT
From: Raman Sinha <raman@raman-sinha.com>
Subject: Re: Newbies welcome
Message-Id: <B6CDBC5D.4FF5%raman@raman-sinha.com>
some people simply don't know *how* to look. sometimes you have to hold a
newbies hand and let them take baby steps. for instance:
i am an asp programmer (not by choice). in asp, to get values for
querystrings you need to do something like this if your querystring looks
like this:
www.mypage.com/thispage.asp?asp=sucks
so in my page to mess with it, i'd do something liek this:
dim asp
howisasp=request.querystring("asp")
(howisasp=sucks now)
BUT the PHP documentation does not remotely go out of it's way to tell you
that PHP AUTOMATICALLY creates a variable who's name is the key and who's
value is the key's value.. very logical (why don't they do this in asp?
because asp sucks) BUT it isn't really mentioned anywhere. = big barrier to
entry. if it weren't for a tiny line somewhere on wired and/or someones
annotation that i barely saw in the documentation i would probably have
given up and said screw it, i'll do the website in asp instead of wasting 4
hours trying to figure it out and reading the docs over and over.
of course, now i'm on my way to php gurudom :)
so go ahead - ask a question. if i can't answer it for you i'll tell you
where you can find the answer in the documentation but you will eventually
learn to be resourceful.
-raman
in article 3AA857F4.33A84172@indent.com.au, Justin French at
justin@indent.com.au wrote on 3/8/01 10:12 PM:
> Darren wrote:
>
>> Do not ever be afraid of asking a question on something relevent to the
>> newsgroup you are visiting.
>> Bear in mind that every single person on any newsgroup was a newbie once, so
>> if they slate you for being a newbie then they are hypocrites and should be
>> ignored. Do not give up. Everybody learns, even the so called experienced
>> though they would often not admit it
>
> Yeah, but consulting the manuals, or searching archives (if they exist)
> might help cut dwon the the traffic and abuse.
------------------------------
Date: 9 Mar 2001 04:54:25 GMT
From: dha@panix2.panix.com (David H. Adler)
Subject: Re: Perl fortune database - where? (was: Dynamic naming of arrays or hashes)
Message-Id: <slrn9agog1.ha8.dha@panix2.panix.com>
On 7 Mar 2001 01:20:48 GMT, Abigail <abigail@foad.org> wrote:
>Ilmari Karonen (iltzu@sci.invalid) wrote on MMDCCXLIV September MCMXCIII
>in <URL:news:983921608.13251@itz.pp.sci.fi>:
>`' In article <u93dcqokti.fsf@wcl-l.bham.ac.uk>, nobull@mail.com wrote:
>`' >
>`' >OK, who's maintaining a Perl "fortune" database? That's gotta be
>`' >worthy:
>`' >
>`' >[Elimitiating symrefs so you can "use strict"]... is a little like
>`' >saying you have decided to stop setting your furniture on fire,
>`' >because you want to be able to turn your smoke alarms back on.
>`' > -- Mark Jason Dominus in c.l.p.misc
>`'
>`' If someone wants to compile a proper database, allow me to contribute my
>`' collection of comp.lang.perl.m* sigquotes:
and, in case anyone cares, my sigfile has a number of perlish things in
it as well: http://www.panix.com/~dha/randsig.html
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Indeed. I don't know what I was thinking, far less what I was
testing. Anno Siegel
------------------------------
Date: 9 Mar 2001 03:27:02 GMT
From: dha@panix6.panix.com (David H. Adler)
Subject: Re: PERL PROGRAMERS OFFERING (FROM ITALY)
Message-Id: <slrn9agjc6.aoa.dha@panix6.panix.com>
On Thu, 8 Mar 2001 20:48:21 +0100, Federico Bari wrote:
>We offer our experience as Perl, CGI, HTML programers for the realization of
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently to
"news.announce.newusers", you might have already known this. :) (If
n.a.n is quieter than it should be, the relevent FAQs are available at
http://www.faqs.org/faqs/by-newsgroup/news/news.announce.newusers.html)
Another good source of information on how Usenet functions is
news.newusers.questions (information from which is also available at
http://www.geocities.com/nnqweb/).
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
America leads the world in shocks.
- Gil Scott-Heron
------------------------------
Date: 08 Mar 2001 20:05:37 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Pine compatible Perl mailbox module?
Message-Id: <87ofvb8zny.fsf@limey.hpcc.uh.edu>
>> On Fri, 09 Mar 2001 02:01:04 GMT,
>> Kirk Is <kisrael@andante.eecs.tufts.edu> said:
> Is there a Perl module available that lets you perform
> basic mailbox tasks (get headers, read message, delete
> message, mark message as read) in such a way that Pine
> will understand what you were trying to do? (i.e. if you
> try to read a message with "mail", Pine balks a bit and
> moves it to the first message, or maybe mail does that.)
http://search.cpan.org/
enter something obvious, like "mail".
hth
t
--
The avalanche has already started.
It is too late for the pebbles to vote.
------------------------------
Date: 9 Mar 2001 03:33:10 GMT
From: dha@panix6.panix.com (David H. Adler)
Subject: Re: Programmer with vision required
Message-Id: <slrn9agjnm.aoa.dha@panix6.panix.com>
On Thu, 8 Mar 2001 16:41:05 -0500, Fred Srock wrote:
>
>We are currently searching for an individual who
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently to
"news.announce.newusers", you might have already known this. :) (If
n.a.n is quieter than it should be, the relevent FAQs are available at
http://www.faqs.org/faqs/by-newsgroup/news/news.announce.newusers.html)
Another good source of information on how Usenet functions is
news.newusers.questions (information from which is also available at
http://www.geocities.com/nnqweb/).
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
There is a Perl Jobs Announce list that may be more helpful to you. See
<http://www.pm.org/mailing_lists.shtml> for details.
*And* you posted to multiple groups individually instead of
crossposting. Not a good thing.
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Trust the computer industry to shorten the term "Year 2000" to Y2K.
It was this kind of thinking that got us in trouble in the first
place. - Adrian Tyvand
------------------------------
Date: Fri, 09 Mar 2001 02:28:40 GMT
From: mbyrd@clark.net (Matthew Byrd)
Subject: Running ActiveState scripts fully in background on NT
Message-Id: <sdXp6.20814$Sl.925084@iad-read.news.verio.net>
Hello All,
I am trying to fire off scripts in the background on ActiveState under NT. The
problem is that a newly-spawned script will create a console window on the
server for a period, interfering with operations at the console, even on
scripts with all filehandles directed to /dev/null. I thought that the
"exetype" program might stop this command-window creation, but it does not seem
to help (i.e. - "exetype perlbg.exe windows"). Also, ISAPI does not appear to
be an option, at first glance. Does anyone know how to get around this, or
know what I might be doing wrong ?
TIA,
- Matt
------------------------------
Date: Fri, 9 Mar 2001 12:23:08 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Running ActiveState scripts fully in background on NT
Message-Id: <CoXp6.21$Cy2.5019@vic.nntp.telstra.net>
"Matthew Byrd" <mbyrd@clark.net> wrote in message
news:sdXp6.20814$Sl.925084@iad-read.news.verio.net...
> Hello All,
>
> I am trying to fire off scripts in the background on ActiveState under
NT. The
> problem is that a newly-spawned script will create a console window on
the
> server for a period, interfering with operations at the console, even
on
> scripts with all filehandles directed to /dev/null. I thought that
the
> "exetype" program might stop this command-window creation, but it does
not seem
> to help (i.e. - "exetype perlbg.exe windows"). Also, ISAPI does not
appear to
> be an option, at first glance. Does anyone know how to get around
this, or
> know what I might be doing wrong ?
>
There is a FAQ in Activestate's docs which talks about running Perl
scripts as a service. May help.
Wyzelli
--
@x='07411711511603209711011111610410111403208010111410803210409709910710
1114'=~/(...)/g;
print chr for @x;
------------------------------
Date: Fri, 09 Mar 2001 04:22:39 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Skilled discussion: Multiple inheritance (MI) of attributes in perl ?! [Invited to comment on this code]
Message-Id: <x7ofvbd10w.fsf@home.sysarch.com>
read object oriented perl. you might learn something from the expert on
it, damian conway. in particular read chapter 6 on perl's inheritance.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 08 Mar 2001 22:44:39 -0400
From: * Tong * <sun_tong_001@yahoo.com>
Subject: Re: Tk based alarm clock
Message-Id: <sa8g0gny82w.fsf@sun_tong_001.personal.yahoo.com>
"Tom Wilkason" <tom.wilkason@home.com> writes:
> "* Tong *" <sun_tong_001@yahoo.com> wrote in message
> news:sa8ofvcxhiv.fsf@sun_tong_001.personal.yahoo.com...
> | Hi,
> |
> | I'm planing to write a Tk based alarm clock, and make it open source
> | tool for the public. So the first thing I have to make sure is that
> | there's not such a thing out there. My research is enclosed at the
> | end of this email.
> | [...]
> | FYI, when I say alarm clock, I mean something you can set a time
> | with, and when the time goes off, it pop up and window with the
> | message and sound a alarm sound... When I say Tk based, I mean
> | either Tcl/Tk or Perl/Tk. I'm going to write it in Perl/Tk though.
> |
>
> I think you will find this to be an easy (and fun) task. If you
> are using Tcl/Tk, you can look at
> http://mini.net/cgi-bin/wikit/1011.html for a sample analog clock
> (of course digital is trivial).
Wow, knew tck/tk is powerful but never imaged that an analog clock
would be so simple... I guess the VB and Java swing programmer
would be blew away. :-)
It's really nice, but I wasn't ready to go this fancy yet. All what
I want, as the first version, is something that can let me *set* the
alarm for it to go off... anything out there can do this?
--
Tong (remove underscore(s) to reply)
http://members.xoom.com/suntong001/
- All free contribution & collection & music from the heavens
------------------------------
Date: Fri, 9 Mar 2001 11:33:57 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: Re: What information can I get from a GLOB reference?
Message-Id: <989isj$n9c@netnews.hinet.net>
"Jerome Abela" wrote
> John Lin wrote:
> > Although it can compile and run, I think it is not what I want.
> > How can I get the valid keys of *foo{THING} here?
>
> perlref answers:
>
> *foo{THING} returns a reference to the THING slot in *foo (which
> is the symbol table entry which holds everything known as foo).
>
> $scalarref = *foo{SCALAR};
> $arrayref = *ARGV{ARRAY};
> $hashref = *ENV{HASH};
> $coderef = *handler{CODE};
> $ioref = *STDIN{IO};
> $globref = *foo{GLOB};
>
Thank you. I mean, the syntax of using 'keys' here.
print map {"[$_]"} keys %{*{$fh}}; # Of course this doesn't work
__END__
[SCALAR][ARRAY][HASH][CODE][IO][GLOB]
Any ideas? Thank you.
John Lin
------------------------------
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 V10 Issue 449
**************************************