[15952] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3364 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 15 00:05:54 2000

Date: Wed, 14 Jun 2000 21:05:10 -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: <961041910-v9-i3364@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 14 Jun 2000     Volume: 9 Number: 3364

Today's topics:
    Re: [ RexExp ] =>  /^[^(abc)]/ ? <TheEx0rcist@fanclub.org>
    Re: A Computer Programmers Profile <bob@buckhorn.net>
    Re: Average Salary? (brian d foy)
    Re: Average Salary? (Clinton A. Pierce)
    Re: Average Salary? <bob@buckhorn.net>
        Binary Encoding Data <garstangd@news.com.au>
    Re: Binary Encoding Data <rootbeer@redcat.com>
    Re: Bot for this group to auto-answer queries? <henry@penninkilampi.net>
    Re: Bot for this group to auto-answer queries? <rootbeer@redcat.com>
    Re: evaluating expressions (R.Roe)
    Re: Extracting Data From a File with Separate Sections <tina@streetmail.com>
    Re: Extracting Data From a File with Separate Sections <tina@streetmail.com>
    Re: How to forward declare a function <ender29@my-deja.com>
    Re: Invoking Shell w/ Env. Variable (Clinton A. Pierce)
        Looking for a way to make the size of text smaller <blzbrthr@gte.net>
        module fields <rant@coretext.co.il>
    Re: NET::SMTP <tschilbach@aodinc.com>
    Re: NET::SMTP <tschilbach@aodinc.com>
    Re: NET::SMTP <nnickee@nnickee.com>
    Re: NET::SMTP <dan@tuatha.sidhe.org>
    Re: ODBC, MSSQL and Unix <bob@buckhorn.net>
    Re: rmdir in NT 4... <stevea@wrq.com>
        simple array question <ils@gil.com.au>
    Re: simple array question <rootbeer@redcat.com>
    Re: Simple Question ~ How to perform a directory recurs <kennylim@techie.com>
    Re: sorting an array <uri@sysarch.com>
    Re: Very strange DBI:mysql-problem! <rootbeer@redcat.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 15 Jun 2000 04:36:44 +0200
From: "TheEx0rcist" <TheEx0rcist@fanclub.org>
Subject: Re: [ RexExp ] =>  /^[^(abc)]/ ?
Message-Id: <8i9fe5$1cda$1@news5.isdnet.net>

THANKS EVERYONE FOR THE WISE SUFFESTIONS !!

You are all very bright, and I mean it!




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

Date: Wed, 14 Jun 2000 21:16:21 -0500
From: Bob Martin <bob@buckhorn.net>
Subject: Re: A Computer Programmers Profile
Message-Id: <39483C75.32C43615@buckhorn.net>

Employer wrote:
> 
> Hello. I am looking to create a "computer programmers profile". I am
> looking to find out:
> 
> Where do computer programmers "hang out" on the Internet?
> What websites do they visit?
> What magazines do they read?
> How old are they generally?
> 
> I am looking for this information in the interest to be able to find
> computer programmers for employment when I need them. They have been
> hard to find (the good ones anyway), and I am trying to find them!!
> 
> Thanks for your help.
Programmers are as diversified in their interests as any other group.
You could ask this same question about book keepers, carpenters or
housewives, and the answers you get would be about the same.

Your time will be better spent finding out what the pay scale is in your
area. When the time to hire comes, you will find that you get what you
pay for.

Bob Martin
-- 
"I know not with what weapons World War III will be fought,
but World War IV will be fought with sticks and stones."
		-- Albert Einstein


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

Date: Wed, 14 Jun 2000 21:23:09 -0500
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Average Salary?
Message-Id: <brian-1406002123090001@71.sanjose-08-09rs16rt.ca.dial-access.att.net>

In article <8i98mg$q82$1@nnrp1.deja.com>, paul_maas@my-deja.com wrote:

>I have seen people asking/offering from $63,000 to $84,000.
>Is that about right?

only if the applicant is worth that much.

-- 
brian d foy
Perl Mongers <URI:http://www.perl.org>
CGI MetaFAQ 
  <URI:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



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

Date: Thu, 15 Jun 2000 01:32:19 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Average Salary?
Message-Id: <DmW15.1019$fR2.14665@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <8i98mg$q82$1@nnrp1.deja.com>,
	paul_maas@my-deja.com writes:
> I am trying to find out the average salary of a Web Developer
> (CGI/PERL) and Database Administrator. So one person.
> 
> I have seen people asking/offering from $63,000 to $84,000.
> Is that about right?

Depends on where.  Around here, you can't swing a dead cat without
hitting a "web developer".  Actually, I've beaten a few web developers 
with dead cats.  Poor cats.


-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Wed, 14 Jun 2000 21:07:48 -0500
From: Bob Martin <bob@buckhorn.net>
Subject: Re: Average Salary?
Message-Id: <39483A74.7A1CE68D@buckhorn.net>

paul_maas@my-deja.com wrote:
> 
> Hi,
> 
> I am trying to find out the average salary of a Web Developer
> (CGI/PERL) and Database Administrator. So one person.
> 
> I have seen people asking/offering from $63,000 to $84,000.
> Is that about right?
> 
> Thanks in advance,
> Paul Maas
That depends on a lot of factors, for example, where the job is,
benefits and the like.
Another big factor is the job your looking to fill. Do you want a web
developer that can administer small databases, or are you looking for a
DBA that can do small development jobs? 

Bob Martin
-- 
"I know not with what weapons World War III will be fought,
but World War IV will be fought with sticks and stones."
		-- Albert Einstein


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

Date: Thu, 15 Jun 2000 02:31:40 GMT
From: "Dougas Garstang" <garstangd@news.com.au>
Subject: Binary Encoding Data
Message-Id: <geX15.133$re6.505906@news0.optus.net.au>

All,

I'm trying to encode some character data in binary binary format (yes binary
was supposed to be there twice).

I've tried using pack with:

$packed = pack("B8","A");    # Encode it
@bits = unpack("B8",$packed);    # Decode it.

However, all I get is "10000000" or "00000000" with no apparent reasoning
when I unpack the data.

Regards
Douglas.





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

