[12992] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 402 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 6 11:07:22 1999

Date: Fri, 6 Aug 1999 08:05:13 -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           Fri, 6 Aug 1999     Volume: 9 Number: 402

Today's topics:
        another question: quoting strings that already need to  chrisman81@my-deja.com
        Beginners question: printf %s justification <akelingos@petrosys-usa.com>
    Re: Beginners question: printf %s justification (Greg Bacon)
        build search engine kevincal@my-deja.com
    Re: build search engine (Andreas Fehr)
        CGI to post to newsgroups webmaster@edps.net
    Re: CGI to post to newsgroups (Andreas Fehr)
    Re: CGI to post to newsgroups (Abigail)
    Re: CGI to post to newsgroups (brian d foy)
    Re: CGI to post to newsgroups (Greg Bacon)
        Code management question. <serguei.goumeniouk@midwal.ca>
    Re: Code management question. (Greg Bacon)
    Re: Complex data structure (Larry Rosler)
    Re: Complex data structure (Greg Bacon)
        How to determine data-type? <peter.doyle@ireland.sun.com>
    Re: How to find out if file is open? (Abigail)
    Re: I guess this is a Misc question: Cgi-bin <flavell@mail.cern.ch>
    Re: I guess this is a Misc question: Cgi-bin (Abigail)
    Re: Is there any books on DBI? (brian d foy)
    Re: Nastiness contrary to the spirit of perl? (I R A Darth Aggie)
    Re: Nastiness contrary to the spirit of perl? (I R A Darth Aggie)
    Re: Nastiness contrary to the spirit of perl? (Calum I Mac Leod)
    Re: Nastiness contrary to the spirit of perl? (Greg Bacon)
    Re: NE Deprecated? (I R A Darth Aggie)
        New to Perl - Question About RegExpr <dbattams@canada.com>
    Re: Question about hashes ? (Abigail)
    Re: Question about hashes ? (Larry Rosler)
    Re: Question about hashes. (Larry Rosler)
    Re: Question about hashing. (Abigail)
    Re: Reading a file into array PERL NEWBIE (Skyrockets)
        smrsh and Perl Script: unknown mailer error 13 <bruce.w.mohler@cpmx.saic.com>
        Sorting arrays in perl <Nick@ucecom.com>
    Re: Sorting arrays in perl (Andreas Fehr)
        storing data that is read in in an external file chrisman81@my-deja.com
    Re: Turning off cashing from Perl??? (Dan Wilga)
    Re: Unexplainable Problem (Greg Bacon)
    Re: Web Startup Seeks Help, Programmer (Skyrockets)
    Re: Why is it.... [REPOST] (I R A Darth Aggie)
    Re: Why is it.... [REPOST] (Abigail)
    Re: Why is it.... [REPOST] (Greg Bacon)
    Re: Windows NT + Perl <Nick@ucecom.com>
    Re: Windows NT + Perl (Andreas Fehr)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Fri, 06 Aug 1999 14:49:20 GMT
From: chrisman81@my-deja.com
Subject: another question: quoting strings that already need to be in quotes for a system call.
Message-Id: <7oeslb$95s$1@nnrp1.deja.com>

how can i quote a variable inside a system call, which alread has to be
in quotes?
This is what I have:

system("grep $name $location >file");

I want to quote $name because the vaiable has spaces in it.

Thanks


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 06 Aug 1999 14:54:12 GMT
From: "Alec Kelingos" <akelingos@petrosys-usa.com>
Subject: Beginners question: printf %s justification
Message-Id: <01bee01c$265eb680$0664a8c0@psusa6.petrosys-usa.com>

Why are my string variables being written to a file as right justified when
using the %s format specifier?  How can I force the fields to be left
justified?

The following script:

#!/usr/local/bin/perl5004 -w
$string = 'some data';
open(myFile, ">file.dat") or die "can't open file: $!\n";
printf (myFile "start record:%14s\n", $string);


produces the following file:

start record:     some data



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

Date: 6 Aug 1999 15:05:08 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Beginners question: printf %s justification
Message-Id: <7oetj4$nlt$8@info2.uah.edu>

In article <01bee01c$265eb680$0664a8c0@psusa6.petrosys-usa.com>,
	"Alec Kelingos" <akelingos@petrosys-usa.com> writes:
: Why are my string variables being written to a file as right justified
: when using the %s format specifier?  How can I force the fields to be
: left justified?

Well, if you had, oh, I don't know, actually read the documentation on
printf(), it would have cross-referenced you to the sprintf()
documentation which would have given you your answer.

