[10318] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3911 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 6 21:07:34 1998

Date: Tue, 6 Oct 98 18:01:32 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 6 Oct 1998     Volume: 8 Number: 3911

Today's topics:
    Re: NEEDED: A good perl programer to... (Marc Bissonnette)
    Re: NEEDED: A good perl programer to... <steph@hotkey.net.au>
    Re: password help <commitman@digitalnet.com.br>
    Re: regexp with variable substitution values (Larry Rosler)
    Re: regexp with variable substitution values (Brand Hilton)
    Re: send geroge reese (was Re: Call for Participation:  (Abigail)
    Re: Survey Script <matt@whiterabbit.co.uk>
        Timing An LWP get request <jhr@best.com>
    Re: Tutorial <raj.subramani@citicorp.com>
    Re: What's is wrong here? <eashton@bbnplanet.com>
    Re: What's is wrong here? (Larry Rosler)
    Re: What's is wrong here? (Brand Hilton)
    Re: What's is wrong here? <eashton@bbnplanet.com>
    Re: What's is wrong here? <achoy@us.oracle.com>
        Why does this program chomp 18 MB of memory? <dwc3q@cs.virginia.edu>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: 6 Oct 1998 23:06:54 GMT
From: dragnet@internalysis.com (Marc Bissonnette)
Subject: Re: NEEDED: A good perl programer to...
Message-Id: <6ve7qe$fiq$1@news.interlog.com>

In article <lasoh2rsf6.fsf@erh.ericsson.se>, erhmiru@erh.ericsson.se says...
>
>You forgot to mention a price which you are willing to pay. Therefore
>dont expect any serious offer.

Why would he mention the price he's willing to pay up front? It is a sad, but 
true fact that there are many out there that will simply quote to fill the 
budget, regardless of the actual time spent on the job.

Granted, knowing the budget ahead of time can make for an easier relationship 
with the client (during the bid/quote process), but that usually only comes 
after a trust relationship has been established. 

As long as the client provides a decent description of what they want, and 
sample documents/files that the scripting will be handling, you should be able 
to at least give them a ball park to see if you are both on the same playing 
field. 

In this case, the guy is asking for a relatively simple search script. 
Personally, I'd be asking to see some examples of the documents to be searched, 
as well as wanting to know if the records are already in existance, or if they 
will be created in the future (I find life is *much* easier if I can dictate 
the format of records to be searched, rather than fitting the search engine 
around existing documents)

Keeping in mind that I'm not a perl expert by any stretch of the imagination, 
(though i've been using Perl for almost four years now), and definitely not a 
databse guy, I'd have quoted around $500 (Canadian) to do the job, using an 
existing search script as a base. Since my firm just landed a major contract 
(and we're still relatively small), I can't put a bid on this one 'for real' 
due to time limitations (Besides, most of the readers of this group could 
probably do the job better and faster than I, anyway :) :) :)


-- 
Marc Bissonnette
InternAlysis
Corporate Internet Research and Results!
http://www.internalysis.com



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

Date: Wed, 07 Oct 1998 10:56:09 +1000
From: Stephan Carydakis <steph@hotkey.net.au>
Subject: Re: NEEDED: A good perl programer to...
Message-Id: <361ABC29.163E@hotkey.net.au>

MTNBIKE151 wrote:
> 
> Ok, here is what im am willing to  pay,
> $400.00 at the end of the project, I must be able to see a working copy of the
> script, i will give any one a sample of the flat-file database.
> 
> Please Reply
> Chris
Hi Chris,

I was perusing the group and came accross your post. I have written a
few custom search scripts for clients and am interested with your offer.

Have you hired anyone yet?

If not, could you send me a sample of the database and a description of
what/how you would like the script to function and I will get to it.

If you would like to see a working example of a small search engine I
have written, please go to:
		http://www.yooralla.com.au/search.htm

Regards,

________________________________________
Stephan Carydakis - Web Developer
EMAIL: steph@hotkey.net.au
________________________________________


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

Date: Tue, 6 Oct 1998 21:19:31 -0300
From: "Commitman" <commitman@digitalnet.com.br>
Subject: Re: password help
Message-Id: <6vec5r$ga0$1@srv4-poa.nutecnet.com.br>

Well, u may to that:

You put the page out of the www directory, and if the passwd is correct, u
print the page !

It's simple !

Jonistuf wrote in message <19981006172105.27165.00006059@ng77.aol.com>...
>
>I am interested in learning how to password protect a page.  Are there any
>tutorials online that would explain all about how the .htpass (or whatever
it's
>called) file works and how to prompt the user for a username and password.
Any
>help would be greatly appreciated.  Thanks.
>
>-Kevin (Jonistuf@aol.com)
>




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

Date: Tue, 6 Oct 1998 16:21:20 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: regexp with variable substitution values
Message-Id: <MPG.108445c7c95065259897ee@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <6ve6pg$6q0$1@statler.server.colt.net> on Tue, 6 Oct 1998 
22:07:43 +0100, Paul Makepeace <Paul.Makepeace@POBox.com> says...
> Tom Phoenix wrote in message ...
 ...
> >    $string =~ s/subtag/$array[$i++]/g;
> 
> $string =~ s/subtag/$array[$i++]/ge;    # NB /e !
> 
> ...shurely?

How s[h]ure are you?  Did you bother to test it before posting?

#!/usr/local/bin/perl -w
use strict;
$_ = 'x-y-z';
my @a = 1 .. 3;
my $n = 0;
s/-/$a[$n++]/g;
print "$_ $n\n";
__END__

Sheesh!

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 6 Oct 1998 23:13:21 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: regexp with variable substitution values
Message-Id: <6ve86h$7p111@mercury.adc.com>

In article <6ve6pg$6q0$1@statler.server.colt.net>,
Paul Makepeace <Paul.Makepeace@POBox.com> wrote:
>
>Tom Phoenix wrote in message ...
>>On Tue, 6 Oct 1998 jcoffey@connectnet.com wrote:
>>
>>> $string =~ s/subtag/$array[$i]/g;
>>>
>>> # where $i is some sort of counter for the number of times matched.
>>
>>Maybe you want something like this?
>>
>
>>    $string =~ s/subtag/$array[$i++]/g;
>
>
>$string =~ s/subtag/$array[$i++]/ge;    # NB /e !
>
>...shurely?

BZZZT!  Thank you for playing :-)  