Date: Wed, 14 Jun 2000 20:45:49 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Binary Encoding Data
Message-Id: <Pine.GSO.4.10.10006142045100.5301-100000@user2.teleport.com>

On Thu, 15 Jun 2000, Dougas Garstang wrote:

> I've tried using pack with:
> 
> $packed = pack("B8","A");    # Encode it

That's not a bit string in descending bit order. Better read the docs for
pack again. Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 15 Jun 2000 10:43:33 +0930
From: Henry <henry@penninkilampi.net>
Subject: Re: Bot for this group to auto-answer queries?
Message-Id: <henry-B165FE.10433315062000@news.metropolis.net.au>

In article 
<Pine.GSO.4.10.10006141610440.5301-100000@user2.teleport.com>, Tom 
Phoenix <rootbeer@redcat.com> wrote:

>> This bot is programmed to continuously scan a given newsgroup,
>> looking for messages with the word "help" in the subject line.
> 
> Why "help" and not "newbie"? And "Windows"? :-)

I'm not fussed.  I'd originally thought /^How do I / and then I thought 
/^Q /.  Then I started thinking space on the subject line might be a 
premium, so terse functionality would be the go.

Like I said, I'm not fussed.

(Sorry for the serious answer - my brain's not in emoticon mode.)


>> It then extracts any other words on the subject line, and uses them
>> as keywords to search a local database.  It ranks the matches, and
>> then posts a summary of all the articles back to the newsgroup as a
>> response to the original message.
> 
> A summary? Can you give an example? That is, if the subject line said,
> "Help with CGI problem", what would the response look like?

(Keep in mind these are fictional and illustrative examples only - 
there's nothing in the knowledge base yet.)

---
41 - I'm having problems with my CGI scripts - they keep getting munged 
when I upload them.  Something to do with line endings?

56 - How do I force a user to authenticate before gaining access to my 
CGI scripts?

1 - The CGI specification - more than you ever wanted to know.  
ftp://ftp.cgi.dom/spec.tar.gz

101 - CGI vs mod_perl - performance issues.  
http://www.somewhere.com/blah/performance.html

155 - CGI.pm - Common Gateway Interface module 
http://search.cpan.org/search.pl?type=module?name=CGI 
---

That sort of thing.  Functional.

Basically, each article/FAQ/reference would have a single descriptive 
pararaph/sentence which describes it.  A collection of these (sorted by 
relevancy) would be retuned.

This is the short-listing process.  The user then scans the summary and 
picks the most appropriate choices.  If none seem appropriate _then_ 
they actually post their question to the group, in detail, and hope for 
a human response.

Some items will be external (not stored by the Bot) in which case URLs 
for these can be immediately returned, eliminating the need to submit a 
separate request.


>> Each individual article has a number.  To retrieve specific articles,
>> all the poster need to is post another message and specify the article
>> number(s).  The bot then responds with the full text of the requested
>> article(s).
> 
> So the bot will post many articles upon request?

As many as are requested - that's the plan.

help 112 165 42

 ...will result in those 3 articles being posted.


> Why not just send them by e-mail upon request? (In fact, why not have
> the bot do all of its work by e-mail?)

a) Many folks have anti-SPAM elements in their email address.  The reply 
addresses in most posts are thus invalid.

b) It won't _appear_ as though the bot is doing anything, which gives 
the impression that it isn't working, which results in it being used 
less.  Search tools get ignored if they don't maintain a profile.

c) Direct answers via email denies the opportunity for gurus to pipe up 
and say "Hang on!  There's a better way to do that in 5.6!  And there's 
a new module as well!" in addition to the ever-popular "Bull%$#@!"

There are others, but those were the most important ones I could think 
of.


> Alternatively, the bot could post URLs; interested parties can follow
> those, but they'd create minimal clutter for the rest of us.

It will do that as well.  Not all of the articles are Q/A-type things.  
Some are pointers to tutorials on the Net, others to note-worthy 
websites (as illustrated above).

The Bot correctly references the original article, so threaded 
newsreaders should barely be affected at all.

Clutter is an issue, however, but I guess it comes down to how much time 
you save by not having to answer questions vs. how much time you waste 
by pressing 'N'.


>> Any concerns/doubts as to the effectiveness of such a system?
> 
> Just a few. If it helps more than it hurts, I'm in favor of it - but
> you'll have to sell me on that "if" part. Having a high level of relevance
> in its replies would be a good start.

Which is why a well-written descriptive field is so important.  I want 
to avoid having a separate keyword field for each item, but thats 
another option that would increase relevancy.


>> Would anyone object to their responses (in this forum) being
>> integrated into the knowledge base (without additional
>> correspondence)?
> 
> Uh-oh. You may be treading upon dangerous ground there. I would be
> cautious about doing that. Still, it may be okay.

Touchy ground - I know.  Personally, I'd prefer if the gurus just CCd 
the responses they wanted added to the knowledge base to a nominated 
email address.  Only downer there is that unless you read through the 
whole thread, you have a tendency to miss bits.  (And, naturally, when 
it came time for me to edit the message, the original messages would 
have expired from my news server.)

I'm open to suggestions.


>> I basically figure that it would be nice to give the gurus of the
>> group the option of responding to a message with "Just ask the Bot".
> 
> How is that better than the response "See section ____ of the FAQ"? Bear
> in mind that the FAQ is available in many more ways than the Bot is, and
> the FAQ consumes very little Usenet bandwidth.

"See section _ of the FAQ" is a reply with limited scope.  It solves the 
current problem, once.  (The more generic advice "Read the FAQ" is not 
useful.)

"Ask the Bot" is a conditioning approach with far greater scope.  The 
Bot's always there - it responds right away (within article propogation 
limits).  It's not _hard_ to ask the bot.  Once momentum picks up, 
_absolute_ newbies will wander into the group and see stacks of messages 
from the Bot and, being used to bots on IRC channels, they might even 
give the Bot the first crack at answering their question.

Besides, it's highly likely I'll slurp all the FAQs into the knowledge 
base anyway...

Oh, and "ask the bot" is faster to type.


