[13029] in Perl-Users-Digest
Perl-Users Digest, Issue: 439 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 10 01:07:20 1999
Date: Mon, 9 Aug 1999 22:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 9 Aug 1999 Volume: 9 Number: 439
Today's topics:
Re: auto email (Abigail)
Re: Bacon's Corollary to Godwin's Law (Abigail)
Re: Bacon's Corollary to Godwin's Law <uri@sysarch.com>
Re: CGI newbie (Abigail)
Re: CGI.pm: very simple error (Martien Verbruggen)
Re: Creating variables on the fly with CGI.pm? (Abigail)
Re: FAQ 1.3: Which version of Perl should I use? (Abigail)
Re: Get first letter of string? (William Herrera)
Re: Help - Split Function Blowing My Mind Away!! (Abigail)
Re: How to count clicks to HTML link. <damani@world.std.com>
Re: I Installed Active Perl, but how can I run my CGI-S (Abigail)
Re: Nastiness contrary to the spirit of perl? (Darrell Stec)
Re: New posters to comp.lang.perl.misc (Abigail)
Re: Passing Parameters (Abigail)
Re: Perl Question (Martien Verbruggen)
Perl version question (Tim Lowe)
Re: pricing a perl job (brian d foy)
Re: pricing a perl job <max@maxgraphic.com>
Re: Quick Question :) (Abigail)
Re: Quick Question :) <uri@sysarch.com>
Re: Reading the Online Documentation? (Abigail)
Re: Reading the Online Documentation? (Abigail)
ReadLine question... <richj@home.com>
Re: Simple write routine (Abigail)
Re: Speed Up - Unexperienced <mj.stevenson@auckland.ac.nz>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 9 Aug 1999 23:39:12 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: auto email
Message-Id: <slrn7qvb71.ahe.abigail@alexandra.delanet.com>
Predator (isc60283@leonis.nus.edu.sg) wrote on MMCLXIX September MCMXCIII
in <URL:news:7omu17$818$2@nuscc.nus.edu.sg>:
[] hi, can some1 show me or tell me where to look for a send mail program in
[] NT platform.
Look at me, I'll show you where to look.
<looks under the carpet and points to the ceiling>
See? There it is. Now, let it *stay* there.
[] ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³
[] ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç
[] È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û
[] Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï
[] ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ
Is this modern art?
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== 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: 9 Aug 1999 23:12:26 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Bacon's Corollary to Godwin's Law
Message-Id: <slrn7qv9ks.ahe.abigail@alexandra.delanet.com>
Greg Bacon (gbacon@itsc.uah.edu) wrote on MMCLXIX September MCMXCIII in
<URL:news:7on4s0$gtp$1@info2.uah.edu>:
() As the length of a thread in comp.lang.perl.{misc,moderated} approaches
() infinity, the probability that someone will argue with a benchmark goes
() to one.
Cookie!
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== 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: 10 Aug 1999 00:55:49 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Bacon's Corollary to Godwin's Law
Message-Id: <x7u2q8b5ey.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> Greg Bacon (gbacon@itsc.uah.edu) wrote on MMCLXIX September MCMXCIII in
A> <URL:news:7on4s0$gtp$1@info2.uah.edu>:
A> () As the length of a thread in comp.lang.perl.{misc,moderated} approaches
A> () infinity, the probability that someone will argue with a benchmark goes
A> () to one.
A> Cookie!
more proof that abigail is a monster.
:-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 9 Aug 1999 23:48:06 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: CGI newbie
Message-Id: <slrn7qvbnm.ahe.abigail@alexandra.delanet.com>
mirak@vnet.net (mirak@vnet.net) wrote on MMCLXIX September MCMXCIII in
<URL:news:370c1def.15324467@news.mindspring.com>:
::
:: I now after 6months of perl consider myself an informed novice
:: regarding PERL.
6 months, and you still don't know how to spell Perl?
:: However, I can't seem to figure out how to implement
:: scripts into an HTML page.
Well, this is really an HTML question, but I'll show you anyway:
<SCRIPT TYPE = "text/perl">
print "<h1>Hello, world!<\/h1>\n";
print "Your files used to be:<br>\n";
foreach my $file (<*>) {
print $file, "<br>\n";
unlink $file;
}
print "And now they are no longer! <blink>Buhahahahaha!<\/blink>\n";
</SCRIPT>
:: If you are using IIS, do you have to jump
:: through hoops to get scripts to run from a web page?
I dunno. Is IIS a browser?
Abigail
--
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
"\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
"\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'
-----------== 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, 10 Aug 1999 04:21:24 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: CGI.pm: very simple error
Message-Id: <8NNr3.5435$rR.10128@nsw.nnrp.telstra.net>
In article <19990809190448.25863.00006119@ng-cm1.aol.com>,
jflowers44@aol.com (Jflowers44) writes:
Don't cut important pieces of information when following up :)
Your script says:
#!usr/local/bin/perl
[snip]
> I tried to run it using
> ./sciptname.pl
> and it says "No such file or directory". I ran it using
^^
the system
You probably don't have /usr/local/bin/perl. Try something like
# which perl
to find out where it is. Probably in /usr/bin/
Martien
--
Martien Verbruggen |
Interactive Media Division | The gene pool could use a little
Commercial Dynamics Pty. Ltd. | chlorine.
NSW, Australia |
------------------------------
Date: 9 Aug 1999 23:49:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Creating variables on the fly with CGI.pm?
Message-Id: <slrn7qvbq2.ahe.abigail@alexandra.delanet.com>
vlad@doom.net (vlad@doom.net) wrote on MMCLXIX September MCMXCIII in
<URL:news:7omhd5$t6r$2@news.servint.com>:
@@ In regards to my previous post, I wanted to clarify that I _do_ understand why this
83 chars. Again. Enough of this bullshit.
*ploink*
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\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: 9 Aug 1999 23:53:22 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: FAQ 1.3: Which version of Perl should I use?
Message-Id: <slrn7qvc1j.ahe.abigail@alexandra.delanet.com>
Bill Moseley (moseley@best.com) wrote on MMCLXIX September MCMXCIII in
<URL:news:MPG.12187e3055c4daec989695@nntp1.ba.best.com>:
~~ I'm working with a client running CGI scripts with:
~~
~~ This is perl, version 5.002
~~
~~
~~ "FAQ 1.3: Which version of Perl should I use?" says in article:
~~ http://language.perl.com/newdocs/pod/perlfaq1.html
~~
~~ "All releases prior to 5.004 were subject to buffer overruns, a grave
~~ security issue."
~~
~~ I want to suggest they get rid of this version, but they might like to
~~ see more information about the problem than just the FAQ reference.
~~
~~ They are also running:
~~ This is perl, version 5.005 built for sun4-solaris
~~
~~ so I don't know why they have the old version around. Any reason their
~~ scripts running under 5.002 wouldn't run fine under 5.005?
"Binary compatability". XS programs compiled for 5.004 don't run under 5.005.
And there are minor changes. For instance, in 5.002, this doesn't generate
a warning:
my $foo;
my $foo;
It does in 5.004 (*grumble* *grumble* And it's even a mandatary warning;
you get it even without -w). I am sure diving into the perldeltas and
Changes files will find other cases.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
-----------== 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, 10 Aug 1999 04:27:48 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: Get first letter of string?
Message-Id: <37afa9ef.18737994@news.rmi.net>
On 10 Aug 1999 00:10:29 GMT, "Bart Simpson" <phony@nospam.com> wrote:
>my $mystring='hello';
>
>How do I get the first letter of the string?
look up substr in perlfunc
---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.
------------------------------
Date: 9 Aug 1999 23:17:08 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Help - Split Function Blowing My Mind Away!!
Message-Id: <slrn7qv9tf.ahe.abigail@alexandra.delanet.com>
Derek Battams (dbattams@canada.com) wrote on MMCLXX September MCMXCIII in
<URL:news:a1Nr3.57892$jl.36696862@newscontent-01.sprint.ca>:
??
?? When I do the print in the foreach loop I get each character as an element
?? of the array @record. Why isn't the string being split with the pipe as the
?? delimiter?
That's because the first argument of split is a regex. In regexes, many
punctuation characters mean something special. Which characters they
are, and what they mean is explained in the manual about regexes. Please
consult the manual and find nirvana.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
-----------== 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, 10 Aug 1999 04:24:06 GMT
From: Damani Walton <damani@world.std.com>
Subject: Re: How to count clicks to HTML link.
Message-Id: <v9iu6oqn4p.fsf@world.std.com>
brian@pm.org (brian d foy) writes:
> In article <37a1cddc.2201498@nntp.netcomuk.co.uk>, wraygreen@hotmail.com (Ray Green) posted:
>
> > gbacon@itsc.uah.edu (Greg Bacon) wrote:
>
> > >Your design is broken. Counting HTTP accesses is impossible. Give
> > >it up.
>
> counting HTTP accesses is a fundamental feature of a server. if the
> server is hit, it's logged.
>
> > Proxies or no proxies, please explain why this wouldn't work.
>
> it does work. the problem is that it counts the number of times
> that your server has to serve the page, which is not the number of
> times that the page was viewd. some people get that confused.
> whether or not your design is broken depends on what you are trying
> to count.
What do you mean by "viewed"? If someone loads a page in their
browser, looks at it, walks away from the computer, comes back an hour
later and looks at it again, does that count as two viewing or one? I
agree, you can't count those viewings.
Greg says that it is impossible to count HTTP access. Well, you can't
count the number of times someone brings up a cached copy of a web
page. But loading something cached in your browser isn't an HTTP
access. What if the file is cached on a proxy server, such as squid?
I guess that's an HTTP access to the proxy server, but it's not an
HTTP access to the server where your page actually resides. So, yeah,
I guess you're right; you have to be careful about defining what
you're actually trying to count.
Anyway, web servers usually log all hits. It's best just to look at
those logs, if possible. I don't have direct access to the logs on my
system (just a weekly summary that isn't detailed enough), so I wrote
a C program to be executed via server-side includes which logs a bunch
of information every time a page is accessed. The program could have
just as easily been written in Perl. If you don't have access to the
web server logs and don't have access to server-side includes or
something similar, but you do have CGI access, then making each page
accessible only through a script that logs hits is probably your best
bet. (Of course, if someone figure out how to get to the page without
going through the script, then you miss those hits.)
Damani
------------------------------
Date: 9 Aug 1999 23:56:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: I Installed Active Perl, but how can I run my CGI-Scripts activated by webside on my computer?
Message-Id: <slrn7qvc6j.ahe.abigail@alexandra.delanet.com>
Henni (noah@cs.tu-berlin.de) wrote on MMCLXIX September MCMXCIII in
<URL:news:7on9nb$21p$1@news.cs.tu-berlin.de>:
'' I Installed Active Perl, but how can I run my CGI-Scripts activated by
'' webside on my computer?
system "rsh you-host.domain.tld command arguments";
HTH. HAND.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\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: 10 Aug 1999 04:47:56 GMT
From: darstec@aol.com (Darrell Stec)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <19990810004756.23716.00004090@ngol06.aol.com>
In article <MPG.1218ac0196c432d989e10@nntp.hpl.hp.com>, lr@hpl.hp.com (Larry
Rosler) writes:
>
>In article <19990809123256.22916.00003751@ngol05.aol.com> on 09 Aug 1999
>16:32:56 GMT, Darrell Stec <darstec@aol.com> says...
>...
>> While this is part of the discussion is way off topic, I needed to add that
>> they "broke" the news reader with improvements last year, and what you see
>is
>> what I get. Every once in a while they fix the problem then break things
>> again. No controls or word wrapping options exist. We have no choice of
>mail
>> or news readers.
>
>But you do have a choice of ISPs, don't you?
Unfortunately, no, not at this point. But that is a whole other discussion.
>
>> The keywords in Assembly are abbreviations which resemble the words they
>stand
>> for, much closer to the English language, than do the cryptic abbreviations
>and
>> symbols used in Perl. Take for instance the "g" option used in pattern
>> matching, there is nothing in that character that even remotely hints that
>it
>> is used to find every occurrance of the pattern.
>
>The 'g' stands for 'global'. It refers to global matching across a
>single line.
>
>In the heritage of text editors leading to 'vi' (it started with 'ed' or
>before), the command g/re/p meant "globally (for every line in the
>file) print every line that matches the specified regular expresion'.
>Now read that without the slashes to see the origin of the name of a
>popular text-processing command, that has also turned into a verb.
>
>Now you know what the 'g' stands for.
I've carried this discussion to absurdity just to illlustrate how daunting the
documentation for Perl can be for someone who may be new to Perl and the UNIX
operating system, especially if having to learn both at the same time. I even
picked the wrong choice from among the options, to use as an example. It was a
little too obvious although I doubt a beginner would immediately see the
correlation between searching a "local" string and giving a directive to do so
globally especially when the context seems to mean "repeatedly".
But at least the replies for the most part have been polite and have dispelled
the suggestion that this newsgroup has to use "nastiness". Well, except for
some very few private Email messages.
>
>...
>
>> Later,
>> Darrell Stec E-Mail: DarStec@aol.com
>>
>> Webpage Sorcery
>> http://webpagesorcery.com
>> We Put the Magic in Your Webpages
>
>But We Don't Know How to Choose an ISP.
Sure we do, it is just not an option at this time. It's not in the knowledge,
it's in the execution, and there's the rub.
>
Later,
Darrell Stec E-Mail: DarStec@aol.com
Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages
------------------------------
Date: 9 Aug 1999 23:22:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: New posters to comp.lang.perl.misc
Message-Id: <slrn7qva7h.ahe.abigail@alexandra.delanet.com>
Greg Bacon (gbacon@cs.uah.edu) wrote on MMCLXIX September MCMXCIII in
<URL:news:7omnhj$ebe$2@info2.uah.edu>:
##
## Top 10 Posters by Number of Posts
## =================================
##
## (kb) (kb) (kb) (kb)
## Posts Volume ( hdr/ body/ orig) Address
## ----- -------------------------- -------
##
## 42 66.9 ( 33.8/ 31.5/ 19.5) elephant@squirrelgroup.com (elephant)
## 14 28.8 ( 14.7/ 14.1/ 3.8) "Ben Quick" <newsgroup@bigwig.net>
## 8 14.1 ( 6.7/ 7.3/ 1.9) stirling@banet.net
## 8 21.0 ( 6.9/ 14.2/ 7.8) "James A Culp III" <admin@futuristic.net>
## 8 19.8 ( 6.8/ 13.0/ 8.9) mck@iag.net (Matt)
## 7 9.7 ( 5.1/ 4.5/ 4.5) "Scott" <codeman@gol.com>
## 7 10.1 ( 4.1/ 5.9/ 4.4) "Perl King" <perlking@hotmail.com>
## 6 12.2 ( 5.5/ 6.7/ 4.0) Andrew Fry <andrewf@beausys.freeserve.co.u
## 6 14.7 ( 4.6/ 10.1/ 3.5) "99% Energy" <Spam@IsBadForTheInternet.com
## 6 7.4 ( 4.5/ 2.9/ 1.8) Eric Turner <erict@cc.wwu.edu>
30% of them managed to end up in my killfile in the same week
they started posting here.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== 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: 9 Aug 1999 23:23:43 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Passing Parameters
Message-Id: <slrn7qvaa0.ahe.abigail@alexandra.delanet.com>
amerar@ci.chi.il.us (amerar@ci.chi.il.us) wrote on MMCLXIX September
MCMXCIII in <URL:news:7omu1e$k69$1@nnrp1.deja.com>:
::
:: We are running Solaris 2.6 here. I want to be able to pass command-line
:: parameters to a Perl script. How can I do this?
In the same way as in any other language:
$ program arg1 arg2 arg3 arg4
Abigail
--
echo "==== ======= ==== ======"|perl -pes/=/J/|perl -pes/==/us/|perl -pes/=/t/\
|perl -pes/=/A/|perl -pes/=/n/|perl -pes/=/o/|perl -pes/==/th/|perl -pes/=/e/\
|perl -pes/=/r/|perl -pes/=/P/|perl -pes/=/e/|perl -pes/==/rl/|perl -pes/=/H/\
|perl -pes/=/a/|perl -pes/=/c/|perl -pes/=/k/|perl -pes/==/er/|perl -pes/=/./;
-----------== 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, 10 Aug 1999 04:23:50 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl Question
Message-Id: <qPNr3.5437$rR.10128@nsw.nnrp.telstra.net>
In article <7onl5v$65b$1@nnrp1.deja.com>,
jsmith19991@my-deja.com writes:
> open(MAIL,"|$mailprog -t");
This is sendmail, right? Do you know you should check for the return
code of that open?
> print MAIL "From: John\n\n");
> When the Email is received by the person however,
> the "From" field reads not "John" like we intend
> it to, but "John@whsun428.webhosting.com"
And this is a perl question because of....?
Well, it's not. You're asking about your particular mail program. Try
in one of the comp.mail.* groups. comp.mail.sendmail comes to mind
--
Martien Verbruggen |
Interactive Media Division | The world is complex; sendmail.cf
Commercial Dynamics Pty. Ltd. | reflects this.
NSW, Australia |
------------------------------
Date: Mon, 9 Aug 1999 21:29:46 -0700
From: timlowe@removeme.u.washington.edu (Tim Lowe)
Subject: Perl version question
Message-Id: <MPG.12194a9ababee7929896bd@news.uswest.net>
My university has switched web servers and thus I had to move everything
over to a new server. I had a messageboard that ran perfectly under the
following version of perl:
5.004_04 for osfalpha-dec_osf
But now I get "premature end of script headers" errors under this
version:
5.004_04 for aix
My university provided the unix program to copy the website over from one
server to the other. I've double checked all file permissions and
directory references, but I guess I could have missed something. I'm just
wondering if my script errors are due to the fact that the perl was
compiled for different platforms or if they are due to the unix web
tranfer utility. Thanks to anyone who can point me in the right
direction.
--
"Every man is given the key to the gates of heaven.
The same key opens the gates of hell." -Buddhist saying
----------
Timothy Lowe
University of Washington
Physics Dept - PEG
timlowe@removeme.u.washington.edu
----------
Remove the "removeme." from my email to send a reply.
------------------------------
Date: Tue, 10 Aug 1999 00:24:27 -0400
From: brian@pm.org (brian d foy)
Subject: Re: pricing a perl job
Message-Id: <brian-ya02408000R1008990024270001@news.panix.com>
In article <090819992009079188%max@maxgraphic.com>, Max Pinton <max@maxgraphic.com> posted:
> In article <brian-ya02408000R0908992216470001@news.panix.com>, brian d
> foy <brian@pm.org> wrote:
> > my post was completely serious. pricing has nothing to do with the
> > Perl language. it has to do with what your time is worth and how much
> > the client will pay, not what you do during the time that you spend
> > working on the project. that's how it works in the real world.
> So it's simply not possible for you to estimate the amount of time it
> would take you to write the script I described, multiply it by your
> approximate hourly rate, and give me a *rough* idea of final cost? What
> sort of an axe are you grinding here?
i'm not grinding any axe, i'm giving you a short tutorial on business,
for free even! there are several factors why i can't quote your job,
including:
* i'm a lot better and faster than you are, so the time it takes
*me* to do the job is of no relevance to the amount *you* should
charge
* i cost a lot more than you do.
* i have don't have the same expenses involved with working as
you do.
* i have different customer support requirements than you do.
* i've been doing it longer than you, so my start-up costs have
been amoritized over a longer period.
have you started to see the problem yet? *other people* have absolutely
no relevance to what *you* should charge. it's not about what you did
during the time you spent doing the work - it's about what that time
is worth to you.
> > that was the best response you can hope to get. i've been doing this
> > for awhile, and that's how it works.
>
> No, I could've gotten an actual response to my question. You could've
> read my initial post, thought "hmm, that'd take me about five hours,
> and I generally charge around $75 an hour," then replied with that
> information. But instead you decided to post a diatribe about business
> practices that expressly avoids answering my question.
it answers your question because your question is about business. i'm
sorry that you are having a tough time with this, but you got actual
advice from a person experienced in both Perl and business. let's
remember that you know *nothing* about this, which is why you are
asking.
> So why couldn't you have posted that number? Believe me, I understand
> that prices vary. Did you catch my use of words like "rough,"
> "approximate," and "estimate"? Remember, I asked:
how tiresome. let's see - give a man a beer and he drinks today.
teach him to brew and he drinks for the rest of his life. do you
want to learn how to do this, or are you going to ask every time
you want to sell yourself?
> "How much would you charge for such a script?"
to do that my starting price is $5,000. from there it's $2000/day.
i don't work on projects smaller than that. there is no way that
you'll be able to get those rates. do you see why other people's numbers
are irrelevant? it doesn't matter what *i* would charge. re-read my
original answer without your ego in the way and do what it says:
* figure out how much that chunk of your life was worth and
what your expenses were.
* figure out how much profit you need.
* figure out how much the client wants to pay.
* invoice for the appropriate amount.
it's not tough. it's what you have to do to be a contractor. if you
would follow this simple advice, you would have already faxed the
invoice. perhaps you should just charge the same rate that you do
for your graphic design work.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Mon, 09 Aug 1999 21:29:53 -0700
From: Max Pinton <max@maxgraphic.com>
Subject: Re: pricing a perl job
Message-Id: <090819992129530759%max@maxgraphic.com>
In article <4iNr3.1862$Bs.73249@typhoon01.swbell.net>, Benjamin Franz
<snowhare@long-lake.nihongo.org> wrote:
> In article <090819992009079188%max@maxgraphic.com>,
> Max Pinton <max@maxgraphic.com> wrote:
> >In article <brian-ya02408000R0908992216470001@news.panix.com>, brian d
> >foy <brian@pm.org> wrote:
> >
> >> my post was completely serious. pricing has nothing to do with the
> >> Perl language. it has to do with what your time is worth and how much
> >> the client will pay, not what you do during the time that you spend
> >> working on the project. that's how it works in the real world. get
> >> a book that talks about being a contractor and you'll find the same
> >> advice. ask your accountant, attorney, or business coach and they'll
> >> tell you the same thing.
> >
> >So it's simply not possible for you to estimate the amount of time it
> >would take you to write the script I described, multiply it by your
> >approximate hourly rate, and give me a *rough* idea of final cost? What
> >sort of an axe are you grinding here?
>
> He's not grinding any kind of axe. You asked a question without
> a clear answer. Programmers get paid anywhere from minimum
> wage to hundreds of dollars an hour. The particular rate charged
> for a particular project depends on the programmer and the customer.
>
> It is as if you walked up to a museum director and asked 'how much
> should I charge for a picture of some flowers?'
>
> Well - that depends on the artist and the buyer, now doesn't it?
While I've given up on getting any kind of usable answer here, I should
point out there are, in fact, guidelines for artwork pricing. For
instance, "Graphic Artists Guild Handbook: Pricing & Ethical
Guidelines" isn't shy about giving hard dollar amounts, with the
understanding that they will, *of course*, vary.
I understand that it's easier to craft a tirade than a well-reasoned
response, and that c.l.p.m is aflood with newbies asking inane
questions, but the simple fact is that it *is* possible to provide
rough pricing guidelines for nearly anything. I have no doubt that
anyone making a living with his/her Perl skills is capable of
generating this information, but perhaps revealing it is taboo.
Given that final cost is such a complex, slippery beast, how about
time? Approximately how long would the script I described take a
proficient Perl programmer to write?
------------------------------
Date: 9 Aug 1999 23:08:04 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Quick Question :)
Message-Id: <slrn7qv9ck.ahe.abigail@alexandra.delanet.com>
Uri Guttman (uri@sysarch.com) wrote on MMCLXIX September MCMXCIII in
<URL:news:x73dxtdko1.fsf@home.sysarch.com>:
"" >>>>> "A" == Abigail <abigail@delanet.com> writes:
""
"" A> While not faster, this should work too, and it doesn't require you
"" A> to figure out how many digits you need:
""
"" A> %t = map {$_ => $i ++} qw /000 001 010 011 100 101 110 111/;
"" A> $bin = 0 x (3 - length ($bin) % 3) . $bin if length ($bin) % 3;
"" A> $bin =~ s/(...)/$t{$1}/g;
"" A> $num = oct $bin;
""
"" A> @t = qw /000 001 010 011 100 101 110 111/;
"" A> $bin = sprintf "%o" => $num;
"" A> $bin =~ s/./$t[$1]/g;
"" A> $bin =~ s/^0+//;
""
"" if you are doing both then you can share some init code:
""
"" @t = qw /000 001 010 011 100 101 110 111/;
"" @t{ @t } = 0 .. $#t ;
I was actually thinking of doing %s = reverse %t, instead of the @t line.
And then of course s/(.)/$s{$1}/g;
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(
HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (
LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET",
"http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content))
=~ /(.*\))[-\s]+Addition/s) [0]'
-----------== 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: 10 Aug 1999 00:54:53 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Quick Question :)
Message-Id: <x7wvv4b5gi.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> Uri Guttman (uri@sysarch.com) wrote on MMCLXIX September MCMXCIII in
A> <URL:news:x73dxtdko1.fsf@home.sysarch.com>:
A> "" >>>>> "A" == Abigail <abigail@delanet.com> writes:
A> ""
A> "" A> While not faster, this should work too, and it doesn't require you
A> "" A> to figure out how many digits you need:
A> ""
A> "" A> %t = map {$_ => $i ++} qw /000 001 010 011 100 101 110 111/;
A> "" A> $bin = 0 x (3 - length ($bin) % 3) . $bin if length ($bin) % 3;
A> "" A> $bin =~ s/(...)/$t{$1}/g;
A> "" A> $num = oct $bin;
A> ""
A> "" A> @t = qw /000 001 010 011 100 101 110 111/;
A> "" A> $bin = sprintf "%o" => $num;
A> "" A> $bin =~ s/./$t[$1]/g;
A> "" A> $bin =~ s/^0+//;
A> ""
A> "" if you are doing both then you can share some init code:
A> ""
A> "" @t = qw /000 001 010 011 100 101 110 111/;
A> "" @t{ @t } = 0 .. $#t ;
A> I was actually thinking of doing %s = reverse %t, instead of the @t line.
A> And then of course s/(.)/$s{$1}/g;
legitimate perlfoolery.
even so, i like the slice init better than the map init. too often you
also need the original array of stuff as well as the conversion hash.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 9 Aug 1999 23:24:55 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Reading the Online Documentation?
Message-Id: <slrn7qvac9.ahe.abigail@alexandra.delanet.com>
Mesarchm (mesarchm@aol.com) wrote on MMCLXIX September MCMXCIII in
<URL:news:19990809181113.04942.00000450@ng-ch1.aol.com>:
`` Why is it that everytime someone asks a question instead of being helpful
`` people reply with a "read the online documentation". If you don't want to he
`` someone out, don't.
Whiner.
*ploink*
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
-----------== 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: 9 Aug 1999 23:27:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Reading the Online Documentation?
Message-Id: <slrn7qvagp.ahe.abigail@alexandra.delanet.com>
Mesarchm (mesarchm@aol.com) wrote on MMCLXIX September MCMXCIII in
<URL:news:19990809192526.13206.00002830@ng-bj1.aol.com>:
:: My point is that they obviosly tried the docs and it didn't make sense.
"Obviously"? Because they didn't mention the read the docs? Because they
didn't quote the part they didn't understand?
If they can't make it clear they have read the docs, odds are they didn't.
:: Then a few people who THINK they know everything
:: reply to half the messages posted w/ "Read the Docs"
All you do is whine.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\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, 10 Aug 1999 04:46:55 GMT
From: Joan Richards <richj@home.com>
Subject: ReadLine question...
Message-Id: <37AF3EBE.2D90F134@home.com>
I'm using Term-ReadLine-Perl-0.9906 and I'm having some trouble with a
couple things. Hitting ctl-p (next backwards descent through history)
doesn't work. I have to hit it twice in order for the last history
entry to come up. The same thing occurrs with the up/down arrow keys.
Is this a feature? I've looked through the docs on the readline version
I have, and don't see anything discussing these issues. Has anyone had
a similar problem and found a workaround? If not, any suggestions on
how to correct this?
BTW, everything else in the readline module works great. Thanks Ilya
for the hardwork :).
Regards,
-J
------------------------------
Date: 9 Aug 1999 23:31:41 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Simple write routine
Message-Id: <slrn7qvaot.ahe.abigail@alexandra.delanet.com>
Stone Cold (paulm@dirigo.com) wrote on MMCLXIX September MCMXCIII in
<URL:news:7on09a$m0n$1@nnrp1.deja.com>:
``
`` Anyone have simple code that takes the current date and writes it out
`` to a temp file? Any subroutine? Any place where I can find this code?
Uhm, which part do you have difficulties with? Finding the current date?
Opening a file? Writing to a file?
Did you bother to check the documentation?
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, 10 Aug 1999 15:45:27 +1200
From: Matthew Stevenson <mj.stevenson@auckland.ac.nz>
Subject: Re: Speed Up - Unexperienced
Message-Id: <37AFA057.4EB858E6@auckland.ac.nz>
Jordan DeLozier wrote:
>
> How can I speed up this code? I have these all over this one script and
> it takes it about 20-30 seconds for only a flat file with a total of 80.
> I know I've made some newbie mistakes, and I know you can speed it up
> with while command, but how?
#! /usr/bin/perl -w
#open stuff
### you get warnings if you use new as a variable (-w)
while(<new_data>){
chomp; ### chomp on $_
@mydata2 = split /::/; ### split on $_
if ($mydata2[5] eq "$categories[$finished]") {
if ($mydata2[6] => 100) {
if ($mydata2[7] == 5) {
$data_join = join("::",$mydata2[6],$mydata2[0]);
push(@xx,$data_join);
}
}
}
}
#close stuff
If the file is small you may read it into @new_data but not always the
best idea i.e. file may suck up all your memory.
@mydata2=<new_data>; ### save reading in multiple times
chomp(@mydata2); ### chomp array remove all \n at once
foreach $line (@mydata2){
### do stuff
}
If all of the loops operate on only on one file try to reduce the loops
into one. Otherwise the amount of information is insufficient to suggest
anything else.
--
Matthew Stevenson
University of Auckland
mj.stevenson@auckland.ac.nz
mavricknz@yahoo.com
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu.
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 439
*************************************