The /e isn't necessary, and yields a null string for the substitution
value.

-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications, ATM Transport Division
|_____|   Richardson, Texas


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

Date: 6 Oct 1998 23:24:01 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: send geroge reese (was Re: Call for Participation: Python Conference)
Message-Id: <6ve8qh$avv$1@client3.news.psi.net>

Zenin (zenin@bawdycaste.org) wrote on MDCCCLXII September MCMXCIII in
<URL:news:907711883.758669@thrush.omix.com>:
++ Abigail <abigail@fnx.com> wrote:
++ : Zenin (zenin@bawdycaste.org) wrote on MDCCCLXII September MCMXCIII in
++ 	>snip<
++ : ++ 	True, but it is here now.  As such, this should no longer be
++ : ++ 	considered an issue for new, large scale projects that need
++ : ++ 	inheritance.
++ :
++ : Large scale projects don't tend to start after the release of
++ : perl5.005. Some large scale project have started a year or longer ago.
++ 
++ 	And I'm sure there are still projects stuck in K&R C, but that
++ 	doesn't mean that ANSI C features should simply be thrown away.

I'm not saying that new features should be thrown away. But did you 
throw away your K&R book the day the first ANSI C compiler was delivered?

++ 	>snip<
++ : ++ 	IMHO, inheritance is highly overrated.  A uses relationship is
++ : ++ 	much more useful and reusable in most cases.  There never was field
++ : ++ 	name collision in a uses relationship.
++ :
++ : If you don't use inheritance, why bother with OO?
++ 
++ 	Encapsulation, data abstraction, lower name collisions, etc.


