[13973] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1383 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 15 14:05:41 1999

Date: Mon, 15 Nov 1999 11:05:19 -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: <942692719-v9-i1383@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 15 Nov 1999     Volume: 9 Number: 1383

Today's topics:
    Re: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 ###### <kgbates@i2k.net>
        ###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dl <kjh@kljd.dk>
    Re: $variable == null?? (Brett W. McCoy)
        ? Joining the associative array to the database. What h <lhauta@koti.tpo.fi>
    Re: another Reg. Exp. problem <reembar@netvision.net.il>
    Re: break in the loop <aqumsieh@matrox.com>
    Re: break in the loop (Brett W. McCoy)
    Re: Case sensitive command line options (Abigail)
        Catcha.com is hiring <jonwon@catcha.com>
    Re: CGI problem on Netscape <curtisj@bannerfusion.com>
        CGI question (Arul Singam)
    Re: CGI question (Brett W. McCoy)
    Re: CGI question <jeffp@crusoe.net>
    Re: CHMOD for Net::FTP. Help, cool hackers ! <flavell@mail.cern.ch>
        File read-write krishnasanjay@my-deja.com
        Forms data <kupa@cmail.cz>
    Re: HELP - Need DBI::Oracle Binaries (?) for Solaris (Eisen Chao)
    Re: How can I vist a number of websites and email addys <gellyfish@gellyfish.com>
    Re: How can I vist a number of websites and email addys (Brett W. McCoy)
        http redirection perlkeith@hotmail.com
    Re: Is $$variable allowed like in PHP ? <uri@sysarch.com>
        MakeMaker generates ``PREFIX=<...>''-ingnorant Makefile <mp@dfki.de>
    Re: mSQL/Perl <hartleh1@westat.com>
        Net::FTP error trapping <ken.chesak@dhs.state.tx.us>
        OO woes (David Cantrell)
    Re: OO woes (Brett W. McCoy)
    Re: pb calling external command in CGI <cbrunet@wanadoo.fr>
    Re: Perl and commonsense part 2 (H. Merijn Brand)
    Re: Perl and commonsense part 2 <uri@sysarch.com>
        Perl Scripts for NT <test@test.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 15 Nov 1999 18:50:09 +0000
From: Krystian Bates <kgbates@i2k.net>
Subject: Re: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dlkh 0596';  gp[5ifkl'l
Message-Id: <383055E1.CE194ACE@i2k.net>

This is a multi-part message in MIME format.
--------------8D5C7EC28BE3561AB8318AC8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
body onload="window.open('<A HREF="http://www.chat.ru/~pers_comp/index.htm">http://www.chat.ru/~pers_comp/index.htm</A>','RemoteWindow')"
dkjh wrote:
<blockquote TYPE=CITE>&nbsp;
<br>###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dlkh 0596'; gp[5ifkl'l</blockquote>
Don't you just hate this junk? Frickin' javascripted mailbombs. Now I know
why half of everyone uses the old school readers.
<br>-- Krystian Bates
<br><a href="http://www.geocities.com/kgbates">Blackstaff Graphics</a>
<br><a href="mailto:kgbates@i2k.net">eMail</a>
<br>&nbsp;</html>

--------------8D5C7EC28BE3561AB8318AC8
Content-Type: text/x-vcard; charset=us-ascii;
 name="kgbates.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Krystian Bates
Content-Disposition: attachment;
 filename="kgbates.vcf"

begin:vcard 
n:Bates;Krystian
x-mozilla-html:TRUE
url:http://www.geocities.com/kgbates
org:Blackstaff Graphics
adr:;;800 1st Ave	;Alpena;MI;49707;
version:2.1
email;internet:kgbates@i2k.net
x-mozilla-cpt:;0
fn:Krystian Bates
end:vcard

--------------8D5C7EC28BE3561AB8318AC8--



------------------------------

