[24737] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6892 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 20 14:06:03 2004

Date: Fri, 20 Aug 2004 11:05:09 -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, 20 Aug 2004     Volume: 10 Number: 6892

Today's topics:
    Re: Any YahooPop/fetchyahoo Like For NNTP on Google? <arne@luras.nu>
    Re: Any YahooPop/fetchyahoo Like For NNTP on Google? <curmudgeon@senilityis.us>
    Re: Earthquake forecasting program   Aug. 16, 2004 (Oriel36)
    Re: Earthquake forecasting program   Aug. 16, 2004 (Randal L. Schwartz)
    Re: editing perl script through TEXTAREA ctcgag@hotmail.com
    Re: Extract same text from file. (Ryan Keeling)
    Re: File::Find question. (Steve P)
    Re: File::Find question. <miknrene@drizzle.com>
    Re: How to upload a file from a local pc to  a web serv (srini)
    Re: How to upload a file from a local pc to  a web serv ctcgag@hotmail.com
        Net::Daemon install question <driscoll@triustc.com>
    Re: Net::Daemon install question (Anno Siegel)
    Re: no re 'eval' not secure enough <nobull@mail.com>
    Re: Operator for presence of value in list? <nobull@mail.com>
    Re: perl interpreter automatically exit windows so how  <ithinkiam@gmail.com>
    Re: perl interpreter automatically exit windows so how  (Greg Bacon)
    Re: Processing Qmail Smtp Session Log <noreply@gunnar.cc>
    Re: Processing Qmail Smtp Session Log <noreply@gunnar.cc>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Fri, 20 Aug 2004 16:38:15 GMT
From: Arne <arne@luras.nu>
Subject: Re: Any YahooPop/fetchyahoo Like For NNTP on Google?
Message-Id: <XNpVc.1006$d5.8094@newsb.telia.net>

Dmitri(Cabling-Design.com) wrote:

> $5 one time fee at teranews.net  for account setup would be as close as it
> gets to being free for a normal NNTP server. That's "only" 50Mb/day, which
> is more text than you can ever read in a year. If you want binaries, I think
> you can get away with like $10/month. There is a whole newsgroup devoted to
> this matter:
> alt.free.newsservers
> 
> Dmitri Abaimov, RCDD
> http://www.cabling-design.com
> Cabling Forum, color codes, pinouts and other useful online resources for
> premises wiring users and professionals
> http://www.cabling-design.com/homewiring
> Downloadable Residential Cabling Guide
> 
> 
> 
> "http://links.i6networks.com" <SaveWorldFromAids@alexa.com> wrote in message
> news:AjbVc.1822548$Ar.1398935@twister01.bloor.is.net.cable.rogers.com...
> 
>>>http://links.i6networks.com wrote:
>>>
>>>
>>>>It should act like a NNTP server, but it translate the request via
>>
>>HTTP/WEB
>>
>>>>to groups.google.com for reading and posting.
>>>
>>>Why not just use a normal news server?
>>>
>>>-- 
>>>Toby A Inkster BSc (Hons) ARCS
>>>Contact Me  ~ http://tobyinkster.co.uk/contact
>>>
>>
>>The normal one is NOT FREE. Very few ISP provides free NNTP, and it has
> 
> many
> 
>>restrictions. Juno, Netscape, NetZero, People's PC don't have NNTP. Many
>>foreign ISPs don't have NNTP. groups.google.com is almost the only free
> 
> one
> 
>>allowing posting and reading.
>>
>>
> 
> 
>      


A: Because it messes up the order in which people normally read text.

Q: Why is top-posting such a bad thing?

A: Top-posting.

Q: What is the most annoying thing on usenet?

-- 
/Arne




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

Date: Fri, 20 Aug 2004 16:45:19 -0000
From: "Bill Clark" <curmudgeon@senilityis.us>
Subject: Re: Any YahooPop/fetchyahoo Like For NNTP on Google?
Message-Id: <642VpEtJItBf-pn2-wWh5itIdclQk@04-154.158.popsite.net>