You don't need OO for that. In fact, when using procedures and packages
I already have 'my' variables and namespaces. Have had those for many,
many years.

It still amazes me that perl5 introduced both 'my', 'use strict' and
its silly way of creating objects.



Abigail
-- 
perl -e 'for (s??4a75737420616e6f74686572205065726c204861636b65720as?;??;??) 
             {s?(..)s\??qq \?print chr 0x$1 and q ss\??excess}'


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

Date: Wed, 07 Oct 1998 01:40:54 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
To: droby@copyright.com
Subject: Re: Survey Script
Message-Id: <361AB896.4F098139@whiterabbit.co.uk>

Don,

> That's pretty tenuous, but perhaps educational...

I thought so.  Unfortunately it is necessary to politely ask people to
partake in things like this once in a while.  I do contribute a great
deal towards newsnet (mainly c.i.w.a.cgi) so I really think it's only
fair to ask a few favours in return occassionally.  Is that really so
bad?

> Perhaps you want to check on the success of that cookie operation.  Or someone
> thoroughly unscrupulous might stuff your ballot-box.  ;-)

Yup, I'm well aware of how precarious a safety precaution are cookies. 
However, given that this is hardly a matter of national security, I
decided that the overheads for building in a more "safe" method of
preventing multiple submissions far outweighed the benefits.  And when I
saw a hundred votes for "Whiz Communications", alarm bells did ring...

Matt
--






-- 
Matt's daily comic strip
Porridge and Fartcakes
http://www.whiterabbit.co.uk/cartoons


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

Date: Tue, 06 Oct 1998 17:18:10 -0700
From: Joel Rosenberg <jhr@best.com>
Subject: Timing An LWP get request
Message-Id: <361AB342.EF04EE30@best.com>

I have been writing some scripts that request data from webpages.
Sometimes the program hangs up because there is no reply from the
server.  I have gone into netscape and made the request on the url that
is getting hung up.  It also hangs up there.  Is there a way to time the
get request and move on if it takes more than the time allotted and I
don't have to kill the program?

--
Joel Rosenberg
jhr@best.com
650-941-3306




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

Date: Tue, 06 Oct 1998 12:52:32 +0100
From: Raj Subramani <raj.subramani@citicorp.com>
To: "Chad S. Skiles" <wick@cablenet-va.com>
Subject: Re: Tutorial
Message-Id: <361A0480.7A7108D8@citicorp.com>

> Does anyone know where I can get a good offline tuorial for perl?

http://agora.leeds.ac.uk/Perl/start.html

(basic tutorial).

Also useful (at times) on-line textbook is:

http://www.codebits.com/p5be/


-- 
Raj Subramani


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

Date: Tue, 06 Oct 1998 23:06:02 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: What's is wrong here?
Message-Id: <361A9FE2.EAEB72B7@bbnplanet.com>

Try 'perldoc -f quotemeta'. 

e.

I turn off the last light and close the door.
Moving toward whatever ancient thing
it is that works the chains
and pulls us so relentlessly on.  -R. Carver-


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

Date: Tue, 6 Oct 1998 16:08:58 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: What's is wrong here?
Message-Id: <MPG.108442e65fd98cde9897ed@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <361A95CC.310A6638@us.oracle.com> on Tue, 06 Oct 1998 15:12:28 
-0700, Allen Choy <achoy@us.oracle.com> says...
 ...
> $cnt = $foo =~ tr#$SEP#$SEP#;;

  $cnt = eval " \$foo =~ tr#$SEP## ";

The second substitution is unnecessary, as that is the default.  And the 
two semicolons are *certainly* unnecessary. :-)

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 6 Oct 1998 23:23:46 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: What's is wrong here?
Message-Id: <6ve8q2$7p112@mercury.adc.com>