>> All I need is content for the knowledge base, which is where you folks
>> come in.  Any time you answer a question, and think it belongs in the
>> knowledge base, just let me know and it's in.
> 
> You should probably get together with the PerlFaq folks.
> 
>     http://www.perlfaq.com/

Yep, and search.cpan.org and www.perl.com...  Already thinking ahead.

Henry.


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

Date: Wed, 14 Jun 2000 20:30:12 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Bot for this group to auto-answer queries?
Message-Id: <Pine.GSO.4.10.10006142007180.5301-100000@user2.teleport.com>

On Thu, 15 Jun 2000, Henry wrote:

> (Keep in mind these are fictional and illustrative examples only - 
> there's nothing in the knowledge base yet.)

Cuts down on the usefulness, doesn't it? :-)

> ---
> 41 - I'm having problems with my CGI scripts - they keep getting munged 
> when I upload them.  Something to do with line endings?
> 
> 56 - How do I force a user to authenticate before gaining access to my 
> CGI scripts?
> 
> 1 - The CGI specification - more than you ever wanted to know.  
> ftp://ftp.cgi.dom/spec.tar.gz
> 
> 101 - CGI vs mod_perl - performance issues.  
> http://www.somewhere.com/blah/performance.html
> 
> 155 - CGI.pm - Common Gateway Interface module 
> http://search.cpan.org/search.pl?type=module?name=CGI 
> ---
> 
> That sort of thing.  Functional.

I'm worried now that whoever asked for "Help with CGI problem" will drown
under every topic which mentions "CGI". (Which isn't to say that they
don't deserve it! :-)  If you can ensure that there will never be more
than about three topics, and that the "right" one is in there more than
95% of the time, you'll be on the right track. But that's going to be
tough to do.

> Basically, each article/FAQ/reference would have a single descriptive 
> pararaph/sentence which describes it.  A collection of these (sorted by 
> relevancy) would be retuned.

How are you ranking relevance? Keyword lists are (IMHO) not great; you
need to add a little intelligence to the mix. Not that that's impossible,
but you'll have to be eternally tweaking.

I remember when someone demonstrated a real-text searching engine for me
in about 1983. One of my group proposed searching for news articles on the
then-new topic of AIDS research. We got many more articles with titles
like "Federal Grant Aids Research in Petroleum Refining" than the ones we
wanted.

> This is the short-listing process.  The user then scans the summary
> and picks the most appropriate choices.  If none seem appropriate
> _then_ they actually post their question to the group, in detail, and
> hope for a human response.

Ah, but a user who would do that would have found the answer in the
docs/FAQs by now. :-)

> > So the bot will post many articles upon request?
> 
> As many as are requested - that's the plan.
> 
> help 112 165 42
> 
> ...will result in those 3 articles being posted.

Hmmm. I'm not sure that I like that. I'd like it a lot better if the bot
would post URLs rather than numbers in the first place - people will get
faster answers that way, too. 

> > Why not just send them by e-mail upon request? (In fact, why not have
> > the bot do all of its work by e-mail?)
> 
> a) Many folks have anti-SPAM elements in their email address.  The
> reply addresses in most posts are thus invalid.

True.

> b) It won't _appear_ as though the bot is doing anything, which gives
> the impression that it isn't working, which results in it being used
> less.  Search tools get ignored if they don't maintain a profile.

Good point.

> c) Direct answers via email denies the opportunity for gurus to pipe
> up and say "Hang on!  There's a better way to do that in 5.6!  And
> there's a new module as well!" in addition to the ever-popular
> "Bull%$#@!"

But you won't be posting the answers - just numbers (or URLs). It's hard
to argue with a number. :-)

> "See section _ of the FAQ" is a reply with limited scope.  It solves
> the current problem, once.  (The more generic advice "Read the FAQ" is
> not useful.)
> 
> "Ask the Bot" is a conditioning approach with far greater scope.  The
> Bot's always there - it responds right away (within article
> propogation limits).

"See the FAQ" is just as good. The FAQ's always there.

> It's not _hard_ to ask the bot.  

It's not hard to read the FAQ. Or to use www.perlfaq.com.

> Once momentum picks up, _absolute_ newbies will wander into the group
> and see stacks of messages from the Bot and, being used to bots on IRC
> channels, they might even give the Bot the first crack at answering
> their question.

You could be right - but how many "absolute newbies" wander in today, see
"read the FAQ", and thereby do so? I thought, when I started my weekly
posting of "How to find the Perl FAQ", that it would cut down on the
number of people who ask FAQable questions here. Boy, was I wrong. Sure,
it's being read, or I wouldn't keep doing it. But it hasn't changed the
nature of the group; like every similar newsgroup, we're always getting
asked the same questions.

> Oh, and "ask the bot" is faster to type.

Not when you have macros. :-)

At this point, I'm not yet sold on this. But here's a way for you to show
people what the bot would do without actually having it post anything.
Have the bot generate and maintain a demonstration web page. The page
would list recent subject lines from the newsgroup, along with the
suggested responses from the bot. You could even let the visitor type in a
sample subject line to see what the bot comes up with. This could be handy
for tuning the bot's responses and seeing where its weak points are, so
you may want to keep it available after the bot goes on-line. 

Cheers!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Thu, 15 Jun 2000 03:46:26 GMT
From: rroe@mail.com (R.Roe)
Subject: Re: evaluating expressions
Message-Id: <8F53FA097rroemailcom@64.34.205.9>

dan@tuatha.sidhe.org (Dan Sugalski) wrote in 
<D4N15.473$Zg4.3056@news1.rdc1.ct.home.com>:

>Godzilla! <godzilla@stomp.stomp.tokyo> wrote:
>> Your name wrote:
>>  
>>> The code
>>> $w="10+3*x-x**2";
>>> $w=~s/x/1/g;
>>> print $w;
>>  
>>> outputs
>>> 10+3*1-1**2
>>  
>>> How to get this calculated to 12 please?
>
>> Mr. Name, change your sequence of events
>> and change your syntax. No problem!
>
>Solving a different problem doesn't do this poster any good. The answers
>you posted had nothing to do with what was asked.
>
>The correct answer here is to use string eval.
>
>print eval $w;
>
>should do it.
>
>                         Dan
>