Reading the manual is so much faster than waiting for Usenet followups.

Greg
-- 
Playing chess is a software problem, but you still need a mighty powerful
computer to do it in a reasonable amount of time. 
    -- Gordon E. Moore


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

Date: Fri, 06 Aug 1999 14:02:22 GMT
From: kevincal@my-deja.com
Subject: build search engine
Message-Id: <7oept7$709$1@nnrp1.deja.com>

I'm looking for an off-the-shelf indexing solution to index about 1,500-
100,000 html pages on about 100+ different systems.  I want to look at
both shareware and commercial solutions to run on a LINUX platform.
I've been playing with HARVEST but I don't know if thats outdated.

Can someone give me a list (and ranking) of whats out there?

Thanks!

-Kevin


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 06 Aug 1999 14:14:40 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: build search engine
Message-Id: <37aaed9a.32035043@news.uniplus.ch>

On Fri, 06 Aug 1999 14:02:22 GMT, kevincal@my-deja.com wrote:

>I'm looking for an off-the-shelf indexing solution to index about 1,500-
>100,000 html pages on about 100+ different systems.  I want to look at
>both shareware and commercial solutions to run on a LINUX platform.
>I've been playing with HARVEST but I don't know if thats outdated.
>

Hmmm, try

perldoc -q engine
No documentation for perl FAQ keyword `engine' found

perldoc -f engine
No documentation for perl function `engine' found

Sorry, doesn't look like a Perl question.

Andreas


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

Date: Fri, 06 Aug 1999 14:08:00 GMT
From: webmaster@edps.net
Subject: CGI to post to newsgroups
Message-Id: <7oeq7o$7b2$1@nnrp1.deja.com>

I'm looking for a script to post to newsgroups. Any help will be much
appreciated.

Ted


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 06 Aug 1999 14:28:19 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: CGI to post to newsgroups
Message-Id: <37aaf0c6.32846530@news.uniplus.ch>

On Fri, 06 Aug 1999 14:08:00 GMT, webmaster@edps.net wrote:

>I'm looking for a script to post to newsgroups. Any help will be much
>appreciated.

No free help for spammers.

But try Net::NNTP


Andreas


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

Date: 6 Aug 1999 09:29:49 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: CGI to post to newsgroups
Message-Id: <slrn7qls9n.8m9.abigail@alexandra.delanet.com>

webmaster@edps.net (webmaster@edps.net) wrote on MMCLXVI September
MCMXCIII in <URL:news:7oeq7o$7b2$1@nnrp1.deja.com>:
"" I'm looking for a script to post to newsgroups. Any help will be much
"" appreciated.


Did you look at the NNTP module?



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: Fri, 06 Aug 1999 10:54:38 -0400
From: brian@pm.org (brian d foy)
Subject: Re: CGI to post to newsgroups
Message-Id: <brian-0608991055220001@rtp-cr45-dhcp-162.cisco.com>

In article <7oeq7o$7b2$1@nnrp1.deja.com>, webmaster@edps.net wrote:

>I'm looking for a script to post to newsgroups. Any help will be much
>appreciated.

there are modules to do this for you.  see http://cpan.perl.org

-- 
brian d foy


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

Date: 6 Aug 1999 14:56:19 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: CGI to post to newsgroups
Message-Id: <7oet2j$nlt$5@info2.uah.edu>

In article <7oeq7o$7b2$1@nnrp1.deja.com>,
	webmaster@edps.net writes:
: I'm looking for a script to post to newsgroups. Any help will be much
: appreciated.

Check out the CGI module and the Net::NNTP module.

Good luck,
Greg
-- 
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny..."
    -- Isaac Asimov


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

Date: Fri, 06 Aug 1999 14:42:40 GMT
From: Serguei Goumeniouk <serguei.goumeniouk@midwal.ca>
Subject: Code management question.
Message-Id: <37AAF319.3976CA04@midwal.ca>

     Dear Experts!
 In C/C++ environment I use the following constructions to select a
program debug printout level:

#define DEBUG 1          <-- here I can change debug level
 ..... codes .......
#if DEBUG > 0
 ..... some codes for debug level 1, 2, 3, 4 and so on ....
#endif
 ..... codes .......
#if DEBUG > 2
 ..... some codes for debug level 3, 4 and so on ....
#endif

This simple set of instructions reduce both a CPU and a program size.
Is it possible to implement something similar in perl?
   Regards,
         Serguei.



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

Date: 6 Aug 1999 15:00:12 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Code management question.
Message-Id: <7oet9s$nlt$7@info2.uah.edu>

