[18589] in Perl-Users-Digest
Perl-Users Digest, Issue: 757 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 24 21:05:31 2001
Date: Tue, 24 Apr 2001 18:05:09 -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: <988160709-v10-i757@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 24 Apr 2001 Volume: 10 Number: 757
Today's topics:
B::Xref - better to exclude system modules <johnlin@chttl.com.tw>
Re: Can I include local perl snipits? <xris@dont.send.spam>
Execute command within the script <leongyc@tp.edu.sg>
Re: fakessi (Si Ballenger)
Re: How capture PID's a la "ps" <bzelitc@attglobal.net>
How to send a URL to Win32 so it opens with the default <none@nope.net>
Re: How to send a URL to Win32 so it opens with the def (Jay Tilton)
Language resources? (was Re: Perl Fehler bei Scriptaus <tshinnic@io.com>
Re: Language resources? (was Re: Perl Fehler bei Scrip <comdog@panix.com>
Looking for a print friendly perl script <newuser@nospam.slip.net>
Re: MQSeries on HP-UX 11 + Oracle <sbaldwin@bigpond.net.au>
Net::TCP or other (easyish) sockets manipulation <tom@gtonline.net>
Re: operators: != vs. ne, strange behaviour <ren@tivoli.com>
Re: operators: != vs. ne, strange behaviour <comdog@panix.com>
Re: Pass variables from one script to another? <mischief@velma.motion.net>
Re: Perl Fehler bei Scriptausführung (Anno Siegel)
Re: Perl Threads <dan@tuatha.sidhe.org>
Re: regexp matching with optional part (Abigail)
Re: regexp matching with optional part <ren@tivoli.com>
Re: So what do YOU use Perl for? (Abigail)
Re: So what do YOU use Perl for? (Steve Lamb)
Re: use Filter::decrypt; How to encrypt source code fi <johnlin@chttl.com.tw>
weird 'use constant' behaviour. Suggestions? <webmaster@webdragon.unmunge.net>
Re: weird 'use constant' behaviour. Suggestions? (Mark Jason Dominus)
Re: weird 'use constant' behaviour. Suggestions? <comdog@panix.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 24 Apr 2001 10:20:10 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: B::Xref - better to exclude system modules
Message-Id: <9c571q$ir3@netnews.hinet.net>
Dear all,
When I use B::Xref to see cross references, I am only
interested in those files that I write, but not those system
modules such as CGI.pm Carp.pm Exporter.pm ...
I would suggest B::Xref to provide an option to exclude them
to increase the signal to noise ratio.
What do think about it? Thank you.
John Lin
Patches are welcome? I don't think I am learned enough
to patch such an internal module. Just give suggestions. : )
------------------------------
Date: Tue, 24 Apr 2001 17:57:17 -0500
From: xris <xris@dont.send.spam>
Subject: Re: Can I include local perl snipits?
Message-Id: <xris-BDD04C.17571624042001@news.evergo.net>
In article <slrn9eboj7.2rs.abigail@tsathoggua.rlyeh.net>,
abigail@foad.org (Abigail) wrote:
> Objects are just references. So, you're building and destroying references.
> Which you're likely doing in a non-OO program as well.
> But beside that, what does that have to do with *packages*?
I'll admit that my knowledge of OOP perl is pretty limited. I just
assumed that the package was the enclosure around an object, since
that's seemingly how they're treated.
------------------------------
Date: Wed, 25 Apr 2001 08:42:14 +0800
From: "yc" <leongyc@tp.edu.sg>
Subject: Execute command within the script
Message-Id: <3ae61817.0@news-svr.tp.ac.sg>
Hi,
How to execute a command within a perl script?
Thanks in advance,
YC
------------------------------
Date: Wed, 25 Apr 2001 00:57:28 GMT
From: shb@vnet.net (Si Ballenger)
Subject: Re: fakessi
Message-Id: <3ae62086.255841944@166.82.1.9>
On 24 Apr 2001 21:55:16 GMT, "John Michael" <johnm@aiamail.com>
wrote:
>I know you guys are busy, but never to busy to send a smart comment. I did
>try altavista before coming here and got quite a few sites that also led to
>either the same site or nothing. I will try a different one since I seem to
>have offened you guys. I thought these forums were for helping people.
>thanks anyway
>John Michael
Don't mind those guys. When they don't know the answer they just
start acting like turds.
------------------------------
Date: Tue, 24 Apr 2001 19:00:02 -0400
From: <bzelitc@attglobal.net>
Subject: Re: How capture PID's a la "ps"
Message-Id: <3ae617d2_1@news1.prserv.net>
Thanks. That's one idea. However, inevitably there will be processes that
slip through undetected between iterations. My requirements do not allow
that, however minimal that may be.
"Gregory Toomey" <gtoomey@usa.net> wrote in message
news:NIlF6.10811$482.50435@newsfeeds.bigpond.com...
> Try system('ps -ef') and put it in a loop.
> You'll have to decide what a 'view over time' means.
>
> gtoomey
> --------
> <bzelitc@attglobal.net> wrote in message
news:3ae5cf6c_2@news1.prserv.net...
> > I am looking for a perl way to poll the system (NT or Unix) for process
> id's
> > and their parents. Functionally, this would be somewhat like the command
> > line "ps" or Windows Task Manager. The difference is that it would not
be
> a
> > snapshot, but a view over time. Any ideas?
> >
> >
>
>
------------------------------
Date: Tue, 24 Apr 2001 20:28:39 -0400
From: BigMacAttack <none@nope.net>
Subject: How to send a URL to Win32 so it opens with the default browser
Message-Id: <pp5cetkrloh6t5273089soior4boe51n23@4ax.com>
Driving me batty trying to figure this one out and
Google Groups isn't helping jack...
A snippet bail-out would be great, but I don't mind doing
the research if someone could point me in the right
direction or a FAQ - what modules do I need to be looking
into? Win32::process?
I want to send a web page address to Windows in Active Perl
5.6 and have whatever browser is configured as the
default to open it.
Many thanks :)
------------------------------
Date: Wed, 25 Apr 2001 00:45:16 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: How to send a URL to Win32 so it opens with the default browser
Message-Id: <3ae61b92.3416424@news.erols.com>
On Tue, 24 Apr 2001 20:28:39 -0400, BigMacAttack <none@nope.net>
wrote:
>A snippet bail-out would be great, but I don't mind doing
>the research if someone could point me in the right
>direction or a FAQ - what modules do I need to be looking
>into? Win32::process?
>
>I want to send a web page address to Windows in Active Perl
>5.6 and have whatever browser is configured as the
>default to open it.
Use system() to call the Win32 'start' program, which automatically
performs whatever the default action is for a given document.
For example,
system 'start http://www.perl.com/';
------------------------------
Date: Tue, 24 Apr 2001 18:02:21 -0500
From: Thomas L. Shinnick <tshinnic@io.com>
Subject: Language resources? (was Re: Perl Fehler bei Scriptausf*hrung)
Message-Id: <8q0cet8duh6eh2vpvavu7ju4rc9mjgl6fr@4ax.com>
On Tue, 24 Apr 2001 21:11:06 GMT, Lyle Goldman <Lyle_Goldman@ibi.com> wrote:
>On 24 Apr 2001 20:50:14 GMT, anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
>wrote:
>>
>> According to Lyle Goldman <Lyle_Goldman@ibi.com>:
>> > On Sun, 22 Apr 2001 17:48:54 +0200, "Ludmilla Markowska" <ludmilla.markowska@gmx.net> wrote:
>> > >
>> > > sorry, wrong newsgroup.
>> > >
>> > Wrong language, too!
>>
>> How so?
>>
>> Anno
>
>She (or maybe he) posted in German in an English-language newsgroup. That's all
>I meant. I hope I didn't offend anyone. I don't speak German, so I couldn't help
>her here.
>
>- Lyle Goldman
No one should have been offended. One of the class of helpful answers
is to redirect a question to another newsgroup. Just as TCL or Java
questions are directed to the appropriate groups, questions from people
uncomfortable with English should be directed to groups in their favored
language.
Checking my newsreader I see 39 groups with perl in the name, which
seem to cover Czech, Deutsch, Dansk, Nihongo, Français, Korean,
Italian, Norsk, Polish, and Traditional Chinese.
But... After searching a while on cpan.org, perl.com, perl.org I don't
find any resources for people trying to find newsgroups/maillists in
their languages. Where is someone to go to find the right group?
Tom (learning Chinese to build enough confidence to tackle German again)
--
When running in an IIS environment under heavy stress, ADO might start
returning empty recordsets to requests from the database. This is not a
common problem because it often requires 4-15 days for the problem to surface.
http://www.microsoft.com/data/MDAC21info/MDAC21sp2manifest.htm
------------------------------
Date: Tue, 24 Apr 2001 19:17:18 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: Language resources? (was Re: Perl Fehler bei Scriptausf*hrung)
Message-Id: <comdog-558306.19171824042001@news.panix.com>
In article <8q0cet8duh6eh2vpvavu7ju4rc9mjgl6fr@4ax.com>, Thomas L.
Shinnick <tshinnic@io.com> wrote:
> But... After searching a while on cpan.org, perl.com, perl.org I don't
> find any resources for people trying to find newsgroups/maillists in
> their languages. Where is someone to go to find the right group?
if anyone knows of mailing lists not on http://lists.perl.org please
let the maintainer know :)
--
brian d foy <comdog@panix.com>
------------------------------
Date: Tue, 24 Apr 2001 17:27:05 -0700
From: "newuser" <newuser@nospam.slip.net>
Subject: Looking for a print friendly perl script
Message-Id: <bOoF6.2$SQ4.83@news2.dnvrcoidc.firstworld.net>
Hello,
I friend of mine has a webpage up and running and what he say from other
websites that sometime they have a print friendly link where the webpage can
be printed to a nice text format. I was wondering if some one had one that
was already written in perl that my friend can use.
thanks again for your help and suggestions
------------------------------
Date: Tue, 24 Apr 2001 23:24:32 GMT
From: "Steve Baldwin" <sbaldwin@bigpond.net.au>
Subject: Re: MQSeries on HP-UX 11 + Oracle
Message-Id: <QWnF6.13740$ff.99124@news-server.bigpond.net.au>
Basically during the 'make test' phase the test scripts attempt to (quite
reasonably) connect to the MQ Queue manager. If I use the 'default' mq
libraries during the 'make' step, the attempt to connect to the queue
manager returns an error status (I think) 2059, which means "Queue manager
not available", even though it is, and many other programs (C/COBOL) can
quite happily connect to it. If I change the libraries to the ones we use
to build our C programs (and the ones recommended by IBM in their
documentation), attempting to connect gives a sig10 (segv I think).
Any clues ?
"Drew" <nospam@newsranger.com> wrote in message
news:UqlF6.3880$QV4.328001@www.newsranger.com...
> In article <mY%E6.11455$ff.80598@news-server.bigpond.net.au>, Steve
Baldwin
> says...
> >
> >I've currently got a Perl installation (5.6) where I've got DBI-1.14 and
> >DBD-Oracle-1.06 installed and working. On HP-UX 11, this requires a bit
of
> >stuffing around (including rebuilding Perl), but it all now works fine.
I
> >now want to get MQ for perl working as well, but I'm not having much
luck.
> >Basically I fall over at the 'make test' step.
> >
> >Has anyone out there got this combination working ?
>
> I've got that same system setup without the MQ piece, and yes, it does
take a
> bit of tweaking to get running.
>
> What error(s) are you getting during the make test?
>
> --Drew
>
>
------------------------------
Date: Wed, 25 Apr 2001 01:36:17 +0100
From: "Tom Groves" <tom@gtonline.net>
Subject: Net::TCP or other (easyish) sockets manipulation
Message-Id: <3ae61d67@nautilus.site1.gtonline.net>
Hi there,
I'm playing around with developing a set of IRC Services in perl and so far
it's reasonable....i only have one problem.
I'm using Net::TCP for my connection to the ircd, which works FINE for
sending messages. I have it connecting without a problem. But I can't find
a SINGLE example of how to RECEIVE data using this...some sort of event
handler for "on_receive" or suchlike would be nice :)
Anybody know of a way to continually monitor incoming data? Or alternatively
another module to use.
Thanks,
Tom Groves
tom@gtonline.net
------------------------------
Date: 24 Apr 2001 17:30:25 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: operators: != vs. ne, strange behaviour
Message-Id: <m3lmoqx75q.fsf@dhcp9-172.support.tivoli.com>
On Tue, 24 Apr 2001, comdog@panix.com wrote:
> In article <m3d7a2ywy0.fsf@dhcp9-172.support.tivoli.com>, Ren Maddox
> <ren@tivoli.com> wrote:
>
>> $ perl -e 'print "Gotcha!\n" if "NAN" != "NAN"'
>> Gotcha!
>
> which version of perl are you using?
>
> vaio_brian[1789]$ perl5.00503 -e 'print "Gotcha!\n" if "NAN" != "NAN"'
> vaio_brian[1790]$ perl5.6.0 -e 'print "Gotcha!\n" if "NAN" != "NAN"'
> vaio_brian[1791]$
$ perl -v
This is perl, v5.6.0 built for i386-linux
...
Something else interesting that I've found is:
$ perl -le 'print "NON"+0'
0
$ perl -le 'print "NAN"+0'
nan
Quite by accident, I also ran this on:
This is perl, version 4.0
with basically the same results:
$ perl -e 'print "Gotcha!\n" if "NAN" != "NAN"'
Gotcha!
$ perl -e 'print "Gotcha!\n" if "NON" != "NON"'
$ perl -le 'print "NON"+0'
0
$ perl -le 'print "NAN"+0'
NaNQ
There's obviously *something* special about strings starting with
"NAN".
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Tue, 24 Apr 2001 20:46:11 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: operators: != vs. ne, strange behaviour
Message-Id: <comdog-39DDB4.20461124042001@news.panix.com>
In article <m3lmoqx75q.fsf@dhcp9-172.support.tivoli.com>, Ren Maddox
<ren@tivoli.com> wrote:
> On Tue, 24 Apr 2001, comdog@panix.com wrote:
>
> > In article <m3d7a2ywy0.fsf@dhcp9-172.support.tivoli.com>, Ren Maddox
> > <ren@tivoli.com> wrote:
> >
> >> $ perl -e 'print "Gotcha!\n" if "NAN" != "NAN"'
> >> Gotcha!
> > which version of perl are you using?
> >
> > vaio_brian[1789]$ perl5.00503 -e 'print "Gotcha!\n" if "NAN" != "NAN"'
> > vaio_brian[1790]$ perl5.6.0 -e 'print "Gotcha!\n" if "NAN" != "NAN"'
> > vaio_brian[1791]$
> $ perl -v
>
> This is perl, v5.6.0 built for i386-linux
> ...
>
> Something else interesting that I've found is:
>
> $ perl -le 'print "NON"+0'
> 0
> $ perl -le 'print "NAN"+0'
> nan
i don't think this is perl. i don't have a Solaris box to check, but
FreeBSD and NetBSD give different results than Linux (and MacPerl is
just goofy - it gives 2147483648 ( which is 1 << 31 ).). perhaps
one of the ActivePerl types can find out what its result is. :)
========================
vaio_brian[1791]$ perl -le 'print "NAN"+0'
0
vaio_brian[1792]$ uname -a
FreeBSD vaio.perl.org 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000
jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC i386
========================
sirius_bdfoy[903]$ perl -le 'print "NAN"+0'
nan
sirius_bdfoy[904]$ perl -v
This is perl, version 5.005_03 built for i386-linux
========================
panix2_comdog[998]$ perl -le 'print "NAN"+0'
0
panix2_comdog[999]$ perl -v
This is perl, version 5.005_02 built for i386-netbsd
========================
[parsons@gocho parsons]$ perl -le 'print "NAN"+0'
nan
[parsons@gocho parsons]$ perl -v
This is perl, v5.6.0 built for i686-linux
--
brian d foy <comdog@panix.com>
------------------------------
Date: Tue, 24 Apr 2001 22:14:44 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Pass variables from one script to another?
Message-Id: <tebumkqb4g64af@corp.supernews.com>
Nils Lien <Nils.Lien@informatikk.hive.no> wrote:
> Hi,
> I'm wondering how to pass a variable form one script to another.
> For example;
> I'm gonna fetch the variable $foo from script1.cgi
> into the script I'm currently in now, script2.cgi.
> I've managed it using the variable in the URL, but isn't there another
> way around it?
1) Form data (usually type hidden works best here).
2) LWP. See CPAN.
3) Intermediate files on disk. (How to coordinate which file
is being used by which pair of CGI scripts is left as an
exercise to the reader, who hopefully set a cookie in the
user's browser or at least keyed something to an IP (which
can be less than ideal with shared machines and proxies)).
4) A database which keeps track of the data between script1
and script2. How to make sure the two scripts access the
same data for the same user is left as an exercise. Be
careful if you use this to sell anything, or you may have
to sacrifice most of what you own to the gods^Wcompany
called Amazon to appease their demons^Wlawyers.
Chris
--
Try not. Do, or do not. The Force is binary. -- Yoda,
The Empire Strikes Back (paraphrased)
------------------------------
Date: 24 Apr 2001 22:52:02 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Perl Fehler bei Scriptausführung
Message-Id: <9c502i$in6$1@mamenchi.zrz.TU-Berlin.DE>
According to Uri Guttman <uri@sysarch.com>:
> >>>>> "AS" == Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> writes:
>
> AS> According to Steve Lamb <morpheus@here.not.there>:
> >> On 24 Apr 2001 20:50:14 GMT, Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
> >> wrote:
> >> >According to Lyle Goldman <Lyle_Goldman@ibi.com>:
> >> >> On Sun, 22 Apr 2001 17:48:54 +0200, "Ludmilla Markowska"
> >> >> <ludmilla.markowska@gmx.net> wrote:
> >> >> >
> >> >> > sorry, wrong newsgroup.
> >> >> >
> >> >> Wrong language, too!
> >>
> >> >How so?
> >>
> >> I'm betting it is either the fact that this appears to be a mostly English
> >> newsgroup or the fact that the code given wasn't Perl in any form I
> am aware
> >> of. Take your pick.
>
> AS> I did, picking the former.
>
> AS> I also understand that Usenet is an international medium and other
> AS> languages than English are generally tolerated.
>
> true, but there are language specific hierarchies which are better
> suited for this:
>
> de.comp.lang.perl
I know. In fact parts of the thread were crossposted from there
(or to there, depending on point of view).
> usenet may be multilingual but c.l.p.misc is english-centric
No doubt. I am taking exception to the blunt "Wrong language".
Anno
------------------------------
Date: Tue, 24 Apr 2001 23:39:53 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl Threads
Message-Id: <d9oF6.24306$Ce4.1802677@news1.rdc1.ct.home.com>
saulmora@us.ibm.com wrote:
> I am having trouble using the Thread module for ActivePerl 623 for Windows
> NT.
> I put 'use Threadl;' at the top of the code and construct a new Thread
> object just as the thread docs say, but when I run my script I get a weird
> error message:
Perl needs to be built specifically with thread support for the Thread
module to work. ActiveState perl isn't built with it.
Dan
------------------------------
Date: Tue, 24 Apr 2001 22:15:29 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: regexp matching with optional part
Message-Id: <slrn9ebuo1.3sc.abigail@tsathoggua.rlyeh.net>
Ronald Fischer (ronald.fischer.gp@icn.siemens.de) wrote on MMDCCXCII
September MCMXCIII in <URL:news:7qfsnj0yv1z.fsf@icn.siemens.de>:
;; "Wyzelli" <wyzelli@yahoo.com> writes:
;;
;; > "Ronald Fischer" <ronald.fischer.gp@icn.siemens.de> wrote in message
;; > news:7qfwv8gq6pk.fsf@icn.siemens.de...
;; > >
;; > > I'm trying to write a regexp matching which should cut off an optional
;; > leading
;; > > "x-" or trailing "-x". the following cases:
;; > >
;; > > In any case, the extracted part (after cutting off the leader or trailer)
;; > > should consist of at least one character; otherwise, the regexp should
;; > > fail. Example:
;; > >
;; > > x-abc-x -> return abc
;; > > x-foo -> return foo
;; > > bar-x -> return bar
;; > > baz -> return baz
;; > > x--x -> fail
;; > >
;; > > Can this be done easily in a single regexp? The closest I came was
;; > >
;; > > /^(x-)?(.+?)(-x)$/
;; >
;; > Change the + to a * and you need the last -x to be optional as well.
;;
;; /^(x-)?(.*?)(-x)?$/ does not work either, because it causes $_ eq "x--x"
;; to succeed (setting $2 to the empty string).
;;
;; Probably this really can't be done in a single regexp...
s/^(?:x-)?((?!^x-)(?:(?!-x$).)+)(?:-x)?$/$1/s;
Abigail
--
perl -wle '$, = " "; sub AUTOLOAD {($AUTOLOAD =~ /::(.*)/) [0];}
print+Just (), another (), Perl (), Hacker ();'
------------------------------
Date: 24 Apr 2001 15:43:23 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: regexp matching with optional part
Message-Id: <m3u23exc44.fsf@dhcp9-172.support.tivoli.com>
On Tue, 24 Apr 2001, bart.lateur@skynet.be wrote:
> Uri Guttman wrote:
>
>> s/^x-|-x$//g && $_
>
> Are you sure the intention is to bring
>
> x-x-x-x-x-boo!-x-x-x-x-x
>
> down to just:
>
> boo!
I doubt that's the intent, nor does the above code achieve that.
Remember, "g" just means to repeat the match over the length of the
string, but it doesn't restart from the beginning of the string each
time. If it did, we would run into all sorts of trouble with things
like:
s/walk/walked/g
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Tue, 24 Apr 2001 22:20:09 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: So what do YOU use Perl for?
Message-Id: <slrn9ebv0p.3sc.abigail@tsathoggua.rlyeh.net>
echo 'Rudolf Polzer'>/dev/null (rpolzer@durchnull.de) wrote on MMDCCXCI
September MCMXCIII in <URL:news:slrn9e57n6.1vc.rpolzer@www42.t-offline.de>:
^^ E.Chang <echang@netstorm.net> wrote:
^^ > rename and perldoc -f s). (Oh, and a hint: .html is preferred over .htm
^^ > as an extension for web documents - unless you're running your server on a
^^ > Windows 3.x machine)
^^
^^ Why? I always use .htm because it is shorter. The same with .jpg and
^^ .sht. But I do not restrict me to 8 chars in the name...
.h is even shorter.
But I don't really care about length. I wouldn't leave the vowel out
of .sht.
Abigail
--
print 74.117.115.116.32;
print 97.110.111.116.104.101.114.32;
print 80.101.114.108.32;
print 72.97.99.107.101.114.10;
------------------------------
Date: Tue, 24 Apr 2001 22:41:55 -0000
From: grey@despair.rpglink.com (Steve Lamb)
Subject: Re: So what do YOU use Perl for?
Message-Id: <slrn9ec09j.nhl.grey@teleute.dmiyu.org>
On Sun, 22 Apr 2001 11:05:42 +0200, echo 'Rudolf Polzer'>/dev/null
<rpolzer@durchnull.de> wrote:
>E.Chang <echang@netstorm.net> wrote:
>> rename and perldoc -f s). (Oh, and a hint: .html is preferred over .htm
>> as an extension for web documents - unless you're running your server on a
>> Windows 3.x machine)
>Why? I always use .htm because it is shorter. The same with .jpg and
>.sht. But I do not restrict me to 8 chars in the name...
Something about the fact that it isn't name HyperText Markup.
--
Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
ICQ: 5107343 | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------
------------------------------
Date: Tue, 24 Apr 2001 09:55:00 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: Re: use Filter::decrypt; How to encrypt source code first?
Message-Id: <9c571o$ir3@netnews.hinet.net>
"Anno Siegel" wrote
> According to John Lin
> > The crackers can study your .pm file to write a decryptor easily.
> If an attacker steals both your encrypted source *and* the decryption
> module you use, you're sol, right.
OK, last quick question. If I have a script running on a ISP machine,
it doesn't make sense to protect it by encryption because perl need both
the source script and decryption module to run, whereas the ISP has full
privilege to access both. Am I right?
Thank you.
John Lin
------------------------------
Date: 24 Apr 2001 23:55:53 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: weird 'use constant' behaviour. Suggestions?
Message-Id: <9c53q9$9p6$0@216.155.33.49>
short test script that exhibits the problem
#!/usr/bin/perl -w
## Options:
# moduletest -r switch causes moduletest to ignore the storefile
# and recheck even if it exists
# moduletest -f [filename] switch causes moduletest to write
# output to that file, defaults to "ModuleCheck.txt"
use strict;
use vars qw/%opts/;
use Getopt::Std;
getopts('rf:', \%opts);
# sets to 0 if you don't specify -f switch to have the
# output redirected to a file.
use constant USE_SAVEFILE => exists($opts{'f'}) ? '1' : '0'; #<- problem
print "Constant = ", USE_SAVEFILE, " \n" and exit 0;
#[snip]
__END__
I've tried like every variation I can think of
use constant USE_SAVEFILE => exists($opts{'f'}) ? '1' : '0';
use constant USE_SAVEFILE => (exists($opts{'f'}) ? '1' : '0');
use constant USE_SAVEFILE => (exists($opts{'f'}) ? '1' : '0')[0];
and this:
my $save = exists($opts{'f'}) ? '1' : '0';
use constant USE_SAVEFILE => $save;
print "Constant = ", USE_SAVEFILE, "save = $save\n";
gives me
Use of uninitialized value at /home1/users/sgodin/bin/moduletest line 26.
Constant = and save = 1
perl -Mconstant -e 'print constant->VERSION'
1.00
perl -v
This is perl, version 5.005_03 built for i386-freebsd
any hints? I'm utterly clueless now.
I finally resorted to this:
sub USE_SAVEFILE { exists($opts{'f'}) ? 1 : 0 };
and isn't that what constant.pm is supposed to be doing anyway?
I noticed CPAN has a 1.02 version of constant.pm -- is this a known bug
that was fixed, and will 1.02 run under 5.005_03?
*much head scratching*
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: Wed, 25 Apr 2001 00:28:45 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: weird 'use constant' behaviour. Suggestions?
Message-Id: <3ae61a3e.4693$1e2@news.op.net>
In article <9c53q9$9p6$0@216.155.33.49>,
Scott R. Godin <webmaster@webdragon.unmunge.net> wrote:
>use constant USE_SAVEFILE => exists($opts{'f'}) ? '1' : '0'; #<- problem
Well, that's not a constant, now is it?
Try putting this at the appropriate place in the file, instead.
sub USE_SAVEFILE () { exists($opts{'f'}) ? '1' : '0' }
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: Tue, 24 Apr 2001 20:41:56 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: weird 'use constant' behaviour. Suggestions?
Message-Id: <comdog-FFA408.20415624042001@news.panix.com>
In article <9c53q9$9p6$0@216.155.33.49>, "Scott R. Godin"
<webmaster@webdragon.unmunge.net> wrote:
> short test script that exhibits the problem
> getopts('rf:', \%opts);
> use constant USE_SAVEFILE => exists($opts{'f'}) ? '1' : '0'; #<- problem
exercise for the poster: which line is executed first? ;)
--
brian d foy <comdog@panix.com>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.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 757
**************************************