Date: Mon, 15 Nov 1999 20:34:36 +0300
From: dkjh <kjh@kljd.dk>
Subject: ###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dlkh 0596'; gp[5ifkl'l
Message-Id: <3830442B.40083B8A@kljd.dk>


--------------ACAA02C373F6AD520BF8026F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dlkh 0596';
gp[5ifkl'l

--------------ACAA02C373F6AD520BF8026F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
<BODY onload="window.open('http://www.chat.ru/~pers_comp/index.htm','RemoteWindow')">
<BR>###### GET YOUR PentiumII-366 FOR ONLY $9.99 #######;dlkh 0596'; gp[5ifkl'l</HTML>

--------------ACAA02C373F6AD520BF8026F--





------------------------------

Date: Mon, 15 Nov 1999 18:21:00 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: $variable == null??
Message-Id: <slrn830jse.39i.bmccoy@moebius.foiservices.com>

Also Sprach Abel Almazán <abel.almazan@ogilvyinteractive.es>:

>How can i know if a var is null??
>
>syntax to do that

Do you mean if a variable is 0 or "0" or if a variable is undefined?
These are different things.  You can test for boolean falseness if a
variable is 0 or "0", but not if it is undefined (undef).  For that, you
use the defined function:

if(defined $t_hash{$t_key}) {
	do_stuff();
}
else {
	$t_hash{$t_key} = $some_value;
}

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


------------------------------

Date: Mon, 15 Nov 1999 20:18:46 -0000
From: "Lassi Hautakangas" <lhauta@koti.tpo.fi>
Subject: ? Joining the associative array to the database. What happens ?
Message-Id: <80piqv$6np$1@news.koti.tpo.fi>

I would have a question which applies to the combining of an
 associative array and database.

Example
  "dbmopen(%assosiative_array,"database");"

What took place after this command ?
Was the whole huge database now read to the central memory ?




------------------------------

Date: Mon, 15 Nov 1999 19:14:00 +0200
From: Re'em Bar <reembar@netvision.net.il>
To: Tom Briles <sariq@texas.net>
Subject: Re: another Reg. Exp. problem
Message-Id: <38303F58.E9EEB3C7@netvision.net.il>

Tom, if you don't like my questions, just ignore them.
You probably are able even to exclude my messages in your news reader if
you find them so unpleasant. should I found the answer in the FAQ I
wouldn't bother myself.
I meant exactly what I wrote.
-- 
Re'em
http://snark.co.il


------------------------------

Date: Mon, 15 Nov 1999 11:08:01 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: break in the loop
Message-Id: <x3yg0y7rb4u.fsf@tigre.matrox.com>


Howard <hxshxs@my-deja.com> writes:

> how do I break out of the foreach loop?

Checkout the section on "Loop Control" in perlsyn.

--Ala



------------------------------

Date: Mon, 15 Nov 1999 18:28:47 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: break in the loop
Message-Id: <slrn830kb1.39i.bmccoy@moebius.foiservices.com>

Also Sprach Howard <hxshxs@my-deja.com>:

>how do I break out of the foreach loop?

use last for break and next for continue;  You can also do named nexts:

LINE: foreach $i (@values) {
	
	if($i eq 'TOP') {
		next LINE;
	}
	elsif ($i eq 'BOTTOM') {
		last LINE;
	}
	
	do_stuff();
}

This gives you more flexibility over *which* loop you want to break out of
-- something you can't do in C.

last 

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


------------------------------

Date: 15 Nov 1999 12:41:54 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Case sensitive command line options
Message-Id: <slrn830l63.cvu.abigail@alexandra.delanet.com>

Soeren Gehrke (Soeren.Gehrke@eed.ericsson.se) wrote on MMCCLXVII
September MCMXCIII in <URL:news:382FFB6D.3ADA0825@eed.ericsson.se>:
|| 
|| 
|| Why the package "Getopt::Long" doesn't distinguish between the "-l" and
|| the "-L" command line options?


Because it was designed that way.

If you want to distinguish case, RTFM. It's there, plain in sight.
Just scroll down a bit.


Abigail
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


------------------------------

Date: Tue, 16 Nov 1999 02:21:02 +0800
From: "John Wong" <jonwon@catcha.com>
Subject: Catcha.com is hiring
Message-Id: <80pj96$as6$1@clematis.singnet.com.sg>

Catcha.com is hiring!!!

20 x Web Developers!!!

High salary with benefits package!!!

Here is what you need:

If you enjoy developing web applications,
database applications and interactive
applications on the web, here is the job
for you!!

With 1-2 years related web programming experience,
well-versed in the following, C++, Java Programming,
CGI, Perl, MySQL, PHP, Oracle, Unix and Apache.
You must be internet-savvy, able to work long hours.

Diploma holders are encouraged to apply.
Students on holiday are encouraged to apply too.

If you are working now, we can negotiate to pay
your annual bonus.

Drop John a call at (65)733 6166 anytime NOW to
arrange for an interview.  Hope to hear from you.

If you need to find out about us,
check out our web site @
http://www.catcha.com/pr.htm


+++++++++++++++++++++++
John Wong
CTO
Catcha.com
Phone: 65 733 6166
Fax: 65 733 0915
HP: 65 9655 2247

www.catcha.com.sg
Singapore's No.1 Local Search Engine Portal
+++++++++++++++++++++++




------------------------------

Date: Mon, 15 Nov 1999 12:02:11 -0500
From: "Curtis Jones" <curtisj@bannerfusion.com>
To: <comp.lang.perl.misc@list.deja.com>
Subject: Re: CGI problem on Netscape
Message-Id: <00e801bf2f8b$29ab1220$8b00000a@aascatl.com>

NN is not recognizing the MIME type you are sending. You may have simply not
typed it correctly, or perhaps NN is being capitalization sensitive - I've
never tested whether it was or not, so, it's just a guess. Anyway....

Preface all HTML output with:

        Content-type: text/html\n\n

or

        print $query->header;

if you are using CGI.pm

-Curtis


> Hi,
>
> I am trying to run a cgi script with Netscape 4.6. It is supposed to show
> me the HTML page. But it asks me whether I want to Open/Save the output.
> When I open it, it shows the HTML statements in the editor instead of
> showing them in the browser.
>
> The script runs fine in IE5. What may be the reason for this  and way
> around this ?
>
> Regards,
> Lalit



 Sent via Deja.com http://www.deja.com/
 Before you buy.


------------------------------

Date: 15 Nov 1999 18:04:34 GMT
From: ansingam@chat.carleton.ca (Arul Singam)
Subject: CGI question
Message-Id: <80phvi$98r$1@bertrand.ccs.carleton.ca>

Hello,
	I need to get values from many input fields depending on the number
of fields changed.

For example if something was entered in 40 text fields, i need to get the
input from those forty textfields.. which means i need to keep an index
variable to access the various text fiels..
but

$result = $FORM{'Field$i'};
deosnt seem to work, where $i is the index number.

could someone tell me if there's any other way to get the input other than
stating the field's name explicitly.

Thank you
A


------------------------------

Date: Mon, 15 Nov 1999 18:34:09 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: CGI question
Message-Id: <slrn830kl3.39i.bmccoy@moebius.foiservices.com>

Also Sprach Arul Singam <ansingam@chat.carleton.ca>:

>For example if something was entered in 40 text fields, i need to get the
>input from those forty textfields.. which means i need to keep an index
>variable to access the various text fiels..
>but
>
>$result = $FORM{'Field$i'};
>deosnt seem to work, where $i is the index number.
>
>could someone tell me if there's any other way to get the input other than
>stating the field's name explicitly.

Uh, don't you think an array would suit you better?

$result = $field[$i];

or (using a hashed reference to an array):

$result = $FORM{fields}->[$i];

At any rate, if you are using sequentially indexed lists, use an array.

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


------------------------------

Date: Mon, 15 Nov 1999 13:50:22 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: CGI question
Message-Id: <Pine.GSO.4.10.9911151350010.24181-100000@crusoe.crusoe.net>

[posted & mailed]

> $result = $FORM{'Field$i'};
> deosnt seem to work, where $i is the index number.

Try using double quotes.

-- 

  MIDN 4/C PINYAN, USNR, NROTCURPI     http://www.pobox.com/~japhy/
  jeff pinyan: japhy@pobox.com     perl stuff: japhy+perl@pobox.com
  "The Art of Perl"               http://www.pobox.com/~japhy/book/      
  CPAN ID: PINYAN  http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/
  PerlMonth - An Online Perl Magazine     http://www.perlmonth.com/



------------------------------

Date: Mon, 15 Nov 1999 19:37:10 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: CHMOD for Net::FTP. Help, cool hackers !
Message-Id: <Pine.HPP.3.95a.991115192523.15434J-100000@hpplus01.cern.ch>

On Mon, 15 Nov 1999, Bruce Blackshaw wrote:

> AFAIK standard FTP does not permit chmod operations.

Did you check the previous answers on the thread before posting this
claim?

Nothing personal, but if they hadn't arrived by the time that you
posted, then your news server must be so lame that it's frankly not
worth your effort in contributing here. 

While it's doubtless true that "standard" FTP does not _require_ CHMOD
to be supported (how could a cross-system transfer protocol require
anything that's OS-specific?), it's definitely false to claim that it
"does not permit" it. 

Anyhow, this gives me the chance to say sorry for overlooking the "site"
method of Net::FTP, which is clearly the more suitable way of issuing
this, and suggesting the "quot" method, which I still suppose would
work, but would be sub-optimal.




------------------------------

Date: Mon, 15 Nov 1999 18:26:06 GMT
From: krishnasanjay@my-deja.com
Subject: File read-write
Message-Id: <80pj7m$djv$1@nnrp1.deja.com>

I have the following text file :
----------------
This is a test
 ..
 ..
pattern delete this
and also this.
-----------------
Now I want to delete everything in the file after
the pattern is encountered. I know for sure that
the pattern occurs only once in the entire file.
In the example shown above, I want to delete
"delete this" and "and also this". I do not want
to open another file and copy all the contents
over until I reach the pattern. Any help is
greatly appreciated.

Thanks
Sanjay


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: Mon, 15 Nov 1999 18:27:21 +0100
From: "Pavel Kunc" <kupa@cmail.cz>
Subject: Forms data
Message-Id: <80pfla$eo6$1@news.inet.tele.dk>

hi,

i need some help with forms. I need to get $sql in the form "author LIKE
shakespeare AND author LIKE goethe", but script down prints only "author
LIKE shakespeare".

Why?


use CGI;
$query = new CGI;
%Pary;
for (@names) {$Pary{$_} = $query->param($_);}

$sql = join ' AND ', map{$_.' LIKE '.$Pary{$_};} sort keys %Pary;

print "Content-type: text/html", "\n\n";
print "$sql", "<br>", "\n";
exit (0);




------------------------------

Date: Mon, 15 Nov 1999 17:47:22 GMT
From: echao@interaccess.com (Eisen Chao)
Subject: Re: HELP - Need DBI::Oracle Binaries (?) for Solaris
Message-Id: <s30hpatphsq81@corp.supernews.com>

David Cassell (cassell@mail.cor.epa.gov) wrote:
: Eisen Chao wrote:
: > Thus I am asking anyone who has the following:
: > 1), 2), 3) 4)...
: > to be so kind as to tar/zip me their build of DBI::Oracle.
: 
: A couple problems here.
: 
: [1]  Having not built DBI::Oracle, I can't say for sure
: whether the above information is sufficient to create a
: usable build.  In general, people who try this sort of
: thing with building Perl itself have bad results, so I
: wouldn't expect this to work.

  I was on the DBI users forum (web-based) and
  there was indeed a msg saying it could be done...

  (between two machines of the same OS & mfg)...