In article <37AAF319.3976CA04@midwal.ca>,
	Serguei Goumeniouk <serguei.goumeniouk@midwal.ca> writes:
:      Dear Experts!
:  In C/C++ environment I use the following constructions to select a
: program debug printout level:
: 
: #define DEBUG 1          <-- here I can change debug level
: ..... codes .......

[snip]

: This simple set of instructions reduce both a CPU and a program size.
: Is it possible to implement something similar in perl?

Look for -P in the perlrun manpage.

Greg
-- 
If in your office, you as an intellectual worker were supplied with a
computer display backed up by a computer that was alive for you all day
and was instantly responsive, how much value could you derive from that?
    -- Douglas Engelbart


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

Date: Fri, 6 Aug 1999 07:42:22 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Complex data structure
Message-Id: <MPG.1214942a62975623989de8@nntp.hpl.hp.com>

In article <FG1H1K.EM6@csc.liv.ac.uk> on Fri, 6 Aug 1999 10:27:20 GMT, 
I.J. Garlick <ijg@connect.org.uk> says...
> In article <37AA3351.E522E2E0@dstc.com>,
> Derek Thomson <derek@dstc.com> writes:
> >> >
> >> >       map {print "Code = $_\n"} @{$Codes{$Comp}};
> > 
> > Map in a void context. Why build a list that you're going to throw away?
> 
> I did say some one would take me to task for this one my original post. :-)
> Of course I was throwing away the list, but surely you should be able to
> do this it seams so clean.
> 
> If you can ever call 4 or 5 lines of code compressed into 1 line clean.

             print "Code = $_\n" for @{$Codes{$Comp}};

is shorter and cleaner and won't get you talked about.  :-)

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


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

Date: 6 Aug 1999 14:58:45 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Complex data structure
Message-Id: <7oet75$nlt$6@info2.uah.edu>

In article <MPG.1214942a62975623989de8@nntp.hpl.hp.com>,
	lr@hpl.hp.com (Larry Rosler) writes:
:              print "Code = $_\n" for @{$Codes{$Comp}};
: 
: is shorter and cleaner and won't get you talked about.  :-)

[whispered] Hey, everybody, come look at the CAPITAL LETTERS that this
Larry Rosler guy uses in his variable names. :-)

Greg
-- 
As I stood before the gates I realized that I never want to be as certain
about anything as were the people who built this place. 
    -- Rabbi Sheila Peltz, on her visit to Auschwitz


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

Date: Fri, 06 Aug 1999 15:52:07 +0100
From: Peter Doyle <peter.doyle@ireland.sun.com>
Subject: How to determine data-type?
Message-Id: <37AAF697.95D544EA@ireland.sun.com>

Hi,
 I have a hash containing strings, arrays & hashes.
 How can I determine the type of a particular entry in the hash?
 If I make them scalars & print it tells me something like
comment = another one
search0 = S
display = ARRAY(0x119978)
sort = ARRAY(0x119990)
value0 = ARRAY(0x119a20)
PRINTING trend_obj
product = small
name = test
count0 = HASH(0x1199c0)
type = trend
count1 = HASH(0x109a44)
desc = test

I would like to test for types then call the proper print function which
would print out the arrays as a list, etc.


Thanks for your help,
Peter




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

Date: 6 Aug 1999 09:16:46 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: How to find out if file is open?
Message-Id: <slrn7qlrh8.8m9.abigail@alexandra.delanet.com>

hiwi2krg (hiwi2krg@iitb.fhg.de) wrote on MMCLXVI September MCMXCIII in
<URL:news:7oekpm$mpo$1@news.fhg.de>:
%% Hello World
%% 
%% I'm trying to make a sub that closes files that might be open. All files are
%% NOT necessary open. So I need to know if file is open or not, but the
%% question is how do I know if file is open?
%% (I want to do this on one sub, because I dont want 300 lines of
%% <close(FILE_X)>)
%% 
%% Code is something like this.
%% 
%% open files
%% do something
%% open and close files
%% IF error_occured_somewhere
%%     close_open_files
%%     exit
%% do something
%% end


Just exit, and Perl will close the files for you.



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: Fri, 6 Aug 1999 15:39:06 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: I guess this is a Misc question: Cgi-bin
Message-Id: <Pine.HPP.3.95a.990806153343.17374G-100000@hpplus03.cern.ch>

On Thu, 5 Aug 1999, Ben Quick (AGGTA B.O.D) wrote:

> Could anyone remind me of what my cgi-bin should be chmoded to.

Remind?  _Remind_?  You claiming to have previously known this, yet now
you can neither work it out for yourself nor discover which usenet group
to post to?

This seems to be a question about configuration for a web server under a
certain OS, namely unix.

There is a usenet group comp.infosystems.www.servers.unix
which is about web servers running under unix.

Hence or otherwise deduce... well, you get the drift.

You might also want to review the FAQ about how to compose a meaningful
subject header.  Assuming, of course, that you were hoping to
communicate with helpful usenauts. 

> I have had
> to create my own, therefore I have to chmod it. 755 seems to be the norm,
> but is it different for the bin?

OT answer:  I don't see why it should be different, unless you have some
specific requirement that you haven't mentioned (but not here, please). 
It's what I use. 




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

Date: 6 Aug 1999 09:17:49 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: I guess this is a Misc question: Cgi-bin
Message-Id: <slrn7qlrj7.8m9.abigail@alexandra.delanet.com>

Ben Quick (AGGTA B.O.D) (newsgroup@bigwig.net) wrote on MMCLXV September
MCMXCIII in <URL:news:37aaf0ac.0@news2.cluster1.telinco.net>:
<> Could anyone remind me of what my cgi-bin should be chmoded to. I have had
<> to create my own, therefore I have to chmod it. 755 seems to be the norm,
<> but is it different for the bin?


And your Perl question is?



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: Fri, 06 Aug 1999 10:52:01 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Is there any books on DBI?
Message-Id: <brian-0608991052440001@rtp-cr45-dhcp-162.cisco.com>

In article <37AAA481.8F72BA9E@home.com>, jammin1@home.com wrote:

>Hi, I am new to perl and am wondering if there are any books on DBI or
>information available on the web.

there is a lot of stuff on the web.  see the DBI docs for more info.

there is almost a book for O'Reilly.  look for it RSN.

-- 
brian d foy


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

Date: 6 Aug 1999 13:51:16 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <slrn7qlq6o.8jv.fl_aggie@thepentagon.com>

On 06 Aug 1999 00:07:51 -0600, llornkcor <llornkcor@llornkcor.com>, in
<4sid8mrs.fsf@wind.localdomain> wrote:

+ why is it always, 'well THEY'RE doing it, so we should too'?
+ what is so hard about showing compassion?

Tom has shown a great deal of compassion. He's written much freely
available documentation. You've probably read some of it. I know I
have. You speak of compassion, but that's a two-way street. Where's
the compassion when a newbie skips over the documentation and goes
straight to Usenet?

This is about selfishness, and being the bad lazy.

James


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

Date: 6 Aug 1999 13:54:02 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <slrn7qlqbu.8jv.fl_aggie@thepentagon.com>

On 05 Aug 1999 23:59:51 -0600, llornkcor <llornkcor@llornkcor.com>, in
<7ln98n54.fsf@wind.localdomain> wrote:

+ yes, but its the same people doing it over, and over, and over, and
+ over

Fine. You know who we are. Get a killfile, stick us in it, and be done
with it. And provide that killfile to the newbies, so they can ignore
us, too.

James


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

Date: Fri, 06 Aug 1999 14:25:48 GMT
From: calum@bordernet.co.uk (Calum I Mac Leod)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <37aaee0f.86674443@news.ukgateway.net>

On 6 Aug 1999 13:54:02 GMT, fl_aggie@thepentagon.com (I R A Darth
Aggie) wrote:

>On 05 Aug 1999 23:59:51 -0600, llornkcor <llornkcor@llornkcor.com>, in
><7ln98n54.fsf@wind.localdomain> wrote:
>
>+ yes, but its the same people doing it over, and over, and over, and
>+ over
>
>Fine. You know who we are. Get a killfile, stick us in it, and be done
>with it. And provide that killfile to the newbies, so they can ignore
>us, too.

No!  I'm a Perl newbie and I don't want to killfile the people who
publish the most useful and informative posts.

Without these 'prodigious posters', this newsgroup would largely
consist of people who, rather than entering into disscussion about
Perl, expect others to do their work for them, for free.  Just who is
it around here who has the 'bad attitude'?

All I can say is "Thanks!" to those Perl experts who continue
congregate in this public forum.

Calum - (Just another Perl novice.)
-- 
Calum I Mac Leod
BorderNet Ltd, Scotland
Web-site management


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

Date: 6 Aug 1999 14:40:26 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <7oes4q$nlt$3@info2.uah.edu>

