[13040] in Perl-Users-Digest
Perl-Users Digest, Issue: 450 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 10 17:07:29 1999
Date: Tue, 10 Aug 1999 14:05:11 -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 Tue, 10 Aug 1999 Volume: 9 Number: 450
Today's topics:
Re: <== Help with date sorting==> (Larry Rosler)
Re: <== Help with date sorting==> <revjack@radix.net>
Re: <== Help with date sorting==> (Matthew Bafford)
Re: array and file processing <makkulka@cisco.REMOVETHIS.com>
Re: CGI.pm: very simple error (Jflowers44)
Re: CGI.pm: very simple error (Jflowers44)
Re: CHMOD function <stirling@banet.net>
Re: CHMOD function <sariq@texas.net>
Re: chop? Split? help? <aqumsieh@matrox.com>
Encryption with sendmail <stirling@banet.net>
Re: Encryption with sendmail (Alan Curry)
Re: eval <aqumsieh@matrox.com>
Re: Help - Split Function Blowing My Mind Away!! <jbc@shell2.la.best.com>
Help Perl <mhc1587@pevt100.ca.boeing.com>
Re: Help Perl (Steve Linberg)
Re: Help Perl <Mark@Mark.Com>
Re: How do I pass arguments from one CGI script to anot <mprender@virtualis.com>
Re: list length (Greg Bacon)
NO-ONE USES PERLQT !!!!!!!!!!!!!!!!!!!!!??????????????? <br2@netvision.net.il>
Re: Perl version question (Tim Lowe)
Re: pricing a perl job <tmornini@netcom9.netcom.com>
Re: pricing a perl job <max@maxgraphic.com>
Re: pricing a perl job (brian d foy)
Problem between perl 5.00503 and perl 5.00405 <soraya@iwl.net>
Simple Perl Parsing? <dchurch@kabana.net>
Re: Simple Perl Parsing? (Matthew David Zimmerman)
Some (tricky?) regexp questions marcza@my-deja.com
Re: Sorting Backwards <cassell@mail.cor.epa.gov>
Re: Sorting by mid-record without splitting? <makkulka@cisco.REMOVETHIS.com>
spelling of foobar (was Re: Reading the Online Document <uri@sysarch.com>
Re: spelling of foobar (was Re: Reading the Online Docu <elaine@chaos.wustl.edu>
Re: suggestions for CRAP <uri@sysarch.com>
Re: suggestions for CRAP <uri@sysarch.com>
Re: turn $6 into $6000 <aqumsieh@matrox.com>
Re: turn $6 into $6000 <uri@sysarch.com>
Re: Why use Perl when we've got Python?! (Mitchell Morris)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 10 Aug 1999 13:12:27 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: <== Help with date sorting==>
Message-Id: <MPG.121a27873991a846989e1f@nntp.hpl.hp.com>
In article <slrn7r0sdu.cit.*@dragons.duesouth.net> on Tue, 10 Aug 1999
18:50:44 GMT, Matthew Bafford <*@dragons.duesouth.net> says...
...
> my %months = (
> 'January' => 0, 'February' => 1, 'March' => 2,
> 'April' => 3, 'May' => 4, 'June' => 5,
> 'July' => 6, 'August' => 7, 'September' => 8,
> 'October' => 9, 'November' => 10, 'December' => 11, # just in case
> # we get more
> # months,
> # (JAL)R.
> );
We have had in the past --
Germinal : mois où les plantes germent : month when plants germinate
Florial : mois des fleurs : month of flowers
Prairial : mois des prés : month of prairies
Messidor : mois des moissons : month of harvest
Thermidor : mois des chaleurs : month when weather is hot
Fructidor : mois des fruits : month of fruits
Vendimiaire : mois des vendanges : month of vintage
Brumaire : mois des brumes : month of fog
Frimaire : mois des frimas : month of hoar-frost
Nivôse : mois des neiges : month of snow
Pluviôse : mois des pluies : month of rain
Ventiôse : mois des vents : month of wind
Who knows what the future will bring? Be Prepared!
In any case, the slice is less to type, so less error-capable (that's
nicely alliterative in German: fehlerfähig):
my %months;
@months{qw(
January February March April May June
July August September October November December
)} = (1 .. 12);
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 10 Aug 1999 20:40:58 GMT
From: revjack <revjack@radix.net>
Subject: Re: <== Help with date sorting==>
Message-Id: <7oq2oq$29g$1@news1.Radix.Net>
Keywords: Hexapodia as the key insight
Larry Rosler explains it all:
:We have had in the past --
:Germinal : mois où les plantes germent : month when plants germinate
:Florial : mois des fleurs : month of flowers
:Prairial : mois des prés : month of prairies
[snip]
Priantaire: mois de malsujet : month of newbie posts
------------------------------
Date: Tue, 10 Aug 1999 20:57:17 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: <== Help with date sorting==>
Message-Id: <slrn7r13cp.d7g.*@dragons.duesouth.net>
[Courtesy copy sent to lr@hpl.hp.com]
And so it happened, on Tue, 10 Aug 1999 13:12:27 -0700, Larry Rosler)
typed random characters into perl, and ended up with the following
posted to comp.lang.perl.misc:
: > my %months = (
: > 'January' => 0, 'February' => 1, 'March' => 2,
: > 'April' => 3, 'May' => 4, 'June' => 5,
: > 'July' => 6, 'August' => 7, 'September' => 8,
: > 'October' => 9, 'November' => 10, 'December' => 11, # just in case
: > # we get more
: > # months,
: > # (JAL)R.
: > );
:
: In any case, the slice is less to type, so less error-capable (that's
: nicely alliterative in German: fehlerfähig):
:
: my %months;
: @months{qw(
: January February March April May June
: July August September October November December
: )} = (1 .. 12);
And so much easier on the eyes!
Thanks,
: (Just Another Larry) Rosler
--Matthew
------------------------------
Date: Tue, 10 Aug 1999 12:05:49 -0700
From: Makarand Kulkarni <makkulka@cisco.REMOVETHIS.com>
Subject: Re: array and file processing
Message-Id: <37B0780D.2C1B8C0C@cisco.REMOVETHIS.com>
[Teacher Guy wrote:
> Hello and thanks to everyone for help. My next dilemna involves
> processing arrays in Perl. I have a database with student names, test
> scores and courses. I need to load data into an array, sort the array
> on test scores field (without screwing up order of other fields) and
> choose only the top ten students. Next, I want to calculate average of
> these 10 students and print the results. Here's what I'm trying to do:
{code deleted..}
]
Do you want to find the top ten students and the average score
of these top ten students for EACH course offered? If not
then how are these results going to make sense.
--
------------------------------
Date: 10 Aug 1999 20:23:49 GMT
From: jflowers44@aol.com (Jflowers44)
Subject: Re: CGI.pm: very simple error
Message-Id: <19990810162349.21254.00000231@ng-fk1.aol.com>
Well, I finally got the script to work...It turns out that when I did "which
perl" at the prompt on telnet it said "usr/local/bin/perl" but it worked
regardless of whether I used "usr/local/bin/perl" or just "usr/bin/perl". I
still actually don't know what I was doing wrong, because the way I did it was
simply copying the file that worked with the qw:/standard notation to include
CGI.pm and simply changing the qw part tot the other type of use statement.
Thanks for all your help!
------------------------------
Date: 10 Aug 1999 20:59:06 GMT
From: jflowers44@aol.com (Jflowers44)
Subject: Re: CGI.pm: very simple error
Message-Id: <19990810165906.21242.00000198@ng-fk1.aol.com>
I now am pretty sure of the error I have been making... using
#!usr/bin/perl
instead of
#!/usr/bin/perl.
Thanks for all help!
------------------------------
Date: Tue, 10 Aug 1999 16:19:55 -0400
From: <stirling@banet.net>
Subject: Re: CHMOD function
Message-Id: <37b087cd@news1.us.ibm.net>
Malcolm Ray wrote in message ...
>[re-arranged quoting order so it makes sense, sigh]
>
>On Sun, 8 Aug 1999 14:01:24 -0400, stirling@banet.net <stirling@banet.net>
>wrote:
>>NightFever wrote in message <37a5cb50.16860675@news.idt.net>...
>>>I'm tring to make this work:
>>>
>>>$OrignialLogFile = 'sample.txt';
>>>..
>>>..
>>>..
>>>..
>>>chmod (0770, $OrignialLogFile);
>>>
>>>I'm tring to chmod a file to 770 (or any mode for that matter) and it
>>>won't change it. It will change it if I put the exact file, but not a
>>>a variable like this example, can anyone help?
>>
>>try:
>>$orig="sample.txt";
>>chmod (0770,$orig);
>>
>>NOTICE: There are double quotes instead of single quotes.
>
>What difference do you think that makes? Have you read the section on
>quote and quote-like operators in perlop? Hint: the *only* difference
>between your code and the original (apart from the variable names) is that
>yours runs ever-so-slightly slower, since Perl has to (uselessly) scan
>the double-quoted string for interpolations.
I assume that the Perl kernel's rules about using chmod on the file
whose name is contained in
the scalar are different, anyway in a more roundabout way, my solution
works. =-)
>--
>Malcolm Ray University of London Computer Centre
--
Yours Sincerely,
Stirling Hughes
DesignMultimedia
stirling@designmultimedia.com
------------------------------
Date: Tue, 10 Aug 1999 15:26:07 -0500
From: Tom Briles <sariq@texas.net>
Subject: Re: CHMOD function
Message-Id: <37B08ADF.F4CD74F3@texas.net>
stirling@banet.net wrote:
>
> Malcolm Ray wrote in message ...
> >[re-arranged quoting order so it makes sense, sigh]
> >
> >On Sun, 8 Aug 1999 14:01:24 -0400, stirling@banet.net <stirling@banet.net>
> >wrote:
> >>NightFever wrote in message <37a5cb50.16860675@news.idt.net>...
> >>>I'm tring to make this work:
> >>>
> >>>$OrignialLogFile = 'sample.txt';
> >>>..
> >>>..
> >>>..
> >>>..
> >>>chmod (0770, $OrignialLogFile);
> >>>
> >>>I'm tring to chmod a file to 770 (or any mode for that matter) and it
> >>>won't change it. It will change it if I put the exact file, but not a
> >>>a variable like this example, can anyone help?
> >>
> >>try:
> >>$orig="sample.txt";
> >>chmod (0770,$orig);
> >>
> >>NOTICE: There are double quotes instead of single quotes.
> >
> >What difference do you think that makes? Have you read the section on
> >quote and quote-like operators in perlop? Hint: the *only* difference
> >between your code and the original (apart from the variable names) is that
> >yours runs ever-so-slightly slower, since Perl has to (uselessly) scan
> >the double-quoted string for interpolations.
> I assume that the Perl kernel's
If Larry W. is the Perl general, who's the Perl kernel?
> rules about using chmod on the file
> whose name is contained in
> the scalar are different, anyway in a more roundabout way, my solution
> works. =-)
Your solution is *only* different from the original poster's in that
it's slower.
It doesn't fix anything.
- Tom
------------------------------
Date: Tue, 10 Aug 1999 13:15:04 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: chop? Split? help?
Message-Id: <x3yso5r7e1z.fsf@tigre.matrox.com>
"fatzero" <webmaster@fatzero.com> writes:
> opendir BUSDIR, "$basepath$pagedir" || die "Unable to open directory: $!";
This code is not exactly what you have... is it? The above statement
has a serious precedence problem. It should be written as:
opendir BUSDIR, "$basepath$pagedir" or die "Unable to open directory: $!";
or
opendir(BUSDIR, "$basepath$pagedir") || die "Unable to open directory: $!";
HTH,
Ala
------------------------------
Date: Tue, 10 Aug 1999 15:30:27 -0400
From: <stirling@banet.net>
Subject: Encryption with sendmail
Message-Id: <37b07c36@news1.us.ibm.net>
Hi,
Does anybody know of method's in which to do sendmail with encryption
tools such as PGP? If you could please point me in the right direction I
would be very grateful
--
Yours Sincerely,
Stirling Hughes
DesignMultimedia
stirling@designmultimedia.com
------------------------------
Date: Tue, 10 Aug 1999 20:25:55 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: Encryption with sendmail
Message-Id: <nV%r3.2385$DY2.87236@typ11>
In article <37b07c36@news1.us.ibm.net>, <stirling@banet.net> wrote:
>Hi,
> Does anybody know of method's in which to do sendmail with encryption
>tools such as PGP? If you could please point me in the right direction I
>would be very grateful
There is nothing special about sendmail and PGP. All you need to do is get
PGP to send its output into sendmail.
#!/usr/bin/perl -w
use strict;
use IO::Handle;
open(SENDMAIL, '|/usr/lib/sendmail -oi -t') or die "sendmail: $!\n";
print SENDMAIL <<EOH;
From: me\@myplace
To: him\@there
Subject: Top Secret PGP'ed Stuff
EOH
SENDMAIL->flush();
open(OLDSTDOUT, '>&STDOUT') or die "dup'ing stdout: $!\n";
open(STDOUT, '>&SENDMAIL') or die "dup'ing sendmail: $!\n";
system('pgp -feat "Recipient Name" <secretfile') and die "pgp returned $?\n";
STDOUT->fdopen(*OLDSTDOUT, '>') or die "restoring stdout: $!\n";
close(SENDMAIL) or die "finishing up sendmail: $!\n";
--
Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
pacman@cqc.com|bigotries (should| [ | | ] / _> / _>
--------------+save some time): | \__/ \__/ \___: \___:
Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman
------------------------------
Date: Tue, 10 Aug 1999 13:30:31 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: eval
Message-Id: <x3ypv0v7dc8.fsf@tigre.matrox.com>
Andy Cantrell <cantrela@agcs.com> writes:
> Try the following - note differences in direct call v.s.
> calling through the 'eval' function.
>
>
> $func = "add" ;
> sub add {
> print "add function>@_<\n";
> return qq(print "return val\n";);
> };
> &{$func}('foo', 'bar') ;
> eval(&{$func}('bar', 'foo')) ;
Ugh. This will fail under 'use strict;' which should be always used.
Ugh. It makes more sense to type in your reply AFTER the question. Not
before.
> renorum@my-deja.com wrote:
> >
> > I am trying to use eval to call a certain subroutine depending on the
> > value of a given variable:
> >
> > eval($action());
> >
> > where $action could be either "add" or "delete" or "edit". I have
> > written the subroutines add(), delete() and edit().
Use a hash of subroutine refs:
my %hash = (
add => sub { print "I am adding.\n" },
delete => sub { print "I am deleting.\n" },
edit => sub { print "I am editing.\n" },
);
my $action = 'add'; # or whatever
if (exists $hash{$action}) {
&{$hash{$action}};
else {
print "Command $action doesn't exist.\n";
}
> > Am I using this correctly? (because it doesn't seem to be working) Is
> > this not what eval is used for? Is there some better way to effect
NO!!!
eval() is mostly used for expression evaluation and exception handling.
> > this result (other than the obvious
> > if ($action eq "add") { add(); }
> > elsif ($action eq "delete") { delete(); } ...etc, etc.)
> >
> > Any help greatly appreciated. Thanks.
See hash above.
HTH,
Ala
------------------------------
Date: 10 Aug 1999 19:01:17 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: Help - Split Function Blowing My Mind Away!!
Message-Id: <37b076fd$0$225@nntp1.ba.best.com>
Larry Rosler <lr@hpl.hp.com> wrote:
> The first argument to split(), though for historical reasons often
> written as a string, is really a regular expression. The vertical bar
> is a regular-expression metacharacter.
> Write that line thus:
> @record = split(/\|/, $_[0]);
> And all will be well. (This is on my Top Ten list of Perl surprises for
> beginners. The vertical bar is a popular field separator!)
If you really have such a list, I'd be very interested in seeing it.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: Tue, 10 Aug 1999 19:03:18 GMT
From: <mhc1587@pevt100.ca.boeing.com>
Subject: Help Perl
Message-Id: <Pine.HPP.3.95.990810120235.22040A-100000@pevt100.ca.boeing.com>
Hi,
I need to write a perl program to print name of person, who had
any process run in background.
In my foreach loop below, will repeat print if user had more than one
process.
All I want is only one user name. Can you help ?
I used foreach loop, because part of big program.
foreach $process (`ps -ef | grep root`) {
($login_ID) = (split / +/,$process)[1];
print "$login_ID\n";
}
root
root
root
root
root
.
.
Thanks
Minh
------------------------------
Date: Tue, 10 Aug 1999 15:25:19 -0400
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Help Perl
Message-Id: <linberg-1008991525190001@ltl1.literacy.upenn.edu>
In article
<Pine.HPP.3.95.990810120235.22040A-100000@pevt100.ca.boeing.com>,
<mhc1587@pevt100.ca.boeing.com> wrote:
> In my foreach loop below, will repeat print if user had more than one
> process.
> All I want is only one user name. Can you help ?
>
> I used foreach loop, because part of big program.
>
>
> foreach $process (`ps -ef | grep root`) {
> ($login_ID) = (split / +/,$process)[1];
> print "$login_ID\n";
> }
Use a hash.
my %logins = ();
foreach $process (`ps -ef | grep root`) {
$login_ID = (split / +/,$process)[1];
$logins{$login_ID}++;
}
print join "\n", keys %logins;
--
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
email: <linberg@literacy.upenn.edu>
WWW: <http://www.literacyonline.org>
------------------------------
Date: Tue, 10 Aug 1999 20:43:00 +0100
From: Mark <Mark@Mark.Com>
Subject: Re: Help Perl
Message-Id: <37B080C4.BF8EB39F@Mark.Com>
mhc1587@pevt100.ca.boeing.com wrote:
> Hi,
>
> I need to write a perl program to print name of person, who had
> any process run in background.
>
> In my foreach loop below, will repeat print if user had more than one
> process.
> All I want is only one user name. Can you help ?
>
> I used foreach loop, because part of big program.
Try
%hash = ();
>
> foreach $process (`ps -ef | grep root`)
> {
> $hash{(split / +/,$process)[1]}++;
>
> }
> foreach $key (sort keys %hash)
> {
> print $key,"\n";
> }
Interesting effect is that $hash{$key} contains number of outputs for
each user! Wot a great language!
>
> .
> .
>
> Thanks
> Minh
------------------------------
Date: Tue, 10 Aug 1999 15:25:43 -0700
From: Michael Prendergast <mprender@virtualis.com>
Subject: Re: How do I pass arguments from one CGI script to another?
Message-Id: <37B0A6E7.FA777BD1@virtualis.com>
I agree with Christopher.... why don't you just use make the relevant part of
your my2.cgi into a subroutine in my1.cgi? The all of the information is right
there ready for you to use..
I hope this helps,
Michael Prendergast
Christopher Allen wrote:
> Justin Development <mark.thomas@gsc.gte.com> wrote:
> > I have an HTML file (my.html) that passes a username and password to a CGI
> > script (let's call it my1.cgi), the my1.cgi script then passes name,
>
> why don't you process this all in one script?
> have your script do two things: retrieve info from html page,
> process data(write to file , open a database whatever).
> This would be more effecient.
>
> -out
>
------------------------------
Date: 10 Aug 1999 19:06:13 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: list length
Message-Id: <7opt75$4lb$1@info2.uah.edu>
In article <692qx@questionexchange.com>,
QuestionExchange <USENET@questionexchange.com> writes:
: Try scalar(Thread->list) which evaluates an expression (Thread-
: >list) in scalar context
That's not guaranteed to return the number of elements that
Thread->list would have returned had it been called in list context.
Greg
--
If work is so terrific, how come they have to pay you to do it?
-- George Carlin
------------------------------
Date: Tue, 10 Aug 1999 22:34:27 +0300
From: Pavel Ravits <br2@netvision.net.il>
Subject: NO-ONE USES PERLQT !!!!!!!!!!!!!!!!!!!!!?????????????????????????
Message-Id: <37B07EC3.E5A604C7@netvision.net.il>
------------------------------
Date: Tue, 10 Aug 1999 12:19:44 -0700
From: timlowe@removeme.u.washington.edu (Tim Lowe)
Subject: Re: Perl version question
Message-Id: <MPG.121a1b291e3faa8f9896be@news.uswest.net>
In article <37afdaeb.442201@news.skynet.be>, bart.lateur@skynet.be
says...
> >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.
>
> Have you updated the "#!" lines?
>
> Bart.
Yes and no. I didn't have to make any changes because when I did a
"which perl" on the new server it returned the same directory path that
was used on the previous server of: /usr/local/bin/perl....
--
"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: 10 Aug 1999 19:32:38 GMT
From: Tom Mornini <tmornini@netcom9.netcom.com>
Subject: Re: pricing a perl job
Message-Id: <7opuom$hla@dfw-ixnews5.ix.netcom.com>
brian d foy <brian@pm.org> wrote:
: In article <7oor87$kta@dfw-ixnews8.ix.netcom.com>, Tom Mornini <tmornini@netcom9.netcom.com> posted:
:> brian d foy <brian@pm.org> wrote:
:>
:> : * 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.
:>
:> These statements are incredibly arrogant since they are likely not based on
:> fact, regardless of how true they might be.
: are you asserting that fact and truth are not the same? keep reading
: and you wll find them based on fact - at least as factual that it
: ever gets in this world.
No, what I was saying was that even if it turned our that you were correct,
it could easily be that you were correct ** in spite ** of the the poor
logic that you used to get to your conclusion. Sometimes you just get lucky.
:> If, Brian D. Foy, (correct capitalization and punctuation not accidental),
: that's a pretty pathetic troll, but does realize a certain,
: hostile bias ;) i leave it to HFB to chastise you.
You're right. I was quite angry at the rough treatment that you had handed
the original poster.
:> you know these statements to be true because you have worked with him AND
:> know what he charges, then I retract the above statement and humbly apologize.
: i have enough experience to know that i can say both of
: those with a high degree of confidence. he explicity stated
: that it took him 16 hours. i would estimate that it would
: take me four.
Then you should also know that he didn't give you enough information for
a very good estimate. He might be a particularly understated individual
and the project could easily be 4 times as complex as you had originally
surmised.
So what's my point? If you gave him an idea of what you'd have charged based
on the 4 hour estimate that you made, and others did as well (as I did via
e-mail) then he could have gotten some useful data to help him decide if what
he felt he needed to charge was reasonably correct.
: that's to be expected since i've been doing
: this a lot longer than he has. he also explicitly stated
: that he is a newbie and that he spent a lot of his time
: debugging and head-scratching. having already made many
: similar systems, my time spent in debugging and
: head-scratchng would be much less. again, this is to be
: expected since i've been doing it a lot longer than he has.
You're now assuming that his newbie experience was similar to yours. A lot
of head-scratching to him might vary wildly with what you'd call a lot of
head-scratching.
: furthermore, i know where my rates stand in relationship to
: the industry average and to the industry average for graphic
: designers, which he says he is. my rates are higher by a
: large multiplier. this has nothing to do with personal
: wealth and almost everything to do with the high rent for
: Manhattan office space and the salary i need to pay support
: employees and the tax i have to pay the IRS for them and ...
You did what bothered me in your first post again in these paragraphs.
You stated very clearly flawed logic in assuming that his ability and
his rates of pay could somehow be determined by metrics that you do not
know and cannot know unless you have spent considerable time getting to
know him.
You believe what you said was factual because you compared yourself to
averages. When you did that you made the mistake that statistics are only
valid in a body of sample data, and cannot be applied to a specific case.
I assure you that graphic designer rates vary enormously, as much as rates
for Perl programmers. You cannot know what he's worth by using averages.
Similarly, you cannot know how your rates compare to his by using averages.
: perhaps you are ready to "retract the above statement and humbly
: apologize" since they are based on information that was publically
: posted? you might want to read the original post.
I certainly retract the troll on your lowercase and punctuation fetish.
It was stupid. I hope, however, that we don't end up calling you "The
"The person formerly known as brian d foy" after you've changed your name,
offically, to some symbol, or perhaps to shorten it to much simpler "brian".
Of course, if you do, perhaps the original poster can create a visually
appealing design for you! :-)
-- Tom Mornini
-- InfoMania
------------------------------
Date: Tue, 10 Aug 1999 12:45:45 -0700
From: Max Pinton <max@maxgraphic.com>
Subject: Re: pricing a perl job
Message-Id: <100819991245455752%max@maxgraphic.com>
In article <brian-ya02408000R1008990024270001@news.panix.com>, brian d
foy <brian@pm.org> wrote:
> ...
> 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:
> ...
Ah, at last! That wasn't so hard, was it? Now, try to wrap your mind
around the concept that there are people in this group that are more
nearly in my position than you are. They could supply even more
accurate and useful information, and have, in fact, done so in e-mail.
So, despite your efforts, I do have what I came for: a rough idea of
what to charge for the work I've done. Feel free to return to flaming
other posters you don't feel are worthy of answers to their simple
questions.
------------------------------
Date: Tue, 10 Aug 1999 16:23:40 -0400
From: brian@pm.org (brian d foy)
Subject: Re: pricing a perl job
Message-Id: <brian-ya02408000R1008991623400001@news.panix.com>
In article <7opuom$hla@dfw-ixnews5.ix.netcom.com>, Tom Mornini <tmornini@netcom9.netcom.com> posted:
> You did what bothered me in your first post again in these paragraphs.
> You stated very clearly flawed logic in assuming that his ability and
> his rates of pay could somehow be determined by metrics that you do not
> know and cannot know unless you have spent considerable time getting to
> know him.
you have yet to define logic. you need to define your operational
terms. remember that there is not one, absolute logic. business is
not a circuit board. you think my logic is flawed, but you don't
even know what logic i used or all of the information that went into
my thinking. you assume too much about my assumptions and make
connections that just aren't there.
just say you don't like what i said and leave it at that. your opinion
is noted and i'm properly chastised for talking business to the wrong
crowd. you don't have to agree with me, and we don't both have to Right,
but you have to recognize there are other ways of thinking than your
own.
if you want to keep hounding me, let's take it to email.
--
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: Tue, 10 Aug 1999 15:45:33 -0500
From: "soraya" <soraya@iwl.net>
Subject: Problem between perl 5.00503 and perl 5.00405
Message-Id: <rr13damskrl73@corp.supernews.com>
Hi all,
I developed some scripts to use as CGI's on a page. They work 100%
correctly on my machine
locally, referring to a RH 6.0 5.00503 setup, but when I load on the ISP
server, they quit working.
The script is relatively simple. It basically checks username / passwd and
if they are correct, it will
show them a dynamically created page, if not, it will say login denied, and
give them another chance.
Some code looks like this :
#!/usr/bin/perl
my $FORM_DATA,;
my %MYDATA;
<snipping out my parsing as 99% of you already know how that looks like>
#or if there is no 'USER' passed up, display this form to get the login.
if (!($MYDATA{'USER'})) {
print <<EOF;
Content-Type: text/html
<html><head><title>login</title><body><form method=POST
action=/cgi-bin/login.cgi>Username:   </font><input name="USER"
type=text size=23 maxlength=23><br><br>
Password:   </font><input name="PASS" type=password size=23
maxlength=23><br><br>    <INPUT TYPE="SUBMIT"
value="Login"> </font><br></form> </body></html>
EOF
}
else {
if (good_word($MYDATA{'USER'},$MYDATA{'PASS'})) {
#print out the gui goodness they want IF they authenticate
}
else {
# there was a bad passswd, tell them that, re-display the login form ..
}
###the above takes care of the HTML, all this works fine, the sub good_word
is where I have problems:
### it opens file, ascii mode, 1.doc, the format is user\npass\nuser\npass
etc.
sub good_word {
open (WORDLIST, "1.doc") || die "cant open file";
while ($name = <WORDLIST>) {
chomp($name);
$word = <WORDLIST>;
chomp ($word);
$words{$name} = $word; }
close (WORDLIST) || die "cant close file $!";
my($somename,$someguess) = @_;
$somename=~s/\W.*//;
$somename=~tr/A-Z/a-z/;
### HERE is the problem..
if (($words{$somename} | |"123") eq $someguess) {
return 1;
} else {
return 0;
}
}
now, when I go to run this on my box, everything runs perfectly. When I
run it on my ISP box, it
will always say denied (unless I supply general all purpose passwd, 123)..
If I try to
print $words{$somename}; it shows nothing in there? What am I missing?
Why is not there?
Thanks in advance,
Chad Dixon
------------------------------
Date: Tue, 10 Aug 1999 13:15:32 -0600
From: "Linux GNUBEE" <dchurch@kabana.net>
Subject: Simple Perl Parsing?
Message-Id: <7optnf$2ov$1@macaw.cyberport.com>
Could someone please show me how to grab ONLY certain text from a string,
such as the following:
my $line = "fasdjfhkdfhaksdfhSTARThello worldENDaskjkdfljkdfjls";
How can I parse out only the text between the two tags, including the tags
in their respective positions within the string. In other words, I want
toend up with
STARThello worldEND
Thanks.
dan :)
------------------------------
Date: 10 Aug 1999 20:45:04 GMT
From: mdz4c@node2.unix.Virginia.EDU (Matthew David Zimmerman)
Subject: Re: Simple Perl Parsing?
Message-Id: <7oq30g$1mt$1@murdoch.acc.Virginia.EDU>
In article <7optnf$2ov$1@macaw.cyberport.com>,
Linux GNUBEE <dchurch@kabana.net> wrote:
>my $line = "fasdjfhkdfhaksdfhSTARThello worldENDaskjkdfljkdfjls";
>
>How can I parse out only the text between the two tags, including the tags
>in their respective positions within the string.
$line =~ /(START.*?END)/;
print $1;
type "perldoc perlre" for more info.
HTH! Matt
--
Matthew Zimmerman ------------ http://www.people.virginia.edu/~mdz4c
Interdisciplinary Biophysics Program --------- University of Virginia
| "You got to be very careful if you don't know where you're going, |
| because you might not get there." -- Yogi Berra |
------------------------------
Date: Tue, 10 Aug 1999 20:29:53 GMT
From: marcza@my-deja.com
Subject: Some (tricky?) regexp questions
Message-Id: <7oq23i$teh$1@nnrp1.deja.com>
1.) Assume the follwing lines:
X 1999 blubb...
X 1999/2000 blubb...
X blubb...
How do I match only those lines which have a 4-digit year or a
4-digit-year-slash-4-digit-year on second position (delimited by
space(s)) AND put the result in a $1 variable ? The following doesn't
work:
if ($var =~ /^S ([0-9]{4}{\/[0-9]{4}}{0,1})/) {
... matched
if ($var =~ /^S ([0-9]{4}||[0-9]{4}\/[0-9]{4})/) {
... matched
2.) Assume the follwing lines:
X sdhsdfh F one two three ...
X asgsg W one two three ...
X blubb C one two three ...
How do I match only those lines which have a F or W on third position
position (delimited by space(s)) AND put the result in a $2 variable
and the rest (trailer) into $3 ? The following doesn't work:
if ($var =~ /^X ([_a-zA-Z0-9]) +([FW]) +([_a-zA-Z0-9]*)/) {
...matched
Bye
Marcus
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 10 Aug 1999 14:04:19 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Sorting Backwards
Message-Id: <37B093D3.EC00FCDC@mail.cor.epa.gov>
bj wrote:
[snip of lamer and most of bj's reply]
> It is not the fault of the responders that you did not frame your
> question appropriately. Psi::ESP is not a widely distributed module.
That's the PSI::ESP module, which is still in alpha, although
commonly used in this newsgroup. Remember, Perl is
case-sensitive. :-)
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Tue, 10 Aug 1999 12:39:25 -0700
From: Makarand Kulkarni <makkulka@cisco.REMOVETHIS.com>
Subject: Re: Sorting by mid-record without splitting?
Message-Id: <37B07FED.3E1AC750@cisco.REMOVETHIS.com>
[
Effie Rover wrote:
> I have a database, pipe-delimited...etc..
> I already know how to split records, pull fields and either build a
> hash or another array with the key field in front for sorting. Isn't
> there a Perl construct to sort these without splitting?
]
-
I don't think there is any such method unless in the special
case where your pipe separated fields were of the same length
in the database. In this special case you could have used
substr() to 'isolate' the field you want to sort on.
--
------------------------------
Date: 10 Aug 1999 16:19:14 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: spelling of foobar (was Re: Reading the Online Documentation?)
Message-Id: <x7672nbd8d.fsf_-_@home.sysarch.com>
>>>>> "PI" == Peter Icaza <picaza@chsi.com> writes:
PI> even as a nubie, (yes i spell foobar as fubar also), i see
that was one of its original spellings from ww2. it meant fucked/fouled
up beyond all repair/recognition.
i once read great history of the term foo and its cousins including other
name holders from around the world. does anyone know the link?
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: Tue, 10 Aug 1999 16:29:05 -0400
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: Re: spelling of foobar (was Re: Reading the Online Documentation?)
Message-Id: <37B08B35.58916CC@chaos.wustl.edu>
Uri Guttman wrote:
> i once read great history of the term foo and its cousins including other
> name holders from around the world. does anyone know the link?
Metasyntactic variable :)
http://www.netmeg.net/jargon/terms/m/metasyntactic_variable.html
e.
------------------------------
Date: 10 Aug 1999 15:47:34 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: suggestions for CRAP
Message-Id: <x7emhbbep5.fsf@home.sysarch.com>
>>>>> "W" == Who <qwerty@post.utfors.se> writes:
W> All perlmodules are removed(in 99 cases of 100) from webhotels.
W> You are then forced to write code like that, or it'll fail.
so who cares about crap web hosts?
<snip of all of my post>
hey, dr. where-is-your-brain, ever heard about the delete key?
W> $sdf=`whereis grep`; saves the loop..
which makes it even more unportable. good one. in fact why use the grep
program at all?
<snip of all of my post>
if i killfiled, you would be first. 2 lines of comment in 130+ lines of
quote.
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: 10 Aug 1999 15:50:31 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: suggestions for CRAP
Message-Id: <x7btcfbek8.fsf@home.sysarch.com>
>>>>> "TB" == Tom Briles <sariq@texas.net> writes:
TB> Uri Guttman wrote:
>>
>> maybe we should form a little project to create a web site with quality
>> cgi (and other) scripts. if tom can raise support for the power tools
>> project, this should be doable too. then we can finally direct folks to
>> examples of cgi code we can be proud of. this crap is embarrassing to
>> the perl community.
TB> This is a terrific idea. I would love the opportunity to contribute
TB> code while being under the watchful eye of the Perl gods. What better
TB> way to improve my skills?
i could review more than i can write. it is quicker. i am looking for
use of modules, clean up to date perl code, decent semantic use of perl,
no lousy perl4 style, etc.
dr. nowhere's comment on webhotels not allowing modules is
bogus. modules goooood! roll your own cgi baaaad!
TB> I certainly don't qualify as a reviewer; however, *you* do Uri.
TB> Are you volunteering?
possibly. let's see where this goes.
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: Tue, 10 Aug 1999 13:16:05 -0400
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: turn $6 into $6000
Message-Id: <x3yr9lb7e0a.fsf@tigre.matrox.com>
Elaine -HFB- Ashton <elaine@chaos.wustl.edu> writes:
> Uri Guttman wrote:
> > print $money ;
> >
> > i have always wanted to print money.
>
> Well, you always could...as long as you weren't counterfeiting US
> currency which would grab the attention of the Secret Service. :)
Hmmm .. so Canadian money is ok to counterfeit?
Ala
------------------------------
Date: 10 Aug 1999 15:53:56 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: turn $6 into $6000
Message-Id: <x7907jbeej.fsf@home.sysarch.com>
>>>>> "AQ" == Ala Qumsieh <aqumsieh@matrox.com> writes:
AQ> Elaine -HFB- Ashton <elaine@chaos.wustl.edu> writes:
>> Uri Guttman wrote:
>> > print $money ;
>> >
>> > i have always wanted to print money.
>>
>> Well, you always could...as long as you weren't counterfeiting US
>> currency which would grab the attention of the Secret Service. :)
AQ> Hmmm .. so Canadian money is ok to counterfeit?
sure. it is worth the same as monpoly money. and remember, we are at war
with canada (see the south park movie) so counterfeiting their money is
patriotic.
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: 10 Aug 1999 19:07:19 GMT
From: mgm@unpkhswm04.bscc.bls.com (Mitchell Morris)
Subject: Re: Why use Perl when we've got Python?!
Message-Id: <slrn7r0u37.n5o.mgm@unpkhswm04.bscc.bls.com>
In article <37AAFAD1.A032765B@NOSPAM.strs.co.uk>, Ian Clarke wrote:
>I know this sounds like flame-bait, but I am genuinely curious as to
>what Perl might have to offer that Python doesn't.
[snip]
As much as I hate to throw an accelerant on the fire, I have to weigh in with
my belief that the Perl docs and "perldoc" have a greater impact on general
problem solving than any amount of syntactic sugar and/or data structure
expressiveness. The Python docs, lovely as they are, are only searchable with
the pitiful tools that Netscape sees fit to grant me and I hate them. The
Perl docs (as shipped in the default install) are copious, searchable, and on
my local disk. "perldoc" usually approximates the still-alpha ESP::DWIM
module often enough that I haven't had to curse it in quite a while, and it
display acceptable performance (IMO).
A close second is CPAN.pm and the website that backs it. Starship.python.net
et al are pretty full of Python-y goodness, but it is often the case you have
to wander far afield to search all the places where Python modules might live
to assure yourself that you've found your full field of candidates.
Sometimes, of course, you have to really wander about just to assure yourself
that no one else has written the module you want.
All that said, I really wish that nested structures in Perl were as simple to
read and write as Python's. I can write $hash{$key}->[0] as well as the next
guy, but damnit I don't really want to be managing the references myself.
+Mitchell
--
Mitchell Morris
The purpose of most computer languages is to lengthen your resume by
a word and a comma.
------------------------------
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 450
*************************************