Thanks Dan. eval $w answers my question (unlike Godzilla's FOUR solutions!)


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

Date: 15 Jun 2000 01:37:37 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: Extracting Data From a File with Separate Sections
Message-Id: <8i9c11$4c9s7$5@fu-berlin.de>

hi,

Jim Shepherd <jimshep@mindspring.com> wrote:
> I am trying to parse a data file which contains sections of different
> data types separated by heading lines.  An example of the data would be:

> HEADING 
> This is a sample data file
> MATERIAL  3   2  Polymer
> Elastic Modulus
> Poisson's Ratio
> Shear Modulus
> 5000  0.34  2400
> ---
> ELEMENT
> TRI 12 1 1 2 3
> TRI 13 1 2 3 4
> ---
> ...

> I have a Perl program that works, but it doesn't seem to be the cleanest
> method.  I currently open the file, then run a while loop on the file
> handle.  In the while loop, I use a set of if...elsif...else blocks to
> check to see if the first word matches a known heading (such as HEADING,
> MATERIAL, ELEMENT).  Once such a heading is found, it sets a flag to the
> section type.  Then the subsequent lines are processed according to the
> section type.

> This code snippet may not be correct, since I have typed in it manually
> and I do not have Perl on this machine to test it for typos and such

> open (<FILE>, "<test.fil>") or die "Error opening file!\n";
better use
open FILE, "<test.file" or die "cannot open test.file: $!";

i've deleted the rest of the code. just try
it out with the following short one.
it pushes everything in the ELEMENT section into
the $hash{ELEMENT}, and so on. as you have
something after MATERIAL i did not
want to ignore this line.
tina@syracus:~ > cat script.pl

#!/usr/local/bin/perl -w
use Data::Dumper;
@fields = qw{HEADING MATERIAL ELEMENT};

while (<DATA>) {
 chomp;
 $current = shift @fields if (@fields && m/^$fields[0]/);
 push @{$hash{$current}},$_ unless m/^---$/;
}
print Dumper (\%hash);
exit;

__DATA__
HEADING
This is a sample data file
 .....

tina@syracus:~ > perl quote.pl

$VAR1 = {
          'HEADING' => [
                         'HEADING',
                         'This is a sample data file'
                       ],
          'ELEMENT' => [
                         'ELEMENT',
                         'TRI 12 1 1 2 3',
                         'TRI 13 1 2 3 4'
                       ],
          'MATERIAL' => [
                          'MATERIAL  3   2  Polymer',
                          'Elastic Modulus',
                          'Poisson\'s Ratio',
                          'Shear Modulus',
                          '5000  0.34  2400'
                        ]
        };

ok? now you can adjust this script to what you
need.

tina


-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception


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

Date: 15 Jun 2000 02:03:18 GMT
From: Tina Mueller <tina@streetmail.com>
Subject: Re: Extracting Data From a File with Separate Sections
Message-Id: <8i9dh6$4c9s7$6@fu-berlin.de>

hi,

Jim Shepherd <jimshep@mindspring.com> wrote:

> This code snippet may not be correct, since I have typed in it manually
> and I do not have Perl on this machine to test it for typos and such

btw, you're using linux 2.3x and you don't have
perl on it? then go and get it. how do
you want to develop your scripts in the
future without testing them offline?

tina


-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception


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

Date: Thu, 15 Jun 2000 01:01:30 GMT
From: EnderW <ender29@my-deja.com>
Subject: Re: How to forward declare a function
Message-Id: <8i99t2$r2m$1@nnrp1.deja.com>

Thnx, that's what I was lookin for.. INIT

In article <rWR15.738$Zg4.3873@news1.rdc1.ct.home.com>,
  Dan Sugalski <dan@tuatha.sidhe.org> wrote:
> EnderW <ender29@my-deja.com> wrote:
> > Stumped. Totally stumped. I have a subroutine my_func that doesnot
take
> > anything(argument) and doesnot return a thing. I call it in BEGIN
part
> > but perl complained that it cannot see it so I did a forward
> > declaration like this
>
> > BEGIN {
> > sub my_func ;
> > my_func () ;
> > }
>
> > and this still doesnot work any ideas ? It still complains it is
still
> > undefined.
>
> That's because at the point that the BEGIN block is executed it is.
This
> is because of the way perl handles parsing your code and BEGIN blocks.
>
> When perl hits a BEGIN block, it finishes parsing the block and then
> immediately executes the code inside it. Anything that has not yet
been
> parsed (everything from the end of the BEGIN block to the end of your
> file) is completely unknown to perl. It can't execute a sub that's
not yet
> been parsed because it doesn't exist yet.
>
> If you need to call code in a subroutine, make sure the text of the
sub
> (and any subs your sub calls) precedes the BEGIN bock.
>
> If you're looking to execute code immediately after parsing's
complete but
> before mainline execution, and you're running perl 5.005 or later,
you can
> use INIT blocks. They act sort of like BEGIN blocks, but their
execution's
> deferred until parsing is complete.
>
> 					Dan
>

--
Ender Wiggin


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


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

Date: Thu, 15 Jun 2000 01:37:26 GMT
From: clintp@geeksalad.org (Clinton A. Pierce)
Subject: Re: Invoking Shell w/ Env. Variable
Message-Id: <qrW15.1023$fR2.14665@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <1167bb98.3aa381dd@usw-ex0106-047.remarq.com>,
	mlewis <michaellewisNOmiSPAM@yahoo.com.invalid> writes:
> When creating a script that invokes a shell the first
> line of the file should contain a #! command in csh.
> My question is... how can I pass an environment
> variable to this command in order to invoke a soft
> path.

Old problem, no good answer.  Firstly, this isn't a Perl problem.
The exec() system call in Unix will examine the #! line and invoke
the correct interpreter.  It's pretty dumb.  You need a pathname
there and nothing else will do.

However you can run an intermediate process like a shell (which has
a fixed location: /bin/sh) or a program like env and have that in turn
run your interpreter of choice.

-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Thu, 15 Jun 2000 03:50:37 GMT
From: "Chris" <blzbrthr@gte.net>
Subject: Looking for a way to make the size of text smaller
Message-Id: <hoY15.3593$Gp6.235129@dfiatx1-snr1.gtei.net>

Hello.

I'm working on a program that does a few things and then deposits what it
does into a file.  Fairly, typical, I'm guessing. And yet, one thing vexes
me.  I want to print what was deposited into the file, on to an 8.5x11 sheet
of paper, but what I want to print is to large for the page.

I've searched perldoc for info on font size and character size and haven't
found anything.  Maybe I'm not looking in the right place.

Can someone help me with this?




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

Date: Wed, 14 Jun 2000 12:21:10 +0200
From: "ran tene" <rant@coretext.co.il>
Subject: module fields
Message-Id: <39474e76@news.barak.net.il>

We have problems using the 'fields'  module.

Some times it seems that the fields are not inherited correctly.

ex:
class a is superclass of class b.
class a use the line - use fields qw( aField ).
class a has method m using the field 'aField'.
class b use the line - use base  qw( a)

In some more complicated casses using an object of type b
when i call b->m i recieve the massage:
'No such array field at a'.

Unfortunatly we can not specify this 'more complicated casses'.

Thanks in advance.




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

Date: Wed, 14 Jun 2000 20:28:07 -0500
From: "Timothy H. Schilbach" <tschilbach@aodinc.com>
Subject: Re: NET::SMTP
Message-Id: <8i9bf6$1mr$1@news.chatlink.com>

Dan,

  Thanx for the tip. I will try that and let you know how it works.

--
Timothy H. Schilbach
Alpha Omega Design Inc.
tschilbach@aodinc.com
1-877-263-7094
Visit our website at www.aodinc.com
"Dan Sugalski" <dan@tuatha.sidhe.org> wrote in message
news:m1T15.747$Zg4.4110@news1.rdc1.ct.home.com...
> Timothy H. Schilbach <tschilbach@aodinc.com> wrote:
> > This works great except for the NET::SMTP section
>
> Are you sure you have the NET::SMTP module and not the Net::SMTP module?
> Perl is, after all, case-sensitive...
>
> Dan




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

Date: Wed, 14 Jun 2000 20:35:02 -0500
From: "Timothy H. Schilbach" <tschilbach@aodinc.com>
Subject: Re: NET::SMTP
Message-Id: <8i9bs5$1pd$1@news.chatlink.com>

Dan,

  This did not fix the problem, get the same errors reguardless. PERL on NT
doesnt seem to be case sensitive.  Any other suggestions?

--
Timothy H. Schilbach
Alpha Omega Design Inc.
tschilbach@aodinc.com
1-877-263-7094
Visit our website at www.aodinc.com
"Timothy H. Schilbach" <tschilbach@aodinc.com> wrote in message
news:8i8su3$pc6$1@news.chatlink.com...
> Ok here is a simple question and some background.  I have a script that
> automatically activates user accounts when they signup for our services.
> This works great except for the NET::SMTP section that is supposed to
email
> the client and then the administrator when the account is activated. I
keep
> getting this:
>
> Can't call method "mail" on an undefined value at
> I:\aodinc.com\cgi-bin\signup.pl line 298.
>
> Below I have imput the lines of code as well. For some reason its not
> recognizing the "mail" command. Without this varable, the message would
not
> be sent to the user. Any suggestions on how to overcome this? I have
> commented the troubled line.
>
> Code:
> sub sendmailtouser {
>
> if ($FORM{'email'} =~ /\@/) {
>
>   use NET::SMTP;
>
>   $smtp = Net::SMTP->new($server);
>   $smtp->mail($ENV{USER});              # This is the line it says it
cannot
> recognize
>
>   $smtp->to("$FORM{'email'}\n");
>
>   $SMTP->data();
>   $SMTP->datasend("From: Automated Server\n");
>   $SMTP->datasend("To: $FORM{'first_name'}\n");
>   $SMTP->datasend("Subject: Internet Service Order Completed.\n");
>   $SMTP->datasend("\n");
>
>   $SMTP->datasend("Below is your account information\n");
>   $SMTP->datasend("please print this out for your reference:\n\n");
>   $SMTP->datasend("Dial-Up Username: ${dialuser}\n");
>   $SMTP->datasend("Dial-Up Password: $FORM{'password'}\n");
>   $SMTP->datasend("Access Numbers: $location\n\n");
>
>   $SMTP->datasend("Newsgroup Username: newservice\n");
>   $SMTP->datasend("Newsgroup Password: begin\n");
>   $SMTP->datasend("Newsgroup Server:   ${news}\n\n");
>
>   if ($e =~ /1|3/) {
>     $SMTP->datasend("Email Username: $FORM{'username'}\n");
>     $SMTP->datasend("Email Password: $FORM{'password'}\n");
>   }
>
>   $SMTP->datasend("Incoming Mail Server: ${pop}\n");
>   $SMTP->datasend("Outgoing Mail Server: ${smtp}\n\n");
>
>   if ($e =~ /2|3/) {
>     $SMTP->datasend("FTP Username: $FORM{'username'}\n");
>     $SMTP->datasend("FTP Password: $FORM{'password'}\n");
>     $SMTP->datasend("FTP Server: ${ftp}\n");
>     $SMTP->datasend("Web Address:
> http://members.${domain}/$FORM{'username'}/\n");
>   }
>
>   $SMTP->datasend("If you have any problems, please call $phone\n");
>   $SMTP->datasend();
>
>   $SMTP->quit;
>
> } }
>
> --
> Timothy H. Schilbach
> Alpha Omega Design Inc.
> tschilbach@aodinc.com
> 1-877-263-7094
> Visit our website at www.aodinc.com
>
>




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

Date: Wed, 14 Jun 2000 20:38:54 -0500
From: Nnickee <nnickee@nnickee.com>
Subject: Re: NET::SMTP
Message-Id: <986760FC9A26D585.E4809979D5129CB1.80E16037937DA732@lp.airnews.net>

On Wed, 14 Jun 2000 16:20:00 -0500, someone claiming to be "Timothy H.
Schilbach" <tschilbach@aodinc.com> said:

>Ok here is a simple question and some background.  I have a script that
>automatically activates user accounts when they signup for our services.
>This works great except for the NET::SMTP section that is supposed to email
>the client and then the administrator when the account is activated. I keep
>getting this:

>Can't call method "mail" on an undefined value at
>I:\aodinc.com\cgi-bin\signup.pl line 298.

<snip>

Try reinstalling libnet -- I had the same problems with Net::SMTP
until I reinstalled.

Nnickee



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

Date: Thu, 15 Jun 2000 02:38:01 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: NET::SMTP
Message-Id: <dkX15.1123$Zg4.5233@news1.rdc1.ct.home.com>

Timothy H. Schilbach <tschilbach@aodinc.com> wrote:
> Dan,

>   This did not fix the problem, get the same errors reguardless. PERL on NT
> doesnt seem to be case sensitive.  Any other suggestions?

Perl on NT is case-sensitive. Perl everywhere is case-sensitive. (Actually
you can get away with the "use" bit in a case-insensitve manner on systems
with case-insensitive filesystems, but it can cause problems and is
generally a good way to get unreliable results. Been there. Done that.
Didn't like it... :)

Did you maybe upgrade perl over an existing libnet install? That might
cause you problems of some sort, and a reinstall can't hurt. It's
certainly easy enough with PPM.

					Dan

> "Timothy H. Schilbach" <tschilbach@aodinc.com> wrote in message
> news:8i8su3$pc6$1@news.chatlink.com...
>> Ok here is a simple question and some background.  I have a script that
>> automatically activates user accounts when they signup for our services.
>> This works great except for the NET::SMTP section that is supposed to
> email
>> the client and then the administrator when the account is activated. I
> keep
>> getting this:
>>
>> Can't call method "mail" on an undefined value at
>> I:\aodinc.com\cgi-bin\signup.pl line 298.
>>
>> Below I have imput the lines of code as well. For some reason its not
>> recognizing the "mail" command. Without this varable, the message would
> not
>> be sent to the user. Any suggestions on how to overcome this? I have
>> commented the troubled line.
>>
>> Code:
>> sub sendmailtouser {
>>
>> if ($FORM{'email'} =~ /\@/) {
>>
>>   use NET::SMTP;
>>
>>   $smtp = Net::SMTP->new($server);
>>   $smtp->mail($ENV{USER});              # This is the line it says it
> cannot
>> recognize
>>
>>   $smtp->to("$FORM{'email'}\n");
>>
>>   $SMTP->data();
>>   $SMTP->datasend("From: Automated Server\n");
>>   $SMTP->datasend("To: $FORM{'first_name'}\n");
>>   $SMTP->datasend("Subject: Internet Service Order Completed.\n");
>>   $SMTP->datasend("\n");
>>
>>   $SMTP->datasend("Below is your account information\n");
>>   $SMTP->datasend("please print this out for your reference:\n\n");
>>   $SMTP->datasend("Dial-Up Username: ${dialuser}\n");
>>   $SMTP->datasend("Dial-Up Password: $FORM{'password'}\n");
>>   $SMTP->datasend("Access Numbers: $location\n\n");
>>
>>   $SMTP->datasend("Newsgroup Username: newservice\n");
>>   $SMTP->datasend("Newsgroup Password: begin\n");
>>   $SMTP->datasend("Newsgroup Server:   ${news}\n\n");
>>
>>   if ($e =~ /1|3/) {
>>     $SMTP->datasend("Email Username: $FORM{'username'}\n");
>>     $SMTP->datasend("Email Password: $FORM{'password'}\n");
>>   }
>>
>>   $SMTP->datasend("Incoming Mail Server: ${pop}\n");
>>   $SMTP->datasend("Outgoing Mail Server: ${smtp}\n\n");
>>
>>   if ($e =~ /2|3/) {
>>     $SMTP->datasend("FTP Username: $FORM{'username'}\n");
>>     $SMTP->datasend("FTP Password: $FORM{'password'}\n");
>>     $SMTP->datasend("FTP Server: ${ftp}\n");
>>     $SMTP->datasend("Web Address:
>> http://members.${domain}/$FORM{'username'}/\n");
>>   }
>>
>>   $SMTP->datasend("If you have any problems, please call $phone\n");
>>   $SMTP->datasend();
>>
>>   $SMTP->quit;
>>
>> } }
>>
>> --
>> Timothy H. Schilbach
>> Alpha Omega Design Inc.
>> tschilbach@aodinc.com
>> 1-877-263-7094
>> Visit our website at www.aodinc.com
>>
>>




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

Date: Wed, 14 Jun 2000 21:22:51 -0500
From: Bob Martin <bob@buckhorn.net>
Subject: Re: ODBC, MSSQL and Unix
Message-Id: <39483DFB.57FCF2D4@buckhorn.net>

Dan Wilga wrote:
> 
> In article <3947B12F.4D1396D6@inu.net>, Bob Martin <bob@inu.net> wrote:
> 
> > Need to use perl/DBI to talk to a MSSQL server on NT. Anyone know where
> > I can get a good (free is _very_ good) driver? Any other suggestions?
> 
> That depends somewhat on what the client OS is. One source is OpenLink
> (www.openlinksw.com).
> 
> Dan Wilga          dwilgaREMOVE@mtholyoke.edu

What was I thinking? Golly gee, might be nice if there was something
here to work with!

Dan,
Thank you for a much better answer than the question deserved!
I actually turned up a Sybase driver for FreeBSD that seems to be doing
the trick.

Thanks again for taking the time!

Bob Martin
-- 
"I know not with what weapons World War III will be fought,
but World War IV will be fought with sticks and stones."
		-- Albert Einstein


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

Date: 14 Jun 2000 11:48:43 -0700
From: Steve Allan <stevea@wrq.com>
Subject: Re: rmdir in NT 4...
Message-Id: <uem60ksj8.fsf@wrq.com>

"Mark S. Blamey" <Mark@virtual-space-ltd.com> writes:

>I've written this code and am finding the directory is not removed by
>rmdir.  I'm assuming something is left in the directory so the command
>fails.  How can I fix it so that the directory will be deleted as
>desired?
>
>   opendir(FILES,"$my_dir/s$name");
>   @filelist =  grep(!/^\.|^_/, readdir (FILES));
>   closedir(FILES);
>   foreach $filelist (@filelist) {
>      unlink("$my_dir/s$name/$filelist");
>   }
>   rmdir("$my_dir/s$name");
>
>Thanks!
>

If your aim is to delete a directory and all its contents, you might
look at rmtree() which is in File::Path.  It provides a portable means
of getting 'rm -r dir' or 'rd /s/q dir' type behavior.

-- 
-- Steve __


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

Date: Thu, 15 Jun 2000 12:44:34 +1000
From: "Phil Sutcliffe" <ils@gil.com.au>
Subject: simple array question
Message-Id: <394843b8_1@news.bne.gil.com.au>

Hi,

Consider this.

@fields=("GBH","QLD","1234");

@names=("\$company","\$state","\$postcode");

Is there a way to get "GBH" into variable $company without using loops.

I realise I can do this

${$names[0]} = $fields[0];

What I'm looking for is something like

\@names = @fields; to get all the elements of @fields into the field names
contained in @names

Is there a simple one-liner to do this?

TIA,

Phil.




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

Date: Wed, 14 Jun 2000 20:47:25 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: simple array question
Message-Id: <Pine.GSO.4.10.10006142046030.5301-100000@user2.teleport.com>

On Thu, 15 Jun 2000, Phil Sutcliffe wrote:

> @fields=("GBH","QLD","1234");
> 
> @names=("\$company","\$state","\$postcode");
> 
> Is there a way to get "GBH" into variable $company without using loops.

What do you have against loops? :-)

But it sounds as if you want to use the contents of a variable as a
variable name. See this.

    http://www.plover.com/~mjd/perl/varvarname.html

Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Wed, 14 Jun 2000 19:34:13 -0700
From: "Kenny Lim" <kennylim@techie.com>
Subject: Re: Simple Question ~ How to perform a directory recursive search ?
Message-Id: <2fX15.49321$5k2.103431@dfw-read.news.verio.net>

With the advise from you guys, I had successfully completed my first PERL
project.
Just Thank you all for the pointers.

Thanks Again.

Kenny-


"Kenny Lim" <kennylim@techie.com> wrote in message
news:p%t15.48672$5k2.93874@dfw-read.news.verio.net...
>
> Hi All,
>
> First and foremost, I want to Thank You for all your time and advise in
> regards to the
> issue that I had submitted to the newsgroup.
>
> Second of all, I apologize if I wasn't clear interms of describing the
> actual problem.
>
> My objective is rather simple here,..
>
> (a) Search a given directory (including subdirectories) for the following
> file extension.
>
> .dsp
> .def
> .rc
> .h
> .cpp
>
> (b) Search the contents of the file that matches the extension as above
> on a given string. (ie. "productv10")
>
> ie. to search for a matching strings "productv10" on all the files that
met
> the extension criteria in (a)
>
> (c) Subsitute ALL matching "productv10" strings with "productv20" found.
>
> (d) Save changes to the original file permanently. (Including the matches
> files found in the subdirectories)
>
> (e) Generate a report on the files and the strings that had been changed.
>
> ie.
>
> Found in File ETProj.dsp :
>
> Before: TargetPath=\WorkReleaseUnicode\etproj50
> After: TargetPath=\WorkReleaseUnicode\etproj60U.dll
>
> ===============================================================
>
> (i) The only reason as to why I am using different methods to search the
> directory
> is because I am not too sure how to actually use the find:file
> utilities to search
> for only a given extension and not all the files in the entire
> directories and subdirectories.
>
> ie.
>
> Use File::Find;
> find sub {print "Found One: $File::Find::name\n" if !-d}, '.';
>
> Questions: It would be very nice to know how to actually customize my sub
> routine
> to only search for only the extensions that I needed. (do you have sample
> that I can abide to ?)
>
> (ii) What would be the simplest methods to only save changes onto the
> original files that only matches and subsitute the "productv10" to
> "productv20" strings.
> (Including the matching file found in subdirectories)
>
>
> my code :
>
> rename ($filename, "$filename.orig") or die "Can't rename`$filename': $!";
> rename ($new_filename, $filename) or die "Can't rename `new_$filename':
$!";
>
> #As you can see, I am actually renaming all the files that matches the
> extension criteria
> and not the files that matches the string name. This would be inefficient.
>
> (iii) Out of curiosity,..
>
> The sample regular expression search strings that you gave me so far,
yield
> no results.
>
> find /my/dir -regex '.*\.\(cpp\|dsp\|rc\)'
>
> The following simple statement works but are only searching for one
> extensions.
>
> find d:/vss_test/etproject/ -regex '.*cpp' -print > result.log
>
> $ find d:/vss_test/etproject/ -regex '.*cpp'
> d:/vss_test/etproject/AddFilesDlg.cpp
> d:/vss_test/etproject/BuildConfirmationDlg.cpp
>
> Question : Is thre anything that I am missing in able to yield the results
> that I needed.
> Is there a way to run this in a script and not in the shell mode ?
>
> Any advise would be greatly appreciated !
>
> Thanks All and you have pleasant evening.
>
> Kenny-
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "Neil Kandalgaonkar" <nj_kanda@alcor.concordia.ca
> <mailto:nj_kanda@alcor.concordia.ca>> wrote in message
> <news:8i234d$udl$1@newsflash.concordia.ca>...
> > In article <yBZ05.11109$907.272697@newsread2.prod.itd.earthlink.net
> <mailto:yBZ05.11109$907.272697@newsread2.prod.itd.earthlink.net>>,
> > Kenny Lim <kennylim@techie.com <mailto:kennylim@techie.com>> wrote:
> >
> > >(a) Is there a method to perform a directory recursive search
(including
> > >subdirectories) "without having to use the File::Find standard module"
?
> > >(Snippets of my code is enclosed below)
> >
> > Why would you not want to use File::Find?
> >
> > Anyway, of course the answer is yes; you could simply reinvent what
> > File::Find does, perhaps in a less generalized way.
> >
> > Or simply get the results of a 'find', if you are on unix.
> >
> >
> > >(b) Is there a method to only change the name of the file only when a
> > >criteria is met.
> > >
> > >Eg.
> > >
> > >Search for a matching strings called "old" and replace it with "new" in
a
> > >file with
> > >*cpp *dsp *rc extension.
> >
> > I got confused. Are you trying to change the filename or alter the
> contents?
> > Your code opened a second filehandle. I didn't understand the comments
you
> > added after your code.
> >
> > Anyway, perl has a rename().
> >
> > Here's one way of modifying file *contents* which leans on shell tools
> > rather than File::Find. (n.b. this is GNU find 4.1)
> >
> > $ find /my/dir -regex '.*\.\(cpp\|dsp\|rc\)' -print \
> > | xargs perl -pi.bak -e 's/search/replace/g'
> >
> > This has the advantage of simplicity and safety. You'd have to do a lot
> > of wheel-reinventing to get something safe like perl -pi.bak; it makes
> > backups while modifying the file "in-place".
> >
> > If you just wanted to rename it:
> >
> > $ find /my/dir -regex '.*\.\(cpp\|dsp\|rc\)' -print \
> > | perl -wlne '(my $new = $_) =~ s/search/replace/; rename $_, $new'
> >
> > See man find, and man perlrun for further explanation.
> >
> > Or, find a good intro to unix shell scripting if everything here is
> > totally baffling to you.
> >
> > --
> > Neil Kandalgaonkar
> > neil@brevity.org <mailto:neil@brevity.org>
>
>
>
> "Kenny Lim" <kennylim@techie.com> wrote in message
> news:yBZ05.11109$907.272697@newsread2.prod.itd.earthlink.net...
> >
> > Hi All,
> >
> > I am just a beginner and are wondering :
> >
> > (a) Is there a method to perform a directory recursive search (including
> > subdirectories) "without having to use the File::Find standard module" ?
> > (Snippets of my code is enclosed below)
> >
> > (b) Is there a method to only change the name of the file only when a
> > criteria is met.
> >
> > Eg.
> >
> > Search for a matching strings called "old" and replace it with "new" in
a
> > file with
> > *cpp *dsp *rc extension.
> >
> > Any help would be greatly appreciated. Thanks All and you have a
pleasant
> > evening !
> >
> > Kenny-
> >
> >
> > #Snippets of my code
> >
> > my $filename;
> >
> > #==================================#
> > # Get list of specified Filename in the directory  #
> > #==================================#
> >
> > while (<*.dsp *.def *.rc *.h *.cpp>)  # *.pl is used for test purposed
> >
> > #This method enable me to search for all the file with the following
> > extension,
> > #but I am not able to perform a search for the file within a
> subdirectories.
> >
> > #If using the FIle:Standard module would be a better approach, do you
know
> > #how can I search the extension enclosed as above including the
> > subdirectories then.
> >
> > #Either way is fine with me..
> >
> >
> > {
> >
> > #print "$_\n";
> > $filename = $_;
> > OPEN_FILE ();
> > print "$filename\n";
> >
> > }
> >
> > sub OPEN_FILE
> > {
> >
> >     $new_filename = $filename . ".new_ext";
> >
> >     open(OLD_FILE, "< $filename") or die "Can't open `$filename': $!";
> >     open(NEW_FILE, "> $new_filename") or die "Can't open
> > `$new_filename':$!";
> >     #select (NEW_FILE);
> >
> >    while (<OLD_FILE>)
> > {
> >   chomp;
> > if (s/$search/$replace/i)
> > {
> > print "Found One !:\nBefore:$search After:$_\n";
> > }
> >
> > print NEW_FILE "$_\n" or die "Can't write `$new_filename': $!";
> >
> >           }
> >    close (OLD_FILE) or die "Can't close `$filename': $!";
> >    close (NEW_FILE) or die "Can't open `$new_filename': $!";
> >    rename ($filename, "$filename.orig") or die "Can't rename`$filename':
> > $!";
> >    rename ($new_filename, $filename) or die "Can't rename
`new_$filename':
> > $!";
> >
> >
> > # The problem is when I overwrite the old files with the new one, it
also
> > includes
> > #all the files that matches the extensionc name criteria but "not" the
> > matching strings
> > #contents. (This is kinda inefficient,..I am thinking just removing all
> the
> > files at the end
> > of the transaction)
> >
> >
> > };
> >
> >
> >
> > Thanks in advance.
> >
> > Kenny-
> >
> >
> >
> >
> >
>
>




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

Date: Thu, 15 Jun 2000 03:06:45 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: sorting an array
Message-Id: <x7n1kn7id7.fsf@home.sysarch.com>

>>>>> "JZ" == Jeff Zucker <jeff@vpservices.com> writes:

  JZ> This doesn't have to be a tradeoff.  As I move DBD::RAM and
  JZ> SQL::Statement towards pure Perl and as the pure Perl perlDB
  JZ> project ramps up (http://perldb.sourceforge.net/), one will be
  JZ> able to specify a request in SQL and get the work done by Perl. I
  JZ> would value any suggestions on that.  I would value even more if
  JZ> you (Larry) want to help implement the sorting for it. :-)

well, i have a very early first pass of a Sort::Records module (i
haven't touched it in a year) which is aimed at such a need. it is
designed to take record and field descriptions and create a sort sub
which uses the GRT for optimal speed. the sort object can be used as is
or the code for it can be printed out for use by another program. it is
designed to allow for very complex field descriptions and can handle
records that strings or perl data structures (LoL, HoL, etc.). if
someone wants to help or take the lead on it i would be very willing to
help out. but right now it is on a WAY WAY back burner.

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: Wed, 14 Jun 2000 20:50:19 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: Very strange DBI:mysql-problem!
Message-Id: <Pine.GSO.4.10.10006142047590.5301-100000@user2.teleport.com>

On Wed, 14 Jun 2000 joakim@varia.nu wrote:

> Because I use a REGEXP I expect the user input "goatcheese" to match
> both "goatcheese" and "cheese" from the Ingredient table BUT I only
> get a match for "cheese" and not for "goatcheese".

Your posted code is large and complex. Perhaps you will find the answer if
you step through it in the debugger. If you still have troubles, you
should cut your code down to a small, self-contained example showing the
line of code which is not doing what you think it should. That way, others
will be able to see what's going on without having to set up a database
full of cheese. :-)

Good luck with it!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

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 3364
**************************************


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