In article <4sid8mrs.fsf@wind.localdomain>,
	llornkcor <llornkcor@llornkcor.com> writes:
: why is it always, 'well THEY'RE doing it, so we should too'?
: what is so hard about showing compassion? Unless you are so wrapped up
: in your elitism, that you have forgotten how it feels.

I challenge you to learn as much about Perl as some of us long-time
posters here have.  Then take it upon yourself to greet every newbie
crying "Gimme! Gimme!" with superlative compassion.  Nothing is
stopping you, so why don't you do it?  The ironic part is that once
you've put the effort into learning a lot about Perl, you will then
understand just how annoying these gimme-gimmes are.

Would you walk up to a martial arts master, ask him how to kick ass,
and then call him uncompassionate because he didn't help you learn
to kick ass in five minutes?

Greg
-- 
>I need to programmatically reboot a Windows NT 4.0 server using Perl.
Any command NT has a certain chance to reboot the machine, hasn't it?
    -- Abigail in <7a01hc$lvb$1@client2.news.psi.net>


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

Date: 6 Aug 1999 13:56:43 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: NE Deprecated?
Message-Id: <slrn7qlqgv.8jv.fl_aggie@thepentagon.com>

On 5 Aug 1999 20:25:20 -0700, Tom Christiansen <tchrist@mox.perl.com>, in
<37aa4790@cs.colorado.edu> wrote:

+ In comp.lang.perl.misc, 
+     Jim Williams <james.p.williams@usahq.unitedspacealliance.com> writes:
+ :Why is NE deprecated?  
+ 
+ Don't tell anybody I told you this, but that's the FORTRAN compatibility
+ mode.

Egad! All this time I spent learning perl, I could have been writing
fortran! Sheesh...

James



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

Date: Fri, 6 Aug 1999 11:02:21 -0400
From: "Derek Battams" <dbattams@canada.com>
Subject: New to Perl - Question About RegExpr
Message-Id: <dLCq3.51125$jl.34214219@newscontent-01.sprint.ca>

I've just started to write CGIs in Perl (I've been writing them in C) and
I've come across the following line in a script that someone else has
written:

$Config{'required'} =~ s/(\s+|\n)?,(\s+|\n)?/,/g;

I realize that this is a regular expression, but here are my questions...

(1) Exactly what does the "=~" operator do?  I've been reading the limited
information that I have found on the Internet, but this has not come up.

(2) Are there any other similar operators like "=~"?  If so, what do they
do?

(3) Where is the best place to learn about regular expressions (how to write
them, etc.)?

Sorry for the silly newbie questions, but your help would be greatly
appreciated.

Thanks,

Derek Battams
--
---------------------------------
Derek Battams,
Gananoque, Ontario, Canada
"Assumption is the root of all disaster!"




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

Date: 6 Aug 1999 09:26:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Question about hashes ?
Message-Id: <slrn7qls2k.8m9.abigail@alexandra.delanet.com>

Scott (codeman@gol.com) wrote on MMCLXVI September MCMXCIII in
<URL:news:7oells$oqf$1@nn-tk001.ocn.ad.jp>:
?? 
?? Id like to write a perl program to
?? handle
?? 
?? A list of teachers who on a certain date who recorded certain averages.


That's four times.


*ploink*


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


  -----------== 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: Fri, 6 Aug 1999 07:46:47 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Question about hashes ?
Message-Id: <MPG.1214953289b1881f989de9@nntp.hpl.hp.com>

In article <7oells$oqf$1@nn-tk001.ocn.ad.jp> on Fri, 6 Aug 1999 21:49:57 
+0900, Scott <codeman@gol.com> says...
> 
> Hi,
> Id like to write a perl program to
> handle
> 
> A list of teachers who on a certain date who recorded certain averages.
> 
> would this be an array of arrays or
> a list of hashes. Im not sure.
> 
> Any advice appreciated.
> 
> I need to update the dates in code and add the averages for each
> teacher on a certain date.
> 
> Scott.
> codeman@gol.com

Posting the same question three times with three different subjects is 
not going to get you any closer to an answer.

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


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

Date: Fri, 6 Aug 1999 07:27:11 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Question about hashes.
Message-Id: <MPG.12149087909b4285989de7@nntp.hpl.hp.com>