Dmitri wrote:

> $5 one time fee at teranews.net  for account setup would be as close as it
> gets to being free for a normal NNTP server.

Careful with this one as they use their own message id system which can 
screw up threading in some news readers...

-- 
-bc-

Support your local retailer


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

Date: 20 Aug 2004 07:46:15 -0700
From: geraldkelleher@hotmail.com (Oriel36)
Subject: Re: Earthquake forecasting program   Aug. 16, 2004
Message-Id: <273f8e06.0408200646.7b1d8796@posting.google.com>

Bob Officer <bobofficers@invalid.net> wrote in message news:<6q0ai0lrj7nbqha46q3aug2hn2ell7chl6@4ax.com>...
> On Wed, 18 Aug 2004 15:31:05 GMT, in sci.geo.earthquakes, "John W. Kennedy"
> <jwkenne@attglobal.net> wrote:
> 
> >Oriel36 wrote:
> >> All gravitational observations are based on the sidereal format which
> >> is the only means to determine a geocentric/heliocentric orbital
> >> equivalency.After Kepler,Galileo and others struggled for recognition
> >> of the heliocentric motion of the planets,Newton reverted back to an
> >> odd mixture of geocentrism and heliocentrism to get his gravitational
> >> agenda to work.He used Flamsteed erroneous proof for axial
> >> rotational/stellar circumpolar equivalency and morphed it into a
> >> geocentric/heliocentric orbital equivalency.
> >> 
> >> 
> >> "PHÆNOMENON IV.
> >> That the fixed stars being at rest, the periodic times of the five
> >> primary planets, and (whether of the sun about the earth, or) of the
> >> earth about the sun, are in the sesquiplicate proportion of their mean
> >> distances from the sun.
> >> 
> >> http://members.tripod.com/~gravitee/phaenomena.htm
> >> 
> >> I will put it another way,at dawn,the Earth axially rotates out of its
> >> orbital shadow but if you are the minset of sunrise and sunset you
> >> will place great stake in the position of the Sun in the sky and this
> >> is exactly where you are at, so is everyone else thanks to Newton.In
> >> the early 1920's they jettisoned Newton's geocentric/heliocentric
> >> framehopping and resorted to homocentrism which is why the 'every
> >> valid point is the center of the universe' is paraded today for the
> >> sake of the 'laws of physics'.
> >
> >Yes, folks, you read it right.  Not only is "Oriel36" an 
> >Einstein-denier, he is also a Newton-denier, as I have verified from his 
> >postings elsewhere.
> >
> >Can't we all just *plonk* him?
> 
> Agreed a wonderful idea.

Hey,have a ball,seeing that 'einstein ' has entered the vocabulary
associated with 'genius',I wonder how many would be capable of
figuring out what you have to fabricate to being one.

Don't you love the story of Newton,Maxwell,Lorentz,Albert where Albert
got rid of Newton's aether in 1905,especially when Newton already had
no use for a medium no more than Kepler or Copernicus had.

http://www.wordiq.com/definition/Special_relativity#Motivation_for_the_theory_of_special_relativity



"The fictitious matter which is imagined as filling the whole of space
is of no use for explaining the phenomena of Nature, since the motions
of the planets and comets are better explained without it, by means of
gravity; and it has never yet been explained how this matter accounts
for gravity. The only thing which matter of this sort could do, would
be to interfere with and slow down the motions of those large
celestial bodies, and weaken the order of Nature; and in the
microscopic pores of bodies, it would put a stop to the vibrations of
their parts which their heat and all their active force consists in.
Further, since matter of this sort is not only completely useless, but
would actually interfere with the operations of Nature, and [314]
weaken them, there is no solid reason why we should believe in any
such matter at all. Consequently, it is to be utterly rejected."

