[16115] in Perl-Users-Digest
Perl-Users Digest, Issue: 3527 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 30 18:10:30 2000
Date: Fri, 30 Jun 2000 15:10:18 -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: <962403017-v9-i3527@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 30 Jun 2000 Volume: 9 Number: 3527
Today's topics:
Re: Return an array of hashes from C++? <dan@tuatha.sidhe.org>
Re: Still stuck: "converting rel. HTML paths into abs. <jeff@vpservices.com>
Re: Still stuck: "converting rel. HTML paths into abs. <j.bessels@quicknet.nl>
Re: Still stuck: "converting rel. HTML paths into abs. (Randal L. Schwartz)
Re: Still stuck: "converting rel. HTML paths into abs. <j.bessels@quicknet.nl>
STRINGINDEX (Ross Clement)
Re: STRINGINDEX <sariq@texas.net>
Re: STRINGINDEX <aqumsieh@hyperchip.com>
Re: STRINGINDEX <tony_curtis32@yahoo.com>
threaded perl for windoze? <johnston.p@worldnet.att.net>
Toronto, Canada: Junior-Intermediate Perl Software Deve <mpope@ematchcorp.com>
Re: Use of uninitialized value <remove.this.talexb@tabsoft.on.ca>
Use Win32::NetAdmin in CGI <thomastk@hotmail.com>
What is $foo&? <johnny@johnnyamos.com>
Re: What is $foo&? <johnny@johnnyamos.com>
When new edition of Lincoln Stein's CGI book? (David Combs)
Re: When new edition of Lincoln Stein's CGI book? <makarand_kulkarni@My-Deja.com>
Re: Windows paths for PERL's 'glob' command <nnickee@nnickee.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 30 Jun 2000 19:36:13 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Return an array of hashes from C++?
Message-Id: <NE675.1176$cu1.4755@news1.rdc1.ct.home.com>
John Favazza <jfavazza@mediaone.net> wrote:
> Hi,
> I am writing my own C++ extension and I need to return an array of
> hashes from C++ to Perl. Is this possible?
Strictly speaking no, since you can't return an array in perl at all,
but...
If you need to return a reference to an array of hashes that you can use
like so:
$ref = my_func();
$ref->[2]{bar};
That's relatively easy--create an AV inside your C++ code and push a bunch
of HV * onto it.
If, on the other hand, you want to use it like this:
@array = my_func();
$array[12]{bar};
that's arguably easier--with that you just create a bunch of hashes and
push the HV * onto the stack.
Either way, read the perlguts, perlxs, and perlxstut docs. They've got the
details you need. (And there are more than can easily make it into a news
posting)
Dan
------------------------------
Date: Fri, 30 Jun 2000 12:21:15 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Still stuck: "converting rel. HTML paths into abs. paths
Message-Id: <395CF32B.568E3ADF@vpservices.com>
"Randal L. Schwartz" wrote:
>
> to do that rather directly. The current code uses HTML::Filger
You probably meant HTML::Folgers, the module that makes your coffee for
you while you browse the web. Personally I prefer HTML::Coffee-people
but it is now deprecated so I sometimes need to resort to
HTML::Starbucks.
--
Jeff
------------------------------
Date: Fri, 30 Jun 2000 22:16:23 +0200
From: Jan Bessels <j.bessels@quicknet.nl>
Subject: Re: Still stuck: "converting rel. HTML paths into abs. paths
Message-Id: <395D0017.36C36093@quicknet.nl>
"Randal L. Schwartz" wrote:
> [comp.lang.perl doesn't exist. stop trying to post to it]
It does exist on the NNTP server of my ISP - www.quicknet.nl.
> >>>>> "Jan" == Jan Bessels <j.bessels@quicknet.nl> writes:
>
> Jan> I'm starting to feel very silly but for the live of me I can't figure
> Jan> out how to get a $parsed_html which is the same as $html but with all
> Jan> relative paths changed into absolute paths. Its probably very simple,
> Jan> but I just don't see it.............. Any hints/tips/snippets of code
> Jan> are VERY much appreciated. My boss starts breathing down my neck ;-(
>
> It should be fairly trivial to adapt the core of the code from
>
> http://www.stonehenge.com/merlyn/WebTechniques/col22.html
>
> to do that rather directly. The current code uses HTML::Filger to
> make URLs pointing "inside" the tree to be relative, and "outside" the
> tree to be absolute, but all you'd need to do is fix that test so it
> always comes back absolute.
Thanks very much for your suggestions. Gonna give it a try. I think its
precisely what I need. Gonna observe the code and find out what I'm doing wrong,
more importantly how exactly it does work.
Jan B.
------------------------------
Date: 30 Jun 2000 13:25:31 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Still stuck: "converting rel. HTML paths into abs. paths
Message-Id: <m1wvj6hq6c.fsf@halfdome.holdit.com>
>>>>> "Jan" == Jan Bessels <j.bessels@quicknet.nl> writes:
Jan> "Randal L. Schwartz" wrote:
>> [comp.lang.perl doesn't exist. stop trying to post to it]
Jan> It does exist on the NNTP server of my ISP - www.quicknet.nl.
Please inform your news admins that they're carrying a group that's
been dead for five years then.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Fri, 30 Jun 2000 22:46:36 +0200
From: Jan Bessels <j.bessels@quicknet.nl>
Subject: Re: Still stuck: "converting rel. HTML paths into abs. paths
Message-Id: <395D072C.884461CE@quicknet.nl>
"Randal L. Schwartz" wrote:
> >>>>> "Jan" == Jan Bessels <j.bessels@quicknet.nl> writes:
>
> Jan> "Randal L. Schwartz" wrote:
> >> [comp.lang.perl doesn't exist. stop trying to post to it]
>
> Jan> It does exist on the NNTP server of my ISP - www.quicknet.nl.
>
> Please inform your news admins that they're carrying a group that's
> been dead for five years then.
I do absolutely believe you. The comp.lang.perl group seems however to be quite
lively. In the period 4-june-2000 till now 637 were posted. Just stating the
facts. Have a feeling that the admins will not quite believe me when I tell them
that comp.lang.perl doesn't exist anymore. I believe that even the company I work
for (large ISP, www.planet.nl) carries comp.lang.perl.
Jan Bessels
------------------------------
Date: 30 Jun 2000 18:06:03 GMT
From: clemenr@westminster.ac.uk (Ross Clement)
Subject: STRINGINDEX
Message-Id: <395cd37b@ant.wmin.ac.uk>
Hi. I can't seem to find a particular string function in Perl. Like
String.indexOf() in Java, returns the (integer) position of a string
inside another string, or -1 if it's not present. Anything similar?
Cheers,
Ross-c
------------------------------
Date: Fri, 30 Jun 2000 13:53:34 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: STRINGINDEX
Message-Id: <395CECAE.8A1BA04D@texas.net>
Ross Clement wrote:
>
> Hi. I can't seem to find a particular string function in Perl. Like
> String.indexOf() in Java, returns the (integer) position of a string
> inside another string, or -1 if it's not present. Anything similar?
Perl's base functions are documented in the perlfunc page of the
manual. Type:
perldoc perlfunc
on your command line, and perhaps you'll be able to find a function
which will help you find the index of a substring in a string.
HTH! GLWI!
- Tom
------------------------------
Date: Fri, 30 Jun 2000 19:03:13 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: STRINGINDEX
Message-Id: <7a1z1f56vg.fsf@merlin.hyperchip.com>
clemenr@westminster.ac.uk (Ross Clement) writes:
> Hi. I can't seem to find a particular string function in Perl. Like
> String.indexOf() in Java, returns the (integer) position of a string
> inside another string, or -1 if it's not present. Anything similar?
perldoc -f index
--Ala
------------------------------
Date: 30 Jun 2000 14:22:54 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: STRINGINDEX
Message-Id: <87wvj7dldd.fsf@limey.hpcc.uh.edu>
>> On 30 Jun 2000 18:06:03 GMT,
>> clemenr@westminster.ac.uk (Ross Clement) said:
> Hi. I can't seem to find a particular string function in
> Perl. Like String.indexOf() in Java, returns the
> (integer) position of a string inside another string, or
> -1 if it's not present. Anything similar?
It's a bit obvious isn't it? :-)
perldoc -f index
hth
t
--
"With $10,000, we'd be millionaires!"
Homer Simpson
------------------------------
Date: Fri, 30 Jun 2000 20:01:51 GMT
From: "Paul Johnston" <johnston.p@worldnet.att.net>
Subject: threaded perl for windoze?
Message-Id: <P0775.79$cR2.6732@bgtnsc05-news.ops.worldnet.att.net>
I'm using perl 5.005_03 built by activestate for an NT box, but they do not
seem to compile thread support.
$ perl
$Config{usethreads} or die "Recompile Perl with threads to run this
program.";
^D
Recompile Perl with threads to run this program. at - line 1.
Are there any perl binaries for NT that support threads? If not, is it
possible to compile it? I have cygwin b20 installed which of course
includes gcc.
Thanks,
Paul
------------------------------
Date: Fri, 30 Jun 2000 22:00:13 GMT
From: Matthew Pope <mpope@ematchcorp.com>
Subject: Toronto, Canada: Junior-Intermediate Perl Software Developer (up to $55K + options) Perl, HTML/CGI, JavaScript
Message-Id: <395D1878.5477A1E4@ematchcorp.com>
--------------B9F5D60711218638CD0F6A8F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This position involves writing commercial eTailing Internet shopping
software (and components) for resale (ecommerce) for a new 'dot com'
software startup, which will soon apply to be traded on NASDAQ. Several
clients are already using our innovative, high technology eTailing
Enterprise software. OO Tools are included to rapidly build eTailing
web sites to 'humanize the internet shopping experience'.
Developers/students with some but not all of the total experience and
skill requirements mentioned below are still encouraged to apply since,
we may decide to change this position slightly to a junior software
developer. The ideal candidate (for junior intermediate) will have:
* 1.0+ years experience with Perl, HTML/CGI and JavaScript
* 0.5+ years experience with Java
* 2.0+ years systems development experience, preferably with a
software vendor and/or a consulting company using OOA/OOD
* methodology.
* MS SQL Server experience an asset
* bachelor degree in Computing or equivalent
The candidate will have the opportunity to learn:
* Java Servlets, Java Server Pages, RMI/CORBA, Java Swing, EJB
* OO Analysis and Design
This Internet startup is well positioned to take a dent out of the
predicted 2.5 order of magnitude growth in eCommerce Small Business
revenues between 1998 and 2003 (IDC). Get in on the ground floor of
this Internet startup and join a team of very experienced software
professionals. Our corporate culture is centered on providing a fun
workplace where engineers can grow both technically and financially.
Good salary and excellent participation (once we apply and go public)
will enable us to offer total compensation at least on par if not better
than the upper reaches of Toronto software and hardware vendors.
Principals only submit resumes to engjobs@ematchcorp.com (We are a
software company, not a recruiter.) [Netizens please excuse this brief
commercial interruption...]
--------------B9F5D60711218638CD0F6A8F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
This position involves writing commercial eTailing Internet shopping software
(and components) for resale (ecommerce) for a new 'dot com' software startup,
which will soon apply to be traded on NASDAQ. Several clients are already
using our innovative, high technology eTailing Enterprise software.
OO Tools are included to rapidly build eTailing web sites to 'humanize
the internet shopping experience'.
<p>Developers/students with some but not all of the total experience and
skill requirements mentioned below are still encouraged to apply since,
we may decide to change this position slightly to a junior software developer.
The ideal candidate (for junior intermediate) will have:
<ul>
<li>
1.0+ years experience with Perl, HTML/CGI and
JavaScript</li>
<li>
0.5+ years experience with Java</li>
<li>
2.0+ years systems development experience, preferably
with a software vendor and/or a consulting company using OOA/OOD</li>
<li>
methodology.</li>
<li>
MS SQL Server experience an asset</li>
<li>
bachelor degree in Computing or equivalent</li>
</ul>
The candidate will have the opportunity to learn:
<ul>
<li>
Java Servlets, Java Server Pages, RMI/CORBA, Java
Swing, EJB</li>
<li>
OO Analysis and Design</li>
</ul>
This Internet startup is well positioned to take a dent out of the predicted
2.5 order of magnitude growth in eCommerce Small Business revenues between
1998 and 2003 (IDC). Get in on the ground floor of this Internet
startup and join a team of very experienced software professionals.
Our corporate culture is centered on providing a fun workplace where engineers
can grow both technically and financially. Good salary and excellent participation
(once we apply and go public) will enable us to offer total compensation
at least on par if not better than the upper reaches of Toronto software
and hardware vendors.
<p>Principals only submit resumes to <a href="mailto:engjobs@ematchcorp.com">engjobs@ematchcorp.com</a>
(We are a software company, not a recruiter.) [Netizens please excuse
this brief commercial interruption...]</html>
--------------B9F5D60711218638CD0F6A8F--
------------------------------
Date: Fri, 30 Jun 2000 18:43:17 GMT
From: T. Alex Beamish <remove.this.talexb@tabsoft.on.ca>
Subject: Re: Use of uninitialized value
Message-Id: <doqpls4ceiao39qff9os5ep6dtuvr0spoq@4ax.com>
On Fri, 30 Jun 2000 16:43:44 GMT, T. Alex Beamish
<remove.this.talexb@tabsoft.on.ca> wrote:
>Hi folks,
>
>This one has got me tied up in knots, and I'd love to get some
>feedback from knowledgable clpm'ers.
I figured this one out. Extend arm, rotate forearm swiftly until it
hits forehead. Repeat.
> } until ( open ( GP_FILE, $TempFile ) == 0 );
If I'm trying to a open a file until I find one that's not there, open
will return undef. Testing undef against 0 produces an error. Zero is
known, but undef is not. So replace an equality test with a test for
undef .. it works!
Thank you for your patience and bandwidth.
No longer confused in Toronto.
------------------------------
Date: Fri, 30 Jun 2000 19:59:52 GMT
From: thoma <thomastk@hotmail.com>
To: thomas.theakanath@smith-nephew.com
Subject: Use Win32::NetAdmin in CGI
Message-Id: <8jiu7d$p58$1@nnrp1.deja.com>
Hello Everyone,
I am trying to call some functions in Win32::NetAdmin module from a
Perl CGI program. Purpose is to authorize users logging on to an
Intranet app, against the Windows NT domain user data.
Ideally, I need to call only UserGetAttributes() that is supposed to
fetch password for a given user. Right now, I cannot execute this call
successfully due to setup and privilege related problems.
Could somebody advise me on the minimum requirements to do this kind of
stuff from a CGI script? Any better ideas to do user authorization
against OS (of course, NT here)?
Thanks
Thomas.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 30 Jun 2000 20:50:12 GMT
From: Johnny Amos <johnny@johnnyamos.com>
Subject: What is $foo&?
Message-Id: <395D0A34.F3313EC2@johnnyamos.com>
What does $foo& mean? Here is some context:
$foo = "some string";
$bar = "$foo&;"
I've gone through the faqs (specifically perlfaq4, perlfaq7 and the perl
cgi faq) but I didn't find an answer.
TIA
Johnny
------------------------------
Date: Fri, 30 Jun 2000 21:21:57 GMT
From: Johnny Amos <johnny@johnnyamos.com>
Subject: Re: What is $foo&?
Message-Id: <395D11A5.A6C1F52F@johnnyamos.com>
I wrote:
> I've gone through the faqs (specifically perlfaq4, perlfaq7 and the perl
> cgi faq) but I didn't find an answer.
I also have Learning Perl, Programming Perl, and the Perl Cookbook, but
I didn't find anything there either. Am I looking in the wrong place?
Johnny
------------------------------
Date: 30 Jun 2000 18:55:01 GMT
From: dkcombs@netcom.com (David Combs)
Subject: When new edition of Lincoln Stein's CGI book?
Message-Id: <8jiqe5$680$1@nntp9.atl.mindspring.net>
I recall from a few weeks ago a post about SOME (perl) book
coming out in new edition (not pp, which IS coming out SOON,
evidently), and to not buy until it does appear.
Question 1: Could that have been Lincoln Stein's cgi book?
(cgi.pm, that is)
---
Question 2: is his book "out of date", due to all changes
he's made to module since 1998?
Question 3: if you do NOT know much/any cgi now, what
is good book (or SET of books) to get on cgi, for use
with perl?
THANKS!
David
------------------------------
Date: Fri, 30 Jun 2000 13:51:27 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: When new edition of Lincoln Stein's CGI book?
Message-Id: <395D084F.28CBFF88@My-Deja.com>
David Combs wrote:
> Question 3: if you do NOT know much/any cgi now, what
> is good book (or SET of books) to get on cgi, for use
> with perl?
CGI Programming with Perl, 2nd Edition
by Scott Guelich, Shishir Gundavaram, Gunther Birznieks, Linda Mui
(Editor)
This is a very good book. It will hit the stores very soon.
Some book stores have copies for previewing ( eg. Computer Literacy).
--
------------------------------
Date: Fri, 30 Jun 2000 13:05:28 -0500
From: Nnickee <nnickee@nnickee.com>
Subject: Re: Windows paths for PERL's 'glob' command
Message-Id: <94C7FCF42A16622C.8F78EBD1D5F15FC6.3C4B249CF92657BF@lp.airnews.net>
On Fri, 30 Jun 2000 15:47:59 GMT, someone claiming to be
manchester_united@my-deja.com said:
>I cannot use the PERL's 'glob' command on Windows paths, if the path or
>any of the folders contain a space.
>To test this yourself, try using 'glob' as follows:-
>@array = glob ("c:\Program Files");
>and you will find that it has not returned the files or folders as it
>should.
>Have tried:-
>1) permutation of the back-slashes and forward-slashes
>2) escaping ('\') the space
>3) giving it a short name i.e. "c:\progra~1"
>but to no avail......going nuts, please help me.
#!perl -w
$progdir = 'c:\program files'; # single ' instead of "
chdir($progdir);
@array = glob('*.*');
print "@array";
HTH
------------------------------
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 3527
**************************************