[10704] in Perl-Users-Digest
Perl-Users Digest, Issue: 4303 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 26 14:07:20 1998
Date: Thu, 26 Nov 98 11:00:25 -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 Thu, 26 Nov 1998 Volume: 8 Number: 4303
Today's topics:
Re: Accessing Oracle database with perl? dave@mag-sol.com
Re: Accessing Oracle database with perl? (Rich)
Another crypt question <dejahvu@erols.com>
Re: Beginner Book? (Tad McClellan)
Re: Calling prolog from perl <merlyn@stonehenge.com>
Change IP Address <JEFEBUENO@prodigy.net>
Re: Change IP Address <rootbeer@teleport.com>
cisamperl requires Perl 4 and uperl.c, what about Perl <philippe.cyk@wanadoo.fr>
Re: Difficult Pattern Matching <merlyn@stonehenge.com>
Re: embedded while loop problem <ebohlman@netcom.com>
Re: FAQ <r28629@email.sps.mot.com>
Re: getting a copy vs. not (was "Re: Probably a simple <merlyn@stonehenge.com>
Re: getting a copy vs. not (was "Re: Probably a simple <uri@sysarch.com>
Help..I'm Way Over My Head <flajobs@gate.net>
how do i redirect filehandles <samwang@freewwweb.com>
Re: how do i redirect filehandles <rootbeer@teleport.com>
Re: I think this is a bug in Perl <r28629@email.sps.mot.com>
London.pm December Meeting (& mailing list) dave@mag-sol.com
Re: mail server again <rootbeer@teleport.com>
Network Search <rauenzc@enter.net>
Re: Network Search <rootbeer@teleport.com>
Re: nslookup again <r28629@email.sps.mot.com>
Obfuscation of perl scripts <vvolkov@benton.com>
Re: Obfuscation of perl scripts <r28629@email.sps.mot.com>
Re: Obfuscation of perl scripts (Bart Lateur)
Re: Obfuscation of perl scripts <vvolkov@benton.com>
Re: Perl CGI 500 Server Error on PWS <plynch@bbss.com>
Perl compiler? (Mattjm82)
Perl in HTML - without FORM <jvj@greennet.gl>
Re: Perl in HTML - without FORM <rootbeer@teleport.com>
Re: Perl parsing error <rootbeer@teleport.com>
Rename problem using ActivePerl 507 PerlIIS.dll on IIS4 <plynch@bbss.com>
Re: Rename problem using ActivePerl 507 PerlIIS.dll on <rootbeer@teleport.com>
Serial programming question dan_stefura@mad.scientist.com
sql & perl how? <voelkel@hrz1.hrz.tu-darmstadt.de>
Re: Substitution: \x & backreference dave@mag-sol.com
Re: Timeout on CGI-scripts that may block <rootbeer@teleport.com>
Re: Training wheels for Perl (was: Re: use strict 'refs <rootbeer@teleport.com>
Re: Win32 and Perl modules (was Re: HELP !can't use GD. david.drecq@dcg.sncf.fr
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 26 Nov 1998 16:53:54 GMT
From: dave@mag-sol.com
Subject: Re: Accessing Oracle database with perl?
Message-Id: <73k12t$8fl$1@nnrp1.dejanews.com>
In article <73jhq5$ccd$1@news.kren.nm.kr>,
Sohn Jung-woo <logout@designer.snu.ac.kr> wrote:
> Hello all,
>
> Can somebody suggest me any starting point or package for Perl and Oracle?
> That is, I would like to access Oracle with Perl.
OraPerl or DBI with DBD::Oracle.
All available from CPAN <www.perl.com/cpan/>.
hth,
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 26 Nov 1998 17:05:08 GMT
From: richm@ucesucks.mulveyr.roc.servtech.com (Rich)
Subject: Re: Accessing Oracle database with perl?
Message-Id: <slrn75r2f9.n3p.richm@ll.aa2ys.ampr.org>
On 26 Nov 1998 12:33:09 GMT, Sohn Jung-woo <logout@designer.snu.ac.kr> wrote:
>Hello all,
>
>Can somebody suggest me any starting point or package for Perl and Oracle?
>That is, I would like to access Oracle with Perl.
>
>Thank you in advance. Sorry for my poor english. :)
>
Get the DBI and DBD::Oracle modules
--
Rich Mulvey
My return address is my last name,
followed by my first initial, @mulveyr.roc.servtech.com
http://mulveyr.roc.servtech.com
Amateur Radio: aa2ys@wb2wxq.#wny.ny.usa
------------------------------
Date: Thu, 26 Nov 1998 11:17:15 -0600
From: Mary E Tyler <dejahvu@erols.com>
Subject: Another crypt question
Message-Id: <365D8D10.1336@erols.com>
I am looking for a strong encryption module for a ballotting system. Is
the built in crypt appropriate?
The camel book seems to suggest not...
okay, i've been to CPAN and found the PGP module... but I have no idea
if the target system will have PGP available to the script... and my
test system does not have PGP available from the command line (i *love*
macs sometimes... no command line at all! ak.)
even so, i am not sure how to use the module. would someone be kind
enough to provide an example? or is there one that is more simple?
dejah, in the process of reading the camel book's section on library
modules trying to figure out what the heck she is doing...
--
i trust i make myself obscure, i have need of obscurity now- robert bolt
a heated exchange of unread mail would be welcomed by all- christensen
Skating Fiction. Featuring the highly acclaimed serial On The Edge!
http://www.DejahsPrivateIce.com
------------------------------
Date: Thu, 26 Nov 1998 12:10:04 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Beginner Book?
Message-Id: <sh5k37.0l7.ln@flash.net>
dhiraj_malhotra@my-dejanews.com wrote:
: Try the book "Learning Perl" by Larry Wall (Popularly known as Camel BooK)
^^^^^^^^^^^^^ ^^^^^^^^^^
^^^^^^^^^^^^^ ^^^^^^^^^^ eh?
: It is the best book I have ever seen for the beginner.
Camel = "Programming Perl"
Llama = "Learning Perl"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Thu, 26 Nov 1998 15:14:55 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Calling prolog from perl
Message-Id: <8cemqqpjto.fsf@gadget.cscaper.com>
>>>>> "Lee" == Lee Benfield <lbenfie1@nospamford.com> writes:
Lee> Not sure if it's useful, but ISTR there's a prolog implementation for
Lee> perl. In which case you can integrate the entire thing. Lovely.
It's in the CPAN:
CPAN/author/id/JACKS/Prolog-alpha.tar.gz
But at last I recall, JACKS had disappeared off the face of the Perl
World, so I don't think you'll be seeing much support from that end.
(His files are all 1996 or older, and that's a Long Time on the Perl
clock.)
print "Just another Perl hacker,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Thu, 26 Nov 1998 09:27:19 -0800
From: "JEFF GOODE" <JEFEBUENO@prodigy.net>
Subject: Change IP Address
Message-Id: <73k3ft$8296$1@newssvr04-int.news.prodigy.com>
Greetings,
I need a script to change the IP Address in NT from the DOS prompt. Any
suggestions would be greatly appreciated.
------------------------------
Date: Thu, 26 Nov 1998 18:37:55 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Change IP Address
Message-Id: <Pine.GSO.4.02A.9811261037360.23068-100000@user2.teleport.com>
On Thu, 26 Nov 1998, JEFF GOODE wrote:
> I need a script to change the IP Address in NT from the DOS prompt.
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 27 Nov 1998 01:36:14 +0000
From: Red Hat Linux User <philippe.cyk@wanadoo.fr>
Subject: cisamperl requires Perl 4 and uperl.c, what about Perl 5 ?
Message-Id: <365E020D.A784A89D@wanadoo.fr>
Hello everybody,
I need access to Informix C-ISAM v7 files and I have downloaded a very
old (1994) package called cisamperl.
The problem is that it has been designed for perl 4 and it requires a
file name uperl.o
I have compiled Perl 5 and there is no file with that name.
Is there a more recent software or what has replaced uperl.c in the
current distribution of Perl ?
Thank to reply me by email at
philippe.cyk@wanadoo.fr
------------------------------
Date: Thu, 26 Nov 1998 15:18:42 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Difficult Pattern Matching
Message-Id: <8caf1epjne.fsf@gadget.cscaper.com>
>>>>> "Scott" == Scott Brumley <Scott@Brumley.com> writes:
Scott> I want to do a pattern match on the common spam flag "$$$"
Scott> However since the $ character is an special anchor character I
Scott> am having difficulty. I thought I could use \$\$\$ but it does
Scott> not seem to work either.
You must more clearly define "not work" for us to be able to help:
$ perl
$string = 'fred $$$ barney $$$ dino $$$ betty ';
while ($string =~ /(\$\$\$)/g) {
print "$` < $& > $'\n";
}
^D
fred < $$$ > barney $$$ dino $$$ betty
fred $$$ barney < $$$ > dino $$$ betty
fred $$$ barney $$$ dino < $$$ > betty
$
print "Just another Perl example hacker,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Thu, 26 Nov 1998 17:34:10 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: embedded while loop problem
Message-Id: <ebohlmanF31I4y.HD@netcom.com>
Lee Benfield <lbenfie1@nospamford.com> wrote:
: I'm sure there's a better way to do it, but why not try:
: # slurp file2 into @file2
: while (<FILE2>) {
: push @file2, $_;
: }
Can be rewritten as:
@file2=<FILE2>;
: while (<FILE1>) {
: @uid = split/;/,$_;
: $uid = $uid[0];
: print "Got $uid" if (grep /$uid/, @file2);
: }
Three points:
1) This will find *any* appearance of $uid in the second file (as long as
it doesn't cross a line boundary). This may not be what's needed; it may
be that it should be matched only when it appears in certain fields.
2) It's slow, because grep is going to continue searching for all matches
even after it finds the first one.
3) It's slow, because even if 2) could be fixed, it's still going to make
an average of N * M / 2 comparisons, where N is the number of lines in the
first fill and M is the number of lines in the second file. This gets
very slow very fast as the size of the files increases. If in fact $uid
need only be matched at specific positions in the second file, then you
could populate a hash with the appropriate fields for the second file and
then do a hash lookup on each $uid from the first file. This will be
*much* faster.
------------------------------
Date: Thu, 26 Nov 1998 10:31:14 -0500
From: Tk Soh <r28629@email.sps.mot.com>
To: Frank <fdm@internethomeschool.com>
Subject: Re: FAQ
Message-Id: <365D743C.E25F5273@email.sps.mot.com>
[posted to c.l.p.m and copy emailed]
Frank wrote:
>
> This is really a test, but, if you can send me a FAQ or a FAG for that
> matter it will work!
>
> Thanks!
>
> --
> fdm@internethomeschool.com
> moody@internethomeschool.com
> ihs@internethomeschool.com
First the "Hello!", now the "FAQ" (atually a TEST, you know the feeling when
you are being fooled, don't you?), then what? <sigh>
-TK
------------------------------
Date: Thu, 26 Nov 1998 14:58:00 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: getting a copy vs. not (was "Re: Probably a simple question...")
Message-Id: <8ck90ipklw.fsf@gadget.cscaper.com>
>>>>> "Uri" == Uri Guttman <uri@sysarch.com> writes:
Uri> also the original query was about the aliasing to the for list so a hash
Uri> slice (according to randal) will allow aliasing directly to the values
Uri> of the hash as lvalues. i wonder if values %state would do that? let's
Uri> check it out:
>> perl -e '%a=(1,2); for ( values %a ) { $_ = 3} print "$a{1}\n"'
Uri> 2
>> perl -e '%a=(1,2); for ( @a{keys %a} ) { $_ = 3} print "$a{1}\n"'
Uri> 3
Uri> so the hash slice wins here as a way to modify its values in a for loop.
Uri> so it is not more effective to use values as you think since it is not
Uri> the same thing.
However, I think the point was being made is that it would be nice if
"values" in an lvalue context would operate as an lvalue instead of a
copy of the data.
After all, I first wrote the code as you suggested it, with values(),
hoping it would work, and it didn't. :)
On the other hand, keys() as an lvalue is a scalar lvalue, so that'd
be a really weird dichotomy. :) I think I'll withdraw my suggestion.
print "Just another Perl value hacker,"
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 26 Nov 1998 13:18:32 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: getting a copy vs. not (was "Re: Probably a simple question...")
Message-Id: <x7lnkyxqpz.fsf@sysarch.com>
>>>>> "RS" == Randal Schwartz <merlyn@stonehenge.com> writes:
>>>>> "Uri" == Uri Guttman <uri@sysarch.com> writes:
Uri> also the original query was about the aliasing to the for list so
Uri> a hash slice (according to randal) will allow aliasing directly
Uri> to the values of the hash as lvalues. i wonder if values %state
Uri> would do that? let's check it out:
>>> perl -e '%a=(1,2); for ( values %a ) { $_ = 3} print "$a{1}\n"'
Uri> 2
>>> perl -e '%a=(1,2); for ( @a{keys %a} ) { $_ = 3} print "$a{1}\n"'
Uri> 3
RS> However, I think the point was being made is that it would be nice if
RS> "values" in an lvalue context would operate as an lvalue instead of a
RS> copy of the data.
i think that was never the point. i lost the original post now and i
don't feel like searching for it. you suggested the hash slice method. i
explained why it works as an lvalue and values doesn't.
RS> After all, I first wrote the code as you suggested it, with values(),
RS> hoping it would work, and it didn't. :)
but you didn't say that! i had to try and figure it out. stating that
you tried something and it failed would be good for your ego. :-)
RS> On the other hand, keys() as an lvalue is a scalar lvalue, so
RS> that'd be a really weird dichotomy. :) I think I'll withdraw my
RS> suggestion.
why? it does the job. but bet it does use a temp array of the keys.
maybe the optimizer could see that and just do an iteration and not a
temp array.
NFAQ: how do i do a modification of all values in a hash without copying
them into temps?
A: use a for loop over a hash slice of all the values:
for ( @hash{ keys %hash } ) { ... $_ ... }
RS> print "Just another Perl value hacker,"
you don't have any socially redeeming values! :-)
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: Thu, 26 Nov 1998 09:23:28 -0500
From: Hunter Padgett <flajobs@gate.net>
Subject: Help..I'm Way Over My Head
Message-Id: <365D6460.51562DB4@gate.net>
--------------E1B5DCE2ED33EFB239F48DA4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I am trying to configure ad-click thrus on my new Web Trends software.
Our web site has recently attracted advertisers and they require
click-thru rates to sign up. In order to set-up that part of the
software, I need to write a custom script (among other things) using the
Perl 5 language. The script is then housed on my ISP's server. I am
lost.
I know this is kinda broad, but if anyone has gone through this, I'd
appreciate your insight.
Thanks,
Hunter Padgett
--------------E1B5DCE2ED33EFB239F48DA4
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
I am trying to configure ad-click thrus on my new <I>Web Trends </I>software.
Our web site has recently attracted advertisers and they require click-thru
rates to sign up. In order to set-up that part of the software, I need
to write a custom script (among other things) using the Perl 5 language.
The script is then housed on my ISP's server. I am lost.
<P>I know this is kinda broad, but if anyone has gone through this, I'd
appreciate your insight.
<P>Thanks,
<P>Hunter Padgett</HTML>
--------------E1B5DCE2ED33EFB239F48DA4--
------------------------------
Date: Thu, 26 Nov 1998 09:28:39 -0600
From: Sam Wang <samwang@freewwweb.com>
Subject: how do i redirect filehandles
Message-Id: <365D73A7.E5ED1DA8@freewwweb.com>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
i want to redirect STDERR to a file. how can i do that?</html>
------------------------------
Date: Thu, 26 Nov 1998 18:32:13 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: how do i redirect filehandles
Message-Id: <Pine.GSO.4.02A.9811261031450.23068-100000@user2.teleport.com>
On Thu, 26 Nov 1998, Sam Wang wrote:
> i want to redirect STDERR to a file. how can i do that?
See the entry for open() in the perlfunc manpage. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 26 Nov 1998 10:27:19 -0500
From: Tk Soh <r28629@email.sps.mot.com>
To: Ling@dcs.ed.ac.uk
Subject: Re: I think this is a bug in Perl
Message-Id: <365D7351.725A712B@email.sps.mot.com>
[posted to c.l.p.m and copy emailed]
Ling@dcs.ed.ac.uk wrote:
>
> The +? operator in the following line does not work
> as expected:
>
> print("$1\n") if ("<MYTAG><MYCOL1>\n<MYTAG2><MYENTR2>\n" =~ m/(<[^a-z]+?>) *\n/m );
>
> C:\test>perl not-range.pl
> perl not-range.pl
> <MYTAG><MYCOL1>
>
> The expected output should be:
> <MYTAG>
>
> Of course it's possible to change the code, but my point is not that;
> my point is that this is a bug.
It would sure make you feel good to be honored that "I found a BUG"
certificate, but be prepared for someone to slap on your face and urge you to
return to more experiments and RTFM's. (make no mistake, they are nice people,
at least enough to offer you advice)
My advice is to stop digging bugs, and start using Perl.
> Please send any reply to:
Any reasons you couldn't follow up with your post?
> bl at-symbol dcs.ed.ac.uk
^^^^^^^^^
Beside, this email addr isn't valid ;-)
Good luck.
-TK
------------------------------
Date: Thu, 26 Nov 1998 12:37:07 GMT
From: dave@mag-sol.com
Subject: London.pm December Meeting (& mailing list)
Message-Id: <73ji1i$skh$1@nnrp1.dejanews.com>
For one month only, London.pm has moved its monthly meeting from the first
Thursday in the month. This is in order to meet up with David Adler who is
visiting us from NY.pm.
December's meeting will therefore be on Thursday 10th December. Other details
remain as normal, Cellar Bar, Cittie of Yorke, High Holborn. Nearest tube
Chancery Lane. Meet from about 6:15pm. Further details on our web site at
<http://london.pm.org>.
No dancing canines of any description, but I do still have some T-Shirts which
will be on sale for #10 each.
Until recently we've run a mailing list on eGroups.com. Unfortunately,
eGroups have decided that it's a good idea to convert all emails into HTML
before sending them on to us. For this reason we've decided to set up camp
elsewhere. From today our new mailing list is hosted on the pm.org server.
All existing subscribers have been subscribed to the new list. You can
subscribe by sending a mail containing the text 'subscribe london-list' to
majordomo@happyfunball.pm.org.
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 26 Nov 1998 18:15:55 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: mail server again
Message-Id: <Pine.GSO.4.02A.9811261014070.23068-100000@user2.teleport.com>
On Thu, 26 Nov 1998, Herger Peter wrote:
> From: Herger Peter <"peter.herger"@swisslife.ch; peter.herger@bigfoot.com>
There are a lot of valid e-mail addresses in the world; I don't think
that's one of them.
> I've wrote a skript to send mails out to the world, but I only see the
> mails in my LAN!!!
Why do I suspect that your mail system is mis-configured? Perhaps the
docs, FAQs, and newsgroups about your mail system can help you. Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 26 Nov 1998 11:20:39 -0500
From: Craig <rauenzc@enter.net>
Subject: Network Search
Message-Id: <365D7FD6.8663569B@enter.net>
I wanted to use perl to search all computers on a network for specific
files, but I'm not sure were to begin. Any hints or insights would be
greatly appreciated. Thanks in advance.
Craig
------------------------------
Date: Thu, 26 Nov 1998 18:33:28 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Network Search
Message-Id: <Pine.GSO.4.02A.9811261032520.23068-100000@user2.teleport.com>
On Thu, 26 Nov 1998, Craig wrote:
> I wanted to use perl to search all computers on a network for specific
> files, but I'm not sure were to begin.
Start with an entry-level book, like the Llama book. See the perlbook
manpage. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 26 Nov 1998 10:00:48 -0500
From: Tk Soh <r28629@email.sps.mot.com>
To: Steven Morlock <newspost@morlock.net>
Subject: Re: nslookup again
Message-Id: <365D6D1C.DD5DDCA3@email.sps.mot.com>
[posted to c.l.p.m and copy emailed]
Steven Morlock wrote:
>
> I'm not sure what the problem was that you were having
> but it was probably related to you unintentionally calling
> Net::hostent's gethostbyaddr while using the builtin
> gethostbyaddr's calling convention. I've included a fixed
> example that also has the proper code (commented out)
> to use Net::hostent.
>
> I've taken the liberty of switching you pattern matching since
> I find it more reliable to scan for an IP address than a hostname.
>
> Steve
>
> #!/opt/net/solaris/bin/perl -w
>
> use Socket;
> #use Net::hostent;
>
> print "please enter either Domain name or IP address:\n";
>
> chomp($options = <STDIN>);
>
> if ( $options =~ m#[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+# ) {
you can replace [0-9] with \d:
m#\d+\.\d+\.\d+\.\d+#
> # -- If you are using Net::hostent's gethostbyaddr:
> #$h = gethostbyaddr( inet_aton ($options), AF_INET ) or die "couldn't resolve for
> $options: $!\n";
> #print "the hostname is: ", $h->name, "\n";
> # -- If you are using the builtint gethostbyaddr:
> $name = gethostbyaddr( inet_aton ($options), AF_INET ) or die "couldn't resolve for
> $options: $!\n";
> print "the hostname is: $name\n";
^^^^^
you may want to make sure the return value of gethostbyaddr() too, since you
are using Net::hostent.
> }
> else {
> $address = inet_ntoa(inet_aton ($options)) or die "couldn't resolve for $options: $!\n";
> print "The address is a IP address: $address\n";
> }
>
> exit;
>
[...]
-TK
------------------------------
Date: Thu, 26 Nov 1998 15:49:41 GMT
From: "Vlad Volkov" <vvolkov@benton.com>
Subject: Obfuscation of perl scripts
Message-Id: <pMe72.7$ov.73536@client.news.psi.net>
Can anybody suggest good obfuscation tool for Perl?
Thanks a lot,
Vlad
------------------------------
Date: Thu, 26 Nov 1998 10:37:10 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: Obfuscation of perl scripts
Message-Id: <365D759F.7FD70F1E@email.sps.mot.com>
Vlad Volkov wrote:
>
> Can anybody suggest good obfuscation tool for Perl?
>
> Thanks a lot,
> Vlad
it is actually bundled with every 'programmer' ;-)
-TK
------------------------------
Date: Thu, 26 Nov 1998 17:31:03 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Obfuscation of perl scripts
Message-Id: <365e8fec.532223@news.skynet.be>
Vlad Volkov wrote:
>Can anybody suggest good obfuscation tool for Perl?
Perl. Hey, isn'ty it obfuscated anough as it is? ;-)
You could also remove comments, and delete any newlines you don't
actually need. Talk about unreadable.
Bart.
------------------------------
Date: Thu, 26 Nov 1998 18:31:45 GMT
From: "Vlad Volkov" <vvolkov@benton.com>
Subject: Re: Obfuscation of perl scripts
Message-Id: <l8h72.9$ov.136775@client.news.psi.net>
I rather meant changing variable names from, say,
@user_names to @c354fbg within a module.
"\n"s can be easily put back with corresponding
Perl script. If you sell consulting in Perl for some particular
field, in my case data loaders, you would not want somebody
on the client side to learn the technics and take the
business from you, eh?
Vlad
Bart Lateur wrote in message <365e8fec.532223@news.skynet.be>...
>Vlad Volkov wrote:
>
>>Can anybody suggest good obfuscation tool for Perl?
>
>Perl. Hey, isn'ty it obfuscated anough as it is? ;-)
>
>You could also remove comments, and delete any newlines you don't
>actually need. Talk about unreadable.
>
> Bart.
------------------------------
Date: Thu, 26 Nov 1998 17:02:25 GMT
From: "Peter R Lynch" <plynch@bbss.com>
Subject: Re: Perl CGI 500 Server Error on PWS
Message-Id: <BQf72.252$up4.815591@news.rdc1.nj.home.com>
Lonnie,
I setup Perl a while ago on a 95 machine which I currently don't have access
to but... I think your registry entry needs to be
HKEY_LOCAL_MACHINE/system/CurrentControlSet/Services/W3Svc/Parameters/Script
Map
Everything else looks fine to me.
Peter Lynch
------------------------------
Date: 26 Nov 1998 14:57:21 GMT
From: mattjm82@aol.com (Mattjm82)
Subject: Perl compiler?
Message-Id: <19981126095721.14389.00000234@ng24.aol.com>
Douse Perl need a complier like c++ and other programming languages? If so
about how much douse it go for? Thanks alot.
------------------------------
Date: Thu, 26 Nov 1998 11:03:46 -0300
From: "Jxrgen Vig Jensen" <jvj@greennet.gl>
Subject: Perl in HTML - without FORM
Message-Id: <bbd72.570$E67.1054@news.get2net.dk>
I want to execute a perl-program just by pressing a hyperlink.
Without any inputfields.
I have placed the html- and .pl on a linux web-server - and want to use it
by ie4 in windows95.
------------------------------
Date: Thu, 26 Nov 1998 18:30:16 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl in HTML - without FORM
Message-Id: <Pine.GSO.4.02A.9811261029240.23068-100000@user2.teleport.com>
On Thu, 26 Nov 1998, J=F8rgen Vig Jensen wrote:
> I want to execute a perl-program just by pressing a hyperlink.
What's stopping you? :-)
It sounds as if you want a server or a browser to run your program. Check
the docs, FAQs, and newsgroups about servers or browsers for information
on getting servers or browsers to do something. Good luck!
--=20
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 26 Nov 1998 18:19:26 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl parsing error
Message-Id: <Pine.GSO.4.02A.9811261017360.23068-100000@user2.teleport.com>
On Thu, 26 Nov 1998 jannuzzi@csn.com.br wrote:
> The error I got when I call the script URL is "Perl parsing errors".
That's not an error message listed in the perldiag manpage. Could it be
from an old version of Perl?
> When I comment the line "use LWP::UserAgent" the
> script run Ok.
Well, if that fixes things, why are you complaining? :-)
When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.
http://www.perl.com/CPAN/
http://www.perl.org/CPAN/
http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
http://www.perl.org/CPAN/doc/manual/html/pod/
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 26 Nov 1998 16:52:30 GMT
From: "Peter R Lynch" <plynch@bbss.com>
Subject: Rename problem using ActivePerl 507 PerlIIS.dll on IIS4.0 & NT 4.0 SP4
Message-Id: <iHf72.251$up4.811136@news.rdc1.nj.home.com>
I have a strange problem with the rename() function using the PerlIIS.dll
that came with ActivePerl 507 running with IIS 4.0 on an NT 4.0 SP4 box. I
keep getting an error indicating the file could not be renamed. However,
when I remap the .cgi extension to use the Perl.exe instead of the
PerlIIS.dll everything works fine. I figured it was a permissions problem
but I still get the error even when I give Full Control to EveryOne in the
directory and on all the files where the rename takes place. It's not a show
stopper for me but I'm curious if anyone has run into the same or similar
problem.
Peter Lynch
------------------------------
Date: Thu, 26 Nov 1998 18:37:00 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Rename problem using ActivePerl 507 PerlIIS.dll on IIS4.0 & NT 4.0 SP4
Message-Id: <Pine.GSO.4.02A.9811261034200.23068-100000@user2.teleport.com>
On Thu, 26 Nov 1998, Peter R Lynch wrote:
> I have a strange problem with the rename() function using the
> PerlIIS.dll that came with ActivePerl 507 running with IIS 4.0 on an
> NT 4.0 SP4 box. I keep getting an error indicating the file could not
> be renamed.
Maybe you're not giving the right file name, including its full path. If
you mention file "fred", that's fred in the current working directory. If
you haven't set your current working directory in a CGI program, there's
your bug.
> However, when I remap the .cgi extension to use the Perl.exe instead
> of the PerlIIS.dll everything works fine.
I suspect that your server gives CGI programs a different working
directory in different configurations.
Of course, this isn't a Perl problem; it would be just the same if your
programs were written in any other language. If you need more information
on your server or system, check the docs, FAQs, and newsgroups about those
topics.
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 26 Nov 1998 16:57:41 GMT
From: dan_stefura@mad.scientist.com
Subject: Serial programming question
Message-Id: <73k19v$8q3$1@nnrp1.dejanews.com>
Hello world,
I'm about to start a project of getting my Kodak DC-220 digital camera to talk
to my serial port using Linux. I am most likely going to do it in Perl, and
eventually use the GTK.
After hunting down info on serial port programming, I have found various
resources that should get me started.
The first stumbling block before I even start to write some code is this:
I need to send a pulse on the Reset/Att line sent from the host computer to
the camera. This pulse must be at least 50 microseconds. Once I do this I
will receive a packet and away I go sending and receiving more specially
constructed packets.
It sounds easy enough, but I see no mention of how to send a pulse on the
Reset/Att line, or anything about a Reset/Att line in the RS232 specs.
I'm guessing it's something relatively easy, and I'm overlooking something.
Thanks for your help in advance.
- dan -
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 26 Nov 1998 16:40:16 +0100
From: Stefan Voelkel <voelkel@hrz1.hrz.tu-darmstadt.de>
Subject: sql & perl how?
Message-Id: <365D7660.7299@hrz1.hrz.tu-darmstadt.de>
hello!
im looking for an tutorial or perl script or help file on how to use
perl with a mysql-database. i found this link on the mysql-manual but
theres only this script-package:
"Perl package to generate html from a SQL table structure and for
generating SQL statements from an html form. "
url: http://www.odbsoft.com/cook/sources.htm
and since im new to perl i dont know which are the *important* parts in
other words which procedures handle the sql-acces.
thx & cu stefan
------------------------------
Date: Thu, 26 Nov 1998 17:01:39 GMT
From: dave@mag-sol.com
Subject: Re: Substitution: \x & backreference
Message-Id: <73k1hc$8to$1@nnrp1.dejanews.com>
In article <365D4FA4.4EBE8CB4@info.vub.ac.be>,
Pieter Liefooghe <pieter@info.vub.ac.be> wrote:
> Hello,
>
> What I want to do is the following:
>
> given $FName = "http%3A%%2F%%2F%www.mysite.be"; I want to get
> "http://www.mysite.be"
>
> So I defined the following substitution:
>
> $FName =~ s/(%([0-9a-f_A-F]{2})%)/\x$2/ig;
>
> But I get the following:
>
> http3A2F2Fwww.mysite.be
>
> So this means he doesn't interprete \x$2 as being one (HEX) character
> definition.
>
> Any one of you PERL experts have an idea how to solve this?
Both CGI.pm and LWP contain functions to unescape URL encoding.
Probably best if you don't reinvent the wheel then.
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 26 Nov 1998 18:28:40 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Timeout on CGI-scripts that may block
Message-Id: <Pine.GSO.4.02A.9811261025410.23068-100000@user2.teleport.com>
On 26 Nov 1998, Jorn Topnes wrote:
> I wonder how I can set up a timeout-system just to be sure that my
> CGI-scripts wont block other scripts they share resources with. Can I
> give my scripts a timeout of say 5 minutes?
Probably that's a lot more time than they should need. But it sounds as if
you want an alarm. You don't have to write a signal handler; when the
signal comes in, your program will be killed by default. See the entry for
alarm in perlfunc. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 26 Nov 1998 18:07:41 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Training wheels for Perl (was: Re: use strict 'refs'; == valid Perl?)
Message-Id: <Pine.GSO.4.02A.9811261004050.23068-100000@user2.teleport.com>
On Wed, 25 Nov 1998, Larry Rosler wrote:
[about Lint checking for Perl]
> Is it unreasonable to hope that if this capability is valuable, it might
> at least be built in as a compiler option?
No, it's not unreasonable to hope. It's more realistic, though, to code.
Let us know when you have it ready! :-)
> As someone observed in regard to your adamant opposition to the '-w'
> flag as default, do you really object to fewer bewildered postings in
> this newsgroup?
Of course not. If you can make a way to warn beginners in a useful way
without getting in anyone's way or breaking old code, it would be hard to
find anyone who would oppose implementing it. Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 26 Nov 1998 16:38:11 +0100
From: david.drecq@dcg.sncf.fr
Subject: Re: Win32 and Perl modules (was Re: HELP !can't use GD.pm ....)
Message-Id: <365D75E1.3C6D7BC3@dcg.sncf.fr>
ok but what can we do if we can't pass through the enterprise proxy server?
I've the same problem to get the GD library!
;-((
ernie_oporto@mentorg.com wrote:
> In article <73gvfg$m5m$1@nnrp1.dejanews.com>,
> dturley@pobox.com wrote:
> > In article <365BB5DA.A02BCC19@rokura.roknet.ro>,
> > adi sorescu <guide@rokura.roknet.ro> wrote:
> >
> > > to bulid myself the binaries ) .I'm using ActiveState's perl bulid 507.
> >
> > > where can I find a gcc port to WIn32 to compile and install modules from
> > > CPAN ?
> >
> > You can find GD for win32 perl already compiled at the same place you found
> > Perl. Use PPM to install modules that need compiling. For other modules, I use
> > dmake to install them like you would under "real" Perl.
> >
> > David Turley
> > dturley@pobox.com
> > http://www.binary.net/dturley/
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
> >
>
> --
> http://www.geocities.com/SiliconValley/Park/9276
> _____/ ____ / /Ernie "Shokk" Oporto-SysAdmin
> _____ ____ / \ __ / __ / Mentor Graphics Corporation
> \______/ __ __ \______/ __ \___ __ \___ Ernie_Oporto@MentorG.com
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
--
_____________________________________________________________________
"L'imagination est plus importante que le savoir" (Albert EINSTEIN)
mailto:docgen@multimania.com
Soyez les bienvenus sur http://www.multimania.com/docgen/index.shtml
Thhmes abordis: le C.N.A.M., la ginialogie, France98
Rejoignez l'anneau web "LA GENEALOGIE FRANCOPHONE"
sur http://www.multimania.com/docgen/webring.html
_____________________________________________________________________
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4303
**************************************