Optics 1704



"I have no regard in this place to a medium, if any such there is,
that freely pervades the interstices between the parts of bodies. 
http://members.tripod.com/~gravitee/definitions.htm#time

Principia 1687





http://www.bodley.ox.ac.uk/cgi-bin/ilej/image1.pl?item=page&seq=9&size=1&id=bm.1843.10.x.54.336.x.425

In a more innocent and honest age,these men recognised the dilemma,you
just bury your heads in a fabrication,einstein-denier indeed !.


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

Date: 20 Aug 2004 10:10:41 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Earthquake forecasting program   Aug. 16, 2004
Message-Id: <86657divla.fsf@blue.stonehenge.com>

*** post for FREE via your newsreader at post.newsfeed.com ***

>>>>> "edgrsprj" == edgrsprj  <edgrsprj@ix.netcom.com> writes:

edgrsprj> Open Newsgroups such as this one are I believe intended for
edgrsprj> public use.  If you do not like that arrangement then I
edgrsprj> recommend that you could either start a moderated one where
edgrsprj> you can decide who gets to post and who does not.  Or you
edgrsprj> could create and host a bulletin board which is probably
edgrsprj> even more restricted.  Why argue over public resources when
edgrsprj> there are other options available?

And as adults, we've learned etiquette for shared public resources,
such as "standing in line".  When someone cuts in line, others
(rightfully) complain.  It's not the force of law, it's just common
sense and common courtesy.

You sir, do not seem to understand that when you're being told "what's
up with the extra date header", it's because you've "cut in line",
doing something that most people will then consider that you no longer
have common sense.

So, if you want to be heard, be a member of the tribe.  Do it the
tribal way.  Stop putting extra date headers there.  That's no
guarantee that you'll get a bigger audience, but it's certainly better
than guaranteeing that you'll get a smaller audience if you fail to
comply.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


 -----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----
                  


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

Date: 20 Aug 2004 16:50:55 GMT
From: ctcgag@hotmail.com
Subject: Re: editing perl script through TEXTAREA
Message-Id: <20040820125055.336$Sc@newsreader.com>

Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
>
> > The point is, CGI nearly always will properly encode your text
> > going into the html form, and properly decode it coming back from a
> > form submission.
>
> You seem to take for granted that CGI.pm is used for generating HTML,

If I was taking that for granted, I would be pretending this thread did not
exist, which means I wouldn't be replying to it.

> while many (most?) people who deal with CGI choose to not use CGI.pm
> for that purpose.

I don't use CGI for generating generic html (<H1><p><em>, etc.) but
do use it for generating form element tags, and escaping form element
values.  It does a good job.

> They (we) do need to understand when converting
> certain characters to HTML entities is necessary and how you do it.
>
> > If you want to know how it does it, look at how it does it.
>
> There are far easier ways to gain a basic knowledge about CGI than
> studying the CGI.pm source code, aren't there?

If by "easier", you mean "require less work to get something that doesn't
work well" then I suppose you are right.  But when I want to both
understand it and have an implementation that works, I find that reading
and copying it out of the CGI source is the easiest way to do it.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: 20 Aug 2004 09:04:38 -0700
From: ryankeeling@gmail.com (Ryan Keeling)
Subject: Re: Extract same text from file.
Message-Id: <b1d57b3e.0408200804.7b38aadd@posting.google.com>

Thanks guys this worked perfectly, it was a bit of a d'oh on my part
that I didnt think of it earlier!!

Thanks again 

Ryan 