: [2]  I would expect that you would have better luck 
: building this using gcc than with that *thing* that
: Sun calls a C compiler.  gcc is free, you know.

  The problem is there are Oracle specific libs/etc 
  which have to be linked. For that I think you 
  need the C compiler from Oracle to do this...

: [3]  Sun has lots of free stuff at sunsite.  Have you
: checked whether this is already built for you there?

  Yes, the only item related to Perl is Perl itself.

  No binaroes or anything else. And CPAn has only
  pre-builds, not any finished products.

: [4]  Granted, switching to Microsoft may not be fun
: for the people who do the real computer work, but is
: it a good idea to sneak around behind the backs of
: Those In Charge Of Paychecks? 

  Shee-*t, it's not only a good idea but necessary.

  The supposed Web-server admin doesn't even know where
  the log files for the Netscape Enterprise Server is,
  they are *that* committed to supporting the UNIX machine.

  OTOH, the M$ admin freely admits that the M$ web server
  is prone to inexplicable self-boots; perhaps he is
  confident in the knowledge that we can't go anywhere
  else to develop stuff ?

: Maybe you could take one of them out for beers and have a
: civil discussion about alternatives. 
: Not everyone is Dilbert's boss.

  Fahgeddabouthat, the IS/It dept might as well be a buncha
  androids. Cam't even ask them what the SMTP server is 
  without it becoming a full-blown user request that gets
  processed by IBM (our outsourced operations dept) in
  St. Louis....

  They have a *DEFINITE* mandate to strangle the UNIX systems.
: 
: David
: -- 


------------------------------

Date: 15 Nov 1999 12:28:10 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: How can I vist a number of websites and email addys
Message-Id: <80ou8q$1ep$1@gellyfish.btinternet.com>

On Sat, 13 Nov 1999 02:51:08 GMT tony_123@my-deja.com wrote:
> 
> How can I write a script that given a web site address, will go to that
> site and extract all email addresses from that page.  I want to know
> what modules would help in doing this,  is there already a script out
> there that does this, those sort of things.
> 

I would use a pen and paper: infact *I* wouldnt do this at all - I can see
no legitimate reason for harvesting email addresses.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>
<http://www.gellyfish.com>
Hastings: <URL:http://dmoz.org/Regional/UK/England/East_Sussex/Hastings>


------------------------------

Date: Mon, 15 Nov 1999 18:36:39 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: How can I vist a number of websites and email addys
Message-Id: <slrn830kpp.39i.bmccoy@moebius.foiservices.com>

Also Sprach Jonathan Stowe <gellyfish@gellyfish.com>:

>I would use a pen and paper: infact *I* wouldnt do this at all - I can see
>no legitimate reason for harvesting email addresses.

Other than pissing off an entire newsgroup by asking how to do it.

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


------------------------------

Date: Mon, 15 Nov 1999 17:40:07 GMT
From: perlkeith@hotmail.com
Subject: http redirection
Message-Id: <80pghn$ban$1@nnrp1.deja.com>