In article <slrn7qlppj.8m9.abigail@alexandra.delanet.com> on 6 Aug 1999 
08:47:08 -0500, Abigail <abigail@delanet.com> says...
> Scott (codeman@gol.com) wrote on MMCLXVI September MCMXCIII in
> <URL:news:7oelmu$oql$1@nn-tk001.ocn.ad.jp>:,
> $$ Id like to write a perl program to
> $$ handle
> $$ 
> $$ A list of teachers who on a certain date who recorded certain averages.
> $$ 
> $$ would this be an array of arrays or
> $$ a list of hashes. Im not sure.
> 
> This is way to vague to answer it. It all depends what you want to do.
> You need to be much, much more specific. Or even better. Just start
> writing your code. Often, the appropriate datastructure automagically.

                     Often, the appropriate verb automagically also.

But this is excellent advice, contrary to the formalist Object Oriented 
Analysis and Design cant.  Very much in the spirit of Perl, I think.  
Build something and see what happens.

This is the middle-out approach:  neither top-down nor bottom-up, either 
of which may require too-early commitment to a data structure.  It works 
for me! 

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


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

Date: 6 Aug 1999 09:23:26 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Question about hashing.
Message-Id: <slrn7qlrto.8m9.abigail@alexandra.delanet.com>

Scott (codeman@gol.com) wrote on MMCLXVI September MCMXCIII in
<URL:news:7oem3j$ose$1@nn-tk001.ocn.ad.jp>:
** Hi,
** Id like to write a perl program to
** handle
** 
** A list of teachers who on a certain date who recorded certain averages.


Do you really think posting your question multiple times, using
multiple subject lines is going to win you any friends?


Don't do that!



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== 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: Fri, 06 Aug 1999 14:35:26 GMT
From: Starland@Vocalband.com (Skyrockets)
Subject: Re: Reading a file into array PERL NEWBIE
Message-Id: <37baf23a.209888240@news.giganews.com>

On Thu, 05 Aug 1999 10:05:05 -0800, eric@thejensens.com (Eric Jensen)
wrote:

>I am having trouble reading a file of CSV email addresses into an array.
>
>I am opening the file...but unsure of how to read the file up to a comma
>(',') and place the information prior to the comma into an array slot.
>
>Any suggestions accepted.
>
>Eric
>eric@thejensens.com

I'm a newbie too. basically I think it would involve using the split
function and a foreach loop. I can't recall all the specific details
offhand, but this kind of thing is a very basic part of perl/cgi
programming.



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

Date: Fri, 06 Aug 1999 07:51:31 -0700
From: Bruce Mohler <bruce.w.mohler@cpmx.saic.com>
Subject: smrsh and Perl Script: unknown mailer error 13
Message-Id: <37AAF673.D220B844@cpmx.saic.com>

Greetings!

I'm running Red Hat Linux 6.0 which seems to be running sendmail
v8.9.3 which was built with support for smrsh.                  

I need to have an account receive e-mail and pipe it to a Perl
script for processing.  This worked fine on a RH Linux 5.1    
system which was not configured for smrsh.                    

The .forward file in the account's home directory looks like this:

        |/home/xyz/incoming.pl

The permissions on the .forward file are 0600.

The script resides in the home directory of account "xyz" with
permissions 0755.

The smrsh binary directory is /etc/smrsh and there is a symbolic
from the /etc/smrsh directory to the Perl script in the account's
home directory.

        ln -s /home/xyz/incoming.pl /etc/smrsh/incoming.pl

Each time that I send e-mail to the "xyz" account on the system,
the maillog reports "unknown mailer error 13".                  

I did restart sendmail after creating the link in /etc/smrsh.

I checked the Costales/Allman sendmail book 2nd ed., but the one
reference in the index (p. 502) was not terribly enlightening.  
The majordomo FAQ suggested looking at errno.h to find out what 
the significance of "13" is and I finally found the <asm/errno.h>
which says that it's EACCES "Permission denied".                 

Any suggestions?  I'm at a loss.  I must be doing something stupid.
I'd like to find out what it is so that I can stop it and move     
onto the next one...

Bruce

-- 
Bruce W. Mohler                858-826-2675 (voice)
SAIC/ITS/Server Support        858-826-7806 (fax)
Sr UNIX system administrator   888-781-5697 (pager)
                               mailto:bruce.w.mohler@saic.com
Of course my password is the same as my pet's name. 
My dog's name is pit5%dept, but I change it every 90 days.


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

Date: Fri, 6 Aug 1999 15:04:14 +0100
From: "Nick Liebmann" <Nick@ucecom.com>
Subject: Sorting arrays in perl
Message-Id: <7oequ8$b7n$1@nclient7-gui.server.ntli.net>

I am trying to create a high score table which dynamically sorts iteslf when
a new score is posted. I have no trouble in  splitting the information, but
thew first values of the array needs to be sorted.