Joe Smith <Joe.Smith@inwap.com> wrote in message news:<mo8Uc.135779$8_6.6463@attbi_s04>...
> Ryan Keeling wrote:
> 
> > Such as a file containing all entries for
> > MS102_PCP.Implementation and another file for MS102_PCP.Support.
> 
> Here's some help regarding multiple output files:
> 
>    my %filehandles
>    while(<>){
>      ($dept,$proj) = (...);	# Something to pick out the right columns
>      unless (exists $filehandles{$proj}) {
>         open $filehandles{$proj}, '>>', "$dept.$proj" or warn
> 	  "Cannot append to $dept.$proj: $!\n";
>      }
>      print $filehandles{$proj} $_ or warn "Output error $proj: $!\n"
>    }
> 
> As for the part marked (...); that is an exercise for the reader.
> 	-Joe


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

Date: 20 Aug 2004 09:28:51 -0700
From: nomad3d@msn.com (Steve P)
Subject: Re: File::Find question.
Message-Id: <af2809b.0408200828.477a43e@posting.google.com>

Tad McClellan <tadmc@augustmail.com> wrote in message news:<slrnci9f4m.hvp.tadmc@magna.augustmail.com>...
> Steve P <nomad3d@msn.com> wrote:
> 
> > I need to only return the file
> > names rather than the whole path and filename
> 
> 
> > &print_html();
>  
> > sub print_html {
> 
> 
> Why are you specifying to circumvent prototypes when the functions
> do not even _have_ prototypes?

I'm a very novice perl scripter and all I know, I am learing from a
very old book (Teach yourself perl in 21 days by Laura Lemay) that
covers up to perl 5.005, so am doing best that I can at the moment. :)
 Thanks for the tips Tad.

Regards,
Steve Powell


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

Date: Fri, 20 Aug 2004 10:18:43 -0700
From: Michael Slass <miknrene@drizzle.com>
Subject: Re: File::Find question.
Message-Id: <m3u0uxlocs.fsf@eric.rossnet.com>

nomad3d@msn.com (Steve P) writes:

>
>I'm a very novice perl scripter and all I know, I am learing from a
>very old book (Teach yourself perl in 21 days by Laura Lemay) that
>covers up to perl 5.005, so am doing best that I can at the moment. :)
> Thanks for the tips Tad.
>
>Regards,
>Steve Powell

The docs that come with perl are pretty good;

perldoc File::Find

will generate the man page for that package.

perldoc perldoc
gives the man page for the doc system itself.


-- 
Mike Slass


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

Date: 20 Aug 2004 07:49:03 -0700
From: schimata2@yahoo.com (srini)
Subject: Re: How to upload a file from a local pc to  a web server from a html page????
Message-Id: <5fc50f33.0408200649.542b3db2@posting.google.com>

Joe Smith <Joe.Smith@inwap.com> wrote in message news:<rPgVc.289630$%_6.59237@attbi_s01>...
> srini wrote:
> 
> > open UPLOADFILE, ">$temp";
> > while (<$upload_filehandle>)
> >  {
> >    print UPLOADFILE;
> >  }
> > close UPLOADFILE;
> 
> 1) You should *always* check the results of an open() call.
> 2) Magic with $_ happens for <>, not for any other read operation,
>     which means that you have to explictly set $_.
> 
>    use CGI::Carp qw(:fatalsToBrowser);
>    open UPLOADFILE, '>', $temp	or die "Cannot create file $temp: $!\n";
>    binmode $upload_filehandle;
>    binmode UPLOADFILE;
>    while(defined($_ = <$upload_filehandle>)) {
>      print UPLOADFILE		or warn "Possible disk full error: $!\n";
>    }
>    close UPLOADFILE		or warn "Possible truncation on $temp: $!\n";
> 
> 	-Joe


Thanks Joe,

I tried as follows:
-------------------------
$attachedFile = $query -> param ("attachedfile");
    
    $attachedFile=~ s/.*[\/\\](.*)/$1/;
     
    $upload_filehandle = $query->upload("attachedfile");
     
    $uploaddir = "C:\\ViewStore\\";  #### on web server..
    
    $temp = $uploaddir . $attachedFile;
        
    open UPLOADFILE, '>', $temp or die "Cannot create file $temp: $!\n";
    binmode $upload_filehandle;    
    binmode UPLOADFILE;
       
    while(defined($_ = <$upload_filehandle>)) 
     {
         print UPLOADFILE  or warn "Possible disk full error: $!\n";
     }
    
    close UPLOADFILE;

    print "$temp";