dear all, i wrote a routine to get web page information using a LWP
module, but the URL I specified in the $ua->request redirected me
to another URL, so that I can't get the page result. Glad to have your
supports. thx.

Keith Chang


Sent via Deja.com http://www.deja.com/
Before you buy.


------------------------------

Date: 15 Nov 1999 13:27:15 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Is $$variable allowed like in PHP ?
Message-Id: <x7hfinwqyk.fsf@home.sysarch.com>

>>>>> "BE" == Ben Evans <bene@chiark.greenend.org.uk> writes:

  BE> So for quick and dirty scripts of up to a few hundred lines
  BE> where I pretty much know exactly what I want to be doing,
  BE> and I'm not depending on user input in any but the most
  BE> restricted way, there's no real problem[1] with soft references?

well, you won't get any help here to fix your bugs. you will have much
harder bugs to fix. perldb won't be able to print out data trees made
from symrefs while it can do fine with hashes (of hashes). you will be a
pariah in any perm monger meetings.

i think those are enough reasons to not use symrefs for basic data
structures. they should be left ONLY for symbol table hacking and black
magic inside modules. there IS NO GOOD REASON to use them for data
handling. period. don't use them. 

the motto is:

if you don't know why not to use symrefs for data, you aren't smart
enough to know where and how to use them.

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: 15 Nov 1999 19:18:13 +0100
From: Markus Pilzecker <mp@dfki.de>
Subject: MakeMaker generates ``PREFIX=<...>''-ingnorant Makefile
Message-Id: <kpn1sf8vq2.fsf@dfki.de>