In article <361A95CC.310A6638@us.oracle.com>,
Allen Choy  <achoy@us.oracle.com> wrote:
>
>This problem is driving me up the wall.
>
>I'm trying to count the number of directory levels - simple enough.
>
>$cnt = $foo =~ tr#/#/#;
>
>This works just fine on regular unix.  But to work on multiple OS's, I
>want to
>do something like this:
>
>$cnt = $foo =~ tr#$SEP#$SEP#;;
>
>But it's not producing the same results.

$SEP isn't interpolated in either of those positions.  You're counting
the number of dollar signs, 'S's, 'E's, and 'P's in $foo.

You could always say 

  $cnt = eval "\$foo =~ tr#$SEP#$SEP#";

But that kinda gives me the willies.  Oh, well, at least now you know
what it's doing.

-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications, ATM Transport Division
|_____|   Richardson, Texas


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

Date: Tue, 06 Oct 1998 23:29:41 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: What's is wrong here?
Message-Id: <361AA56C.64E93B09@bbnplanet.com>

Larry Rosler wrote:

> > $cnt = $foo =~ tr#$SEP#$SEP#;;
> 
>   $cnt = eval " \$foo =~ tr#$SEP## ";

Oh duh, I've been up all night and my brain is as fuzzy as my eyes. Urf.
Thanks for correcting me Larry.

e.

So the Earth endures, in every petty matter
And in the lives of men, irreversible.
And it seems a relief. To win? To lose?
What for, if the world will forget us anyway. -C. Milosz-


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

Date: Tue, 06 Oct 1998 16:54:30 -0700
From: Allen Choy <achoy@us.oracle.com>
Subject: Re: What's is wrong here?
Message-Id: <361AADB6.31A0161F@us.oracle.com>

Cool.  That did it.

Thanks!

Allen

Brand Hilton wrote:

> In article <361A95CC.310A6638@us.oracle.com>,
> Allen Choy  <achoy@us.oracle.com> wrote:
> >
> >This problem is driving me up the wall.
> >
> >I'm trying to count the number of directory levels - simple enough.
> >
> >$cnt = $foo =~ tr#/#/#;
> >
> >This works just fine on regular unix.  But to work on multiple OS's, I
> >want to
> >do something like this:
> >
> >$cnt = $foo =~ tr#$SEP#$SEP#;;
> >
> >But it's not producing the same results.
>
> $SEP isn't interpolated in either of those positions.  You're counting
> the number of dollar signs, 'S's, 'E's, and 'P's in $foo.
>
> You could always say
>
>   $cnt = eval "\$foo =~ tr#$SEP#$SEP#";
>
> But that kinda gives me the willies.  Oh, well, at least now you know
> what it's doing.
>
> --
>  _____
> |///  |   Brand Hilton  bhilton@adc.com
> |  ADC|   ADC Telecommunications, ATM Transport Division
> |_____|   Richardson, Texas



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

Date: Tue, 6 Oct 1998 20:38:45 -0400
From: David Coppit <dwc3q@cs.virginia.edu>
Subject: Why does this program chomp 18 MB of memory?
Message-Id: <Pine.WNT.4.03.9810062035520.326-100000@legacy.cs.virginia.edu>


When I run the following program:

----

#!/usr/cs/bin/perl

open (A,"xxx");

while ($line = <A>)
{
  $string .= $line;
}

print length $string;
<STDIN>;

-----

it reads the file and prints "4440797", but Unix top says:

  PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
14256 dwc3q      1   0    0   18M   14M sleep   0:00  2.02% tester

What's going on? Does Perl really need 3-4 times the memory to hold a
string?

Thanks,
David

_________________________________________________________________________
David Coppit - Graduate Student        coppit@cs.virginia.edu
The University of Virginia             http://www.cs.virginia.edu/~dwc3q
                "For I am a Bear of Very Little Brain,
             and long words Bother me" - Winnie the Pooh



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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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


------------------------------
End of Perl-Users Digest V8 Issue 3911
**************************************

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