------------------------

But I still see empty file on the web server....
Any ideas why I ma getting only empty file there?

Thanks,
Srini


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

Date: 20 Aug 2004 17:04:52 GMT
From: ctcgag@hotmail.com
Subject: Re: How to upload a file from a local pc to  a web server from a html page????
Message-Id: <20040820130452.429$xM@newsreader.com>

schimata2@yahoo.com (srini) wrote:

> Thanks Joe,
>
> I tried as follows:
> -------------------------
> $attachedFile = $query -> param ("attachedfile");
>
>     $attachedFile=~ s/.*[\/\\](.*)/$1/;
>
>     $upload_filehandle = $query->upload("attachedfile");
>
>     $uploaddir = "C:\\ViewStore\\";  #### on web server..
>
>     $temp = $uploaddir . $attachedFile;
>
>     open UPLOADFILE, '>', $temp or die "Cannot create file $temp: $!\n";
>     binmode $upload_filehandle;
>     binmode UPLOADFILE;
>
>     while(defined($_ = <$upload_filehandle>))
>      {
>          print UPLOADFILE  or warn "Possible disk full error: $!\n";
>      }
>
>     close UPLOADFILE;
>
>     print "$temp";
> ------------------------
>
> But I still see empty file on the web server....
> Any ideas why I ma getting only empty file there?


Is it dying or giving you any warnings?  If it were, would you know?

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: 20 Aug 2004 09:32:03 -0700
From: David Driscoll <driscoll@triustc.com>
Subject: Net::Daemon install question
Message-Id: <m3llg9hit8.fsf@suse.triustc.com>

Hi,

I'm trying to install Net::Daemon using MCPAN and 
I get an error while running the forkm.t test.
The error message is:
"scalar found at eval 153 line 1 near int $_val"
and forkm.t failed stat 15 wstat 3840

I don't understand what this is trying to say.
Can anyone offer some hints as to how to debug
this?
Thanks,
Dave Driscoll


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

Date: 20 Aug 2004 14:08:53 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Net::Daemon install question
Message-Id: <cg50ll$pgs$1@mamenchi.zrz.TU-Berlin.DE>

David Driscoll  <driscoll@triustc.com> wrote in comp.lang.perl.misc:
> Hi,
> 
> I'm trying to install Net::Daemon using MCPAN and 
> I get an error while running the forkm.t test.
> The error message is:
> "scalar found at eval 153 line 1 near int $_val"
> and forkm.t failed stat 15 wstat 3840
> 
> I don't understand what this is trying to say.
> Can anyone offer some hints as to how to debug
> this?

This doesn't happen with Net::Daemon 0.38 under Darwin 7.5 and Perl 5.8.5.
What is your setup?

Anno



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

Date: Fri, 20 Aug 2004 18:34:54 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: no re 'eval' not secure enough
Message-Id: <cg5cg5$kd3$1@sun3.bham.ac.uk>


Matthew Braid wrote:
> Not really a question, more of a pointer....
> 
> Now that RE's can contain executable code (via the experimental (?{...}) 
> and a few others) it is no longer safe to accept an RE as an argument 
> (either to a program or to a subroutine), since it could, for instance, 
> have:
> 
> (?{system("rm -rf /")})
> 
> buried in it.

And since the tie and overload mechanisms allow arbitrary code to to 
burried in seemingly plain scalar values you must not accept any 
argument of any kind.

> Now while this can't happen in raw data from outside the program 
> (because it can't be qr'd by the external person), it does mean any 
> subroutine that accepts an RE as an argument can't rely on no re 'eval' 
> as the supplied RE might have been created using qr// in a block that 
> had had use re 'eval' turned on.