I experienced this, while trying to build mod_perl /*with a little 
help of rpm*/ in a non-root and relocated environment, 
i.e. my perl-5.00503 has been relocated after its ``make install''
and this movement has been ``documented'' in Config.pm.
The perl installation seems to work fine, as far as tested up to now.

Trying to build mod_perl-1.21 under these conditions shows up, that 
MakeMaker takes its information about filesystem locations out of 
Config.pm, so that the corresponding section of the generated 
Makefile looks as follows:
-----8<-------
# --- MakeMaker constants section:
AR_STATIC_ARGS = cr
NAME = mod_perl
DISTNAME = mod_perl
NAME_SYM = mod_perl
VERSION = 1.21
VERSION_SYM = 1_21
XS_VERSION = 1.21
INST_BIN = blib/bin
INST_EXE = blib/script
INST_LIB = blib/lib
INST_ARCHLIB = blib/arch
INST_SCRIPT = blib/script
PREFIX = /usr
INSTALLDIRS = site
INSTALLPRIVLIB = /export/mp/lib/perl5/5.00503
INSTALLARCHLIB = /export/mp/lib/perl5/5.00503/sparc-solaris
INSTALLSITELIB = /export/mp/lib/perl5/site_perl/5.005
INSTALLSITEARCH = /export/mp/lib/perl5/site_perl/5.005/sparc-solaris
INSTALLBIN = /export/mp/bin
INSTALLSCRIPT = /export/mp/bin
PERL_LIB = /export/mp/lib/perl5/5.00503
PERL_ARCHLIB = /export/mp/lib/perl5/5.00503/sparc-solaris
SITELIBEXP = /export/mp/lib/perl5/site_perl/5.005
SITEARCHEXP = /export/mp/lib/perl5/site_perl/5.005/sparc-solaris
LIBPERL_A = libperl.a
FIRST_MAKEFILE = Makefile
MAKE_APERL_FILE = Makefile.aperl
PERLMAINCC = $(CC)
PERL_INC = /export/mp/lib/perl5/5.00503/sparc-solaris/CORE
PERL = /export/mp/bin/perl
FULLPERL = /export/mp/bin/perl
------8<---------

I'd like to use 

  make install PREFIX=$RPM_BUILD_ROOT%{prefix} 

to get my mod_perl files installed to the temporary install 
location on $RPM_BUILD_ROOT%{prefix}, which of course does not
work, since the PREFIX-setting isn't propagated into the 
corresponding definitions for the target directories.
For this purpose it would require to declare:
------8<------
INSTALLPRIVLIB = $(PREFIX)/lib/perl5/5.00503
INSTALLARCHLIB = $(PREFIX)/lib/perl5/5.00503/sparc-solaris
INSTALLSITELIB = $(PREFIX)/lib/perl5/site_perl/5.005
INSTALLSITEARCH = $(PREFIX)/lib/perl5/site_perl/5.005/sparc-solaris
INSTALLBIN = $(PREFIX)/bin
INSTALLSCRIPT = $(PREFIX)/bin
------8<------
and may be some analogous replacement for other variables.

Furthermore, we have to have a clear distinction between variable 
definitions, which determine target directories for installation
and others, which refer to perl stuff, needed for the installation
process itself.  The latter should of course refer to Config.pm


Should I have not been precise enough, I'll certainly be more 
explicit on request,

  Markus



PS: ... or would the proper location for my proposed changes be 
    Config.pm itself??



------------------------------

Date: Mon, 15 Nov 1999 13:54:52 -0500
From: HHH <hartleh1@westat.com>
Subject: Re: mSQL/Perl
Message-Id: <383056FC.BA93579C@westat.com>

Erick Jensen wrote:
> 
> The first field in the table I am inserting into is an ID field (just a integer
> I use as a primary key) which gets incremented with each new record.  

1. This has nothing whatsoever to do with Perl.
2. The question is probably answered in the mSQL documentation.

I do know that in MySQL you can define a field as "auto_increment" when
you create it (or you can alter the table after the fact).  Then in your
SQL to insert a record you assign that field the value NULL and it gets
a number automatically.

HHH


------------------------------

Date: Mon, 15 Nov 1999 11:16:59 -0600
From: "Ken Chesak" <ken.chesak@dhs.state.tx.us>
Subject: Net::FTP error trapping
Message-Id: <80pfcm$l5e$1@news.tdh.state.tx.us>


I am using the following perl script to ftp Files.  I recently adding
statements to check for sucessfull completion of each step.  I was
surprised that I needed to use a different object to check the status of the
connect, login and put.  Is there a better way to accomplish this?

#!/usr/local/bin/perl5 -w

use strict;
use Net::FTP;
my($return,$host,$ftp);

$host="123.123.123.123";
$ftp=Net::FTP->new($host,Debug=>1);
### checking there error status via $@
if ($@) {
     print "connection to $host failed \n";
     print "error msg=$@ \n";
     die;
}

$ftp->login("DEF","ABC","XYZ");
### checking error via $ftp->login
if (!$ftp->login) {
     print "login to $host failed \n";
     die;
}

$ftp->ascii();
### checking error via return status
$return=$ftp->put("/ievs/data/abdata","ababdata");

if (!$return) {
     print "put to $host failed \n";
     die;
}

The program runs fine.  I am interested in increasing my knowledge about
return status and error trapping in perl.  I have already done perldoc
Net::FTP.

Thanks




------------------------------

Date: Mon, 15 Nov 1999 17:21:52 GMT
From: NukeEmUp@ThePentagon.com (David Cantrell)
Subject: OO woes
Message-Id: <38304066.427983157@10.0.0.155>

Quick OO-perl question for you:

Imagine you have two classes, classA and classB.  If objectA (an
instance of classA) calls classB->new() to instantiate objectB, is
there any way that objectB can get a reference to objectA without me
having to pass objectA to classB->new()?

caller() is not useful here, as it can only tell me the caller is an
instance of classA.

I'd rather not have to pass the reference to objectA into
classB->new() as that will break my nice clean interface by
introducing a special case for a few classes.

I can't look in Damian Conway's excellent OO-perl book ATM cos it's
about 200 miles away :-(

-- 
David Cantrell, part-time Unix/perl/SQL/java techie
                full-time chef/musician/homebrewer
                http://www.ThePentagon.com/NukeEmUp


------------------------------

Date: Mon, 15 Nov 1999 18:50:28 GMT
From: bmccoy@foiservices.com (Brett W. McCoy)
Subject: Re: OO woes
Message-Id: <slrn830ljm.39i.bmccoy@moebius.foiservices.com>

Also Sprach David Cantrell <NukeEmUp@ThePentagon.com>:

>Imagine you have two classes, classA and classB.  If objectA (an
>instance of classA) calls classB->new() to instantiate objectB, is
>there any way that objectB can get a reference to objectA without me
>having to pass objectA to classB->new()?
>
>caller() is not useful here, as it can only tell me the caller is an
>instance of classA.

A code example would help clarify exactly what you want to do here.  A
reference to the calling object is passed implicitly as the first
argument to the method (i.e., $self, $this).  You can use that to give to
ObjectB's constructor.  Since Perl keeps track of objects by reference,
and you return a reference to the B object, it will contain a reference to
the A object as well -- a variation on the closure technique.

At least that's how I think it might work.

-- 
Brett W. McCoy                             bmccoy@foiservices.com
Computer Operations Manager (Alpha Geek)   http://www.foiservices.com
FOI Services, Inc./DIOGENES                301-975-0110
---------------------------------------------------------------------------


------------------------------

Date: Mon, 15 Nov 1999 18:11:15 +0100
From: Chris Brunet <cbrunet@wanadoo.fr>
Subject: Re: pb calling external command in CGI
Message-Id: <38303EB3.1172E0B9@wanadoo.fr>

at last it's a question of version.

with the latest  (active perl 522) the problem is resolved


Chris Brunet wrote:

> hi,  I have a problem in a cgi program on IIS server:
>
> I need to call an external command ( I've tried frist with dir for
> example);
>
> I haved typed
>
> @lines = `dir`;
> print @lines;
>
> It work in dos mode, in unix shell mode (with ls obviously) and on a
> netscape enterprise server,
> but on IIS 4 server, nothing at all, no output, nothing in STDERR nor in
> STDOUT
>
> I have tried too with an open pipe, with the same result,
>
> Any idea ?????



------------------------------

Date: 15 Nov 1999 12:39:14 GMT
From: h.m.brand@hccnet.nl (H. Merijn Brand)
Subject: Re: Perl and commonsense part 2
Message-Id: <8E7F83935Merijn@192.0.1.5>

bart.lateur@skynet.be (Bart Lateur) wrote in
<382e882c.241065@news.skynet.be>:

>Uri Guttman wrote:
>
>>if all you will do is test for existance of the key then this is even
>>simpler:
>>
>>     @hash{ @array } = () ;
>
>Which is very fast compared to any other method. However, *who* in is
>right mind would test only for existence of a key, if you're free to
>choose whatever hash value you like?
>
>Any other way of initializing a hash is more cumbersome, and/or more
>slow (up to by a factor of 3). Which is a shame.
>
>     @hash{@array} = (1) x @array;
>     @hash{@array} = 1 .. @array;
>     %hash = map { $_ => 1 } @array;
>     $hash{$_}++ foreach @array;
>

Any of these methods can be faster by pre-allocating the hash:

  keys my %hash = @array;

Which can also be found inthat brilliant document about sorting
using packed-default.

--
H.Merijn Brand
using perl5.005.03 on HP-UX 10.20, HP-UX 11.00, AIX 4.2, AIX 4.3,
	   DEC OSF/1 4.0 and WinNT 4.0, often with perlTk 800.015
ftp://ftp.funet.fi:/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/
Member of Amsterdam Perl Mongers (http://www.amsterdam.pm.org/)


------------------------------

Date: 15 Nov 1999 13:18:51 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Perl and commonsense part 2
Message-Id: <x7ln7zwrck.fsf@home.sysarch.com>

>>>>> "A" == Abigail  <abigail@delanet.com> writes:

  A>     is worth the money. (Uri: when I have finished reading the book, I'll
  A>     send you a review).

can you also send me the hash of book factoids? i can send you one to
put values in.

thanx,

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: Mon, 15 Nov 1999 13:33:55 -0800
From: "test test" <test@test.com>
Subject: Perl Scripts for NT
Message-Id: <s30jue3ghsq40@corp.supernews.com>

Hi,

I'm looking for some free perl scripts that are already ported to NT.  If
you could refer me to some good sources it would be greatly appreciated.

Thanks.

Bruno




------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V9 Issue 1383
**************************************


home help back first fref pref prev next nref lref last post