($totsecs, $stormins, $storsecs, $storname, $stormail) = split  /,/;

$totsecs is the key to the array and it is this that I would like to sort.
Does anyone have any ideas of how it can be sorted?

#@sorted = ($totsecs, $stormins, $storsecs, $storname, $stormail);
#{
#$totsecs{$a} <=> $totsecs{$b}
#}
This is one of my attempts to get it to work... ANy Ideas?

Nick





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

Date: Fri, 06 Aug 1999 14:37:58 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Sorting arrays in perl
Message-Id: <37aaf310.33433014@news.uniplus.ch>

On Fri, 6 Aug 1999 15:04:14 +0100, "Nick Liebmann" <Nick@ucecom.com>
wrote:

>$totsecs is the key to the array and it is this that I would like to sort.
>Does anyone have any ideas of how it can be sorted?

You have an example on your computer:

perldoc -f sort

Andreas


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

Date: Fri, 06 Aug 1999 14:47:23 GMT
From: chrisman81@my-deja.com
Subject: storing data that is read in in an external file
Message-Id: <7oeshm$94u$1@nnrp1.deja.com>

I want to open a file, read in all records from the file, and match
cases, printing true returns to an external file.  Also, I have many
records, each with many fields.  How can I make it so that new records
are only recognized when there is a return character, or is that already
default?


#!/usr/local/bin/perl -w
open(FILE "/path/file");
while(<FILE>) {
        if(/match_this_expression/) {
            what do i need here to print matched cases to an external
          file?;
        }
}

Thanks


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 06 Aug 1999 10:06:04 -0400
From: dwilgaREMOVE@mtholyoke.edu (Dan Wilga)
Subject: Re: Turning off cashing from Perl???
Message-Id: <dwilgaREMOVE-0608991006050001@wilga.mtholyoke.edu>

In article <Pine.HPP.3.95a.990805204653.3617A-100000@hpplus03.cern.ch>,
"Alan J. Flavell" <flavell@mail.cern.ch> wrote:

> The "Pragma: no-cache" header is defined to be a request from a
> _client_, made towards a server (via any proxies that may be on the
> way).
> 
> Its usage from a server towards a client is, shall we say, at best "ad
> hoc".

Section 10.12 of RFC 1945 only briefly mentions no-cache, and while it is
only talked about in terms of a client request, the implication is that it
could be used in a response as well. In many other cases, where an aspect
of the protocol is to be used only in one direction, this is stated
explicitly. Here, it is left open.

Perhaps it is ad hoc, but it is nonetheless followed by both Netscape and
IE. The user asked how to achieve a given result, and this method works
for as large a percentage of the time as any other. In a similar vein, if
it weren't for browser manufacturers creating their own extensions to
HTML, we wouldn't have a lot of the features that are in browsers today.
Whether this is good or bad from a philosophical point of view is not
relevant for me. I write code that has to work with the browsers that do
exist, not the ones that I wish existed.

Dan Wilga          dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply  **


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

Date: 6 Aug 1999 14:32:34 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Unexplainable Problem
Message-Id: <7oerm2$nlt$2@info2.uah.edu>

In article <slrn7qkjs0.uij.abigail@alexandra.delanet.com>,
	abigail@delanet.com (Abigail) writes:
: (/usr/sbin/sendmail, it's that a weird place?)

    [9:30] ettsn% ls /usr/lib/sendmail /usr/sbin/sendmail
    ls: /usr/lib/sendmail: No such file or directory
    /usr/sbin/sendmail
    [9:31] ettsn% uname -s
    FreeBSD

Greg
-- 
The sight of the child emerging is something you shouldn't miss, but don't
look when they administer the epidural or the episiotomy. Never look at an
episiotomy. 
    -- Garrison Keillor


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

Date: Fri, 06 Aug 1999 14:19:06 GMT
From: Starland@Vocalband.com (Skyrockets)
Subject: Re: Web Startup Seeks Help, Programmer
Message-Id: <37b8ee2e.208852147@news.giganews.com>

On Wed, 04 Aug 1999 01:45:30 GMT, Dave <bisonman@optonline.net> wrote:

>          What's missing? An expert programmer (HTML, JAVA, CGI, SQL...)
>who is like us: young, driven, and willing to go the extra mile to make
>our dream into a reality.
>
>          We're looking for an adventurous (and NYC-area based) soul who
>would be willing to provide expertise in exchange for equity. Each
>member of the team has pledged the same.  Our previous programmer turned
>out to be a dud, and we need help quick!!!

You can forget about getting an expert programmer for "equity."
There are plenty of high *paying* jobs for expert programmers.



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

Date: 6 Aug 1999 14:00:26 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: Why is it.... [REPOST]
Message-Id: <slrn7qlqnu.8jv.fl_aggie@thepentagon.com>

On 5 Aug 1999 23:04:00 -0500, Abigail <abigail@delanet.com>, in
<slrn7qknk8.uij.abigail@alexandra.delanet.com> wrote:

+ Brain surgery and controlling air traffic are just jobs, yes. Although
+ it might take the better part of a decade studying, before you can do
+ your job.  A brain surgeon doesn't have "the gift". It's years of _hard
+ work_.

And if you can't keep your hands steady?

James


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

Date: 6 Aug 1999 09:27:32 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Why is it.... [REPOST]
Message-Id: <slrn7qls5e.8m9.abigail@alexandra.delanet.com>

I R A Darth Aggie (fl_aggie@thepentagon.com) wrote on MMCLXVI September
MCMXCIII in <URL:news:slrn7qlqnu.8jv.fl_aggie@thepentagon.com>:
@@ On 5 Aug 1999 23:04:00 -0500, Abigail <abigail@delanet.com>, in
@@ <slrn7qknk8.uij.abigail@alexandra.delanet.com> wrote:
@@ 
@@ + Brain surgery and controlling air traffic are just jobs, yes. Although
@@ + it might take the better part of a decade studying, before you can do
@@ + your job.  A brain surgeon doesn't have "the gift". It's years of _hard
@@ + work_.
@@ 
@@ And if you can't keep your hands steady?


Then you become an air traffic controller instead.... ;-)



Abigail
-- 
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
                                      print } sub __PACKAGE__ { &
                                      print (     __PACKAGE__)} &
                                                  __PACKAGE__
                                            (                )


  -----------== 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: 6 Aug 1999 14:53:13 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Why is it.... [REPOST]
Message-Id: <7oessp$nlt$4@info2.uah.edu>

The ability to quote is a serviceable substitute for wit. 
    -- Maugham

Greg :-)
-- 
Scope keeps symbol tables minty fresh.
    -- DrForr


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

Date: Fri, 6 Aug 1999 15:22:51 +0100
From: "Nick Liebmann" <Nick@ucecom.com>
Subject: Re: Windows NT + Perl
Message-Id: <7oes14$bf0$1@nclient7-gui.server.ntli.net>

You can only run perl if your workstation has been configured as an internal
web server. I came across this problem but have rectified. You need to get
this:

MS NT Option Pack 4  ---download from http://www.microsoft.com
and install personal web server.

Then it should run with no probs on your machine

Nick


Flash Fire <flash_fire@email.msn.com> wrote in message
news:#Ve9iz33#GA.472@cpmsnbbsa02...
> I am trying to get this script written for Perl to work on NT
> I changed the first line of the script to
> #!C:\Perl\Perl
> can anyone tell me what the default directory for perl is on a nt machine
> I installed perl to C:\Perl
> but changing the first line didn't seem to work
> My System Admin says the cgi-bin is set to execute but when i try to use
the
> script from the webpage I have setup I get the following
>
> The page cannot be displayed
> The page you are looking for is currently unavailable. The Web site might
be
> experiencing technical difficulties, or you may need to adjust your
browser
> settings.
>
> What exactly does this error mean.
> Is there something wrong with my script or are the permissions on the
> cgi-bin directory setup wrong?
>
> Someone please help me
>
> Thankyou,
> Wilderop
>
>
>




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

Date: Fri, 06 Aug 1999 15:01:38 GMT
From: backwards.saerdna@srm.hc (Andreas Fehr)
Subject: Re: Windows NT + Perl
Message-Id: <37aaf7d0.34649072@news.uniplus.ch>

On Fri, 6 Aug 1999 15:22:51 +0100, "Nick Liebmann" <Nick@ucecom.com>
wrote:

>You can only run perl if your workstation has been configured as an internal
>web server. I came across this problem but have rectified. You need to get
>this:
>
>MS NT Option Pack 4  ---download from http://www.microsoft.com
>and install personal web server.
>
>Then it should run with no probs on your machine

Oops, don't tell this to my computer. Otherwhise it fill
stop executing my Perl scripts.

You do _not_ need Option Packs to run cgis written in Perl!
Try Apache at www.apache.org.

Next time M$ will tell you we need Word to write E-Mails.

Andreas


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

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". 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 V9 Issue 402
*************************************


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