I think you need to take a step back and look at your threat model.  You 
appear to be concerned that the person who wrote the code with 'use re 
qw(eval)' in it is colluding with the supposed attacker. If this is the 
case then there's no need for them to call your function at all they can 
just execute the attackers code directly.

> The only way around this I have found is to use stringy eval and a dummy 
> variable.

There is no need to get arround anything.

> Its a very ugly kludge, but as I said its the only thing I've ever got 
> to work in a secure fashion.

You are imagining a security issue where there is none.  If there are 
security holes in the code that's calling your code there's nothing much 
you can do about it.  In one VERY special case where you know precisely 
that there's a missplaced 'use re qe(eval)' in the calling code AND you 
know that this only effect REs that get evaluated in your code AND you 
can't get to fix the problem in the calling code THEN (and only then) 
would it make sense to work-round this in your code.

> It would be fantastic if there was a pragma 
> like no re 'eval_strict' or something that would stop embedded code 
> entirely - I have never, ever seen a need for it in everyday use.

Well I cant seen a need for such a pragma even in once-in-a-blue-moon use.

-- 
      \\   ( )
   .  _\\__[oo
  .__/  \\ /\@
  .  l___\\
   # ll  l\\
  ###LL  LL\\



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

Date: Fri, 20 Aug 2004 18:56:22 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: Operator for presence of value in list?
Message-Id: <cg5dod$kun$1@sun3.bham.ac.uk>

ctcgag@hotmail.com wrote:

> Gunnar Hjalmarsson <noreply@gunnar.cc> wrote:
> 
>>Quote from the applicable Perl FAQ ("perldoc -q contained"):
>>
>>"Please do not use
>>
>>     ($is_there) = grep $_ eq $whatever, @array;
>>
>>or worse yet
>>
>>     ($is_there) = grep /$whatever/, @array;
>>
>>These are slow (checks every element even if the first matches),
>>inefficient (same reason),
> 
> 
> Why not just say "Don't use Perl, it is slow and inefficient."?
> 
> If one doesn't care enough about efficiency to use a hash, then I highly
> doubt one will care about the (generally trivial) additional inefficiency
> of using grep.  I've probably spent more of my time typing this reply than
> all of the time wasted via grep-in-boolean-context of all the perl programs
> I've ever run.

I agree completely with what Xho just said.

Indeed I find now that in c.l.p.* now I agree with Xho more of the time 
than I agree with any other single member of the regular crowd (Anno, 
Tad, Uri, Gunnar...).

Hmmm... I think I'll just wander off to see how much I agree with Xho on 
other issues...

http://groups.google.com/groups?q=author%3Actcgag%40hotmail.com

-- 
      \\   ( )
   .  _\\__[oo
  .__/  \\ /\@
  .  l___\\
   # ll  l\\
  ###LL  LL\\



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

Date: Fri, 20 Aug 2004 14:09:23 +0100
From: Chris Cole <ithinkiam@gmail.com>
Subject: Re: perl interpreter automatically exit windows so how I can saw   the result of script?
Message-Id: <pan.2004.08.20.13.09.16.371767@gmail.com>

On Fri, 20 Aug 2004 20:25:11 +0800, Alont wrote:

> Abhinav <matrix_calling@yahoo.dot.com>Wrote at Fri, 20 Aug 2004
> 14:25:34 +0530:
>>Alont wrote:
>>
>>> how to set Forte Agent automatically move cursor to the bottom?
>>> 
>>
>>1. Check out the FAQs for Forte
> 
> there's impossible to solve this problem or I change My client
> program. maybe Forte Agent isn't the best reader, I'll try other one
> 
> 
>>2. Before you ask where they will be, google for them. In the highly
>>unlikely scenario that you cannot find them , google the group
>>news.software.readers.

Did you actually try step 2? The 3rd hit in google gave this link:
http://www.faqs.org/faqs/off-line-readers/usenet/forte-agent/

This also shows that there is a newsgroup dedicated to Forte. Try asking
them.

You really need to start working things out for yourself as people will
soon get tired of you not showing any initiative in trying solve problems
before bothering us about it.

[snip]



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

Date: Fri, 20 Aug 2004 17:05:03 -0000
From: gbacon@hiwaay.net (Greg Bacon)
Subject: Re: perl interpreter automatically exit windows so how I can saw the result of script?
Message-Id: <10icbpvjmac5g75@corp.supernews.com>

In article <Pine.SGI.3.96.1040819145946.1358098A-100000@vcmr-64.server.rpi.edu>,
    Jeff 'japhy' Pinyan  <pinyaj@rpi.edu> wrote:

: On Thu, 19 Aug 2004, Greg Bacon wrote:
: 
: >I'd like to know of a workaround that would cause the window to
: >linger when there are syntax errors, a use fails, etc.
: 
: Easy:  make that END { ... } the first line of your code.

Did you test that suggestion?

Greg
-- 
I yet believe that the maintenance of the rights and authority reserved to
the states and to the people, not only essential to the adjustment and
balance of the general system, but the safeguard to the continuance of a
free government.          -- General Robert E. Lee


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

Date: Fri, 20 Aug 2004 15:49:02 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Processing Qmail Smtp Session Log
Message-Id: <2ome4vFce0s0U1@uni-berlin.de>

BadApple wrote:
> 
> My questions are :
> 1. When I get a pid of Authenticated User how do I store it till
> the bytes are found.
> 2. When I get the bytes how do I destroy the Hash so that the bytes
> won't get overwritten
> 3. When handling more than one "Authenticated user:"  pids how to 
> store them (pids) till the corresponding "bytes" line is not
> received

I believe this suggestion contains possible answers to those questions:

     my %hash;
     while (<FLE>) {
         chomp;
         if ( /qmail-smtpd\s+(\d+).+Authenticated user:(.+)/ ) {
             $hash{$1} = $2;
         }
         if ( /qmail-smtpd\s+(\d+).+queued.+size\s+(\d+)/ ) {
             if ( $hash{$1} ) {
                 print "Pid: $1 User: $hash{$1}\n",
                       "Pid: $1 Bytes: $2\n";
                 delete $hash{$1};
             }
         }
     }

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Fri, 20 Aug 2004 16:52:50 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Processing Qmail Smtp Session Log
Message-Id: <2omhtgFcf8ohU1@uni-berlin.de>

Gunnar Hjalmarsson wrote:
> 
>     my %hash;
>     while (<FLE>) {
>         chomp;
>         if ( /qmail-smtpd\s+(\d+).+Authenticated user:(.+)/ ) {
>             $hash{$1} = $2;
>         }
>         if ( /qmail-smtpd\s+(\d+).+queued.+size\s+(\d+)/ ) {
>             if ( $hash{$1} ) {
>                 print "Pid: $1 User: $hash{$1}\n",
>                       "Pid: $1 Bytes: $2\n";
>                 delete $hash{$1};
>             }
>         }
>     }

If the first regex matches, there is no reason to test the second 
regex, so this makes more sense:

     my %hash;
     while (<FLE>) {
         chomp;
         if ( /qmail-smtpd\s+(\d+).+Authenticated user:(.+)/ ) {
             $hash{$1} = $2;
         } elsif ( /qmail-smtpd\s+(\d+).+queued.+size\s+(\d+)/ ) {
             if ( $hash{$1} ) {
                 print "Pid: $1 User: $hash{$1}\n",
                       "Pid: $1 Bytes: $2\n";
                 delete $hash{$1};
             }
         }
     }

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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

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

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


------------------------------
End of Perl-Users Digest V10 Issue 6892
***************************************


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