[23765] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5969 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 22 14:06:03 2003

Date: Mon, 22 Dec 2003 11:05:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 22 Dec 2003     Volume: 10 Number: 5969

Today's topics:
    Re: Best way to send contents of file as body of mail m <jwillmore@remove.adelphia.net>
    Re: Escape $ in replace pattern: How to replace pattern <noreply@gunnar.cc>
    Re: fork()/exec() in perl <jgibson@mail.arc.nasa.gov>
    Re: fork <jgibson@mail.arc.nasa.gov>
    Re: help with file test <jwillmore@remove.adelphia.net>
    Re: Parsing File (Anno Siegel)
    Re: Parsing File <jwillmore@remove.adelphia.net>
    Re: Parsing File <trammell+usenet@hypersloth.invalid>
    Re: Parsing File (Anno Siegel)
    Re: pid of child forked by pipe (Tad McClellan)
    Re: replacing two EOL chars by one  Padraig@Linux.ie
        shared and \&Function references. <John@nospam.syntagma.demon.co.uk>
    Re: shared and \&Function references. <John@nospam.syntagma.demon.co.uk>
        Statistics for comp.lang.perl.misc <gbacon@hiwaay.net>
        Win32: Output to console (Dave...)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 22 Dec 2003 16:56:02 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Best way to send contents of file as body of mail message with Mail::Mailer?
Message-Id: <20031222115601.53ae215c.jwillmore@remove.adelphia.net>

On 22 Dec 2003 08:40:10 -0800
lsrtech@optonline.net (lsrtech) wrote:

> I cannot figure out how to include the contents of a file as the
> body of a mail message using Mail::Mailer.
> 
> Do I just open the file into a variable and send it that way?  Is
> there a limit to how much content a variable can contain?  Is this
> the only way?...if not, what is the most efficient way that is not
> prone to cause problems for large files?

If you post some code, we can help better.

The limit of the file, AFAIK, is set my the SMTP server you're sending
to.  Postfix, for example, allows you to reject email based upon the
size of the email.  There is no limit (again, AFAIK) set by any email
module.

As far just opening a file and putting it into an email - well, that
depends on the file type.  Since you make no mention of that, I'm not
going to guess :-)

Just a suggestion - you could look over the MIME::Lite module.  That
may fit the bill better.  It allows you to attach files to an email
and set the MIME type of the attachment.  This may be more what you're
looking for - I think :-)

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
"The sooner all the animals are dead, the sooner we'll find their
money."   -- Ed Bluestone, "The National Lampoon" 


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

Date: Mon, 22 Dec 2003 18:01:49 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Escape $ in replace pattern: How to replace pattern "a*c" by exact string "p$1q"
Message-Id: <bs7981$a9124$1@ID-184292.news.uni-berlin.de>

him1508 wrote:
> For search and replace of strings, I'm using the jakarta ORO Regex
> package which uses Perl5 internally. I need to build a perl pattern
> for the search string and replace string. It is working fine for
> all cases except this:
> 
> search pattern : a*c
> replace string  (not pattern, exact string): pqr$1xyz
> 
> Search in : jkhjha8ctwe
> Expected result: jkhjhpqr$1xyztwe

It should be noted that if that is what you expect, the '*' character
does not do in a Perl regular expression what you think it does.

     http://www.perldoc.com/perl5.8.0/pod/perlre.html

Maybe your "ORO Regex package" translates it somehow.

Anyway, this is how it can be done in Perl:

     $_ = 'jkhjha8ctwe';
     my $pattern = 'a*c';
     my $replacement = 'pqr$1xyz';

     $pattern =~ tr/*/./;
     s/$pattern/$replacement/;
     print;

Outputs:
jkhjhpqr$1xyztwe

> Problem: If I use replace string as it is(pqr$1xyz), it thinks that
> $1 is meant for replace of *, and the output I get is
> jkhjhpqr8xyztwe
>         ^

If that is what you get, the problem is not Perl related, but it's the
result of something that the "ORO Regex package" does, and you'd
better seek help elsewhere.

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



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

Date: Mon, 22 Dec 2003 10:38:50 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: fork()/exec() in perl
Message-Id: <221220031038508876%jgibson@mail.arc.nasa.gov>

In article <ae92bb50.0312220719.6fb34bef@posting.google.com>, Huey
<huey_jiang@yahoo.com> wrote:

> Hi All,
> 
> I need my perl script to call C program: [snip]

The easiest way to execute a program and capture the output is with
backticks or qx// (see below; see also "perldoc perlop" and search for
qx).

> My perl script needs to get very simple return, a few chars, from C
> executable. I tried:
> 
> #!/usr/bin/perl
> 
> $test = "./my_executable.exe";

my @output = `$test`;
foreach ( @output ) { print; }


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

Date: Mon, 22 Dec 2003 10:29:14 -0800
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: fork
Message-Id: <221220031029144359%jgibson@mail.arc.nasa.gov>

In article <bs76pq$4d99@imsp212.netvigator.com>, CwK <p12@bigfoot.com>
wrote:

> How to use fork() system function to fork multi child process at the same
> time ?
> 
> For example:
> 
> Run a program to fork 5 child process at the same time and the parent must
> wait until all child exit.
> 
> The child do some thing like to read different file at the same time.
> 
> Thanks
> 
> 

Execute the fork call 5 times. You can't start 5 processes "at the same
time", but you can do it quickly one after another. You will then need
to execute the wait call 5 times in the parent process, one for each
child. No single process can do two or more different things
simultaneously. Two or more processes can execute simultaneously only
if you have more than one processor in your system.

Once you have a Perl program coded, and if it doesn't work, you should
then post it here for additional help.


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

Date: Mon, 22 Dec 2003 17:06:07 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: help with file test
Message-Id: <20031222120606.75238f23.jwillmore@remove.adelphia.net>

On Mon, 22 Dec 2003 10:14:02 -0600
"S.R.Sriram" <srsriram@sriram.com> wrote:

> The above code works fine for the example below:
> eg. $fileName = /var/mybinary/bin/foo
> However the script fails when i have fileNames like shown below.
> eg. $fileName = /var/newbinary/$BASEDIR/bin/foo
> In the above case, there is directory name $BASEDIR.
> or
>     $fileName = /var/files/$BASEDIR/bin/bar$class
> In the above case, the name of the file is bar$class
> Any help is appreciated.

Where  is $BASEDIR being defined in the Perl script?  Or, are you
making the assumption that Perl will import $BASEDIR from your
environment?

To import $BASEDIR (if, in fact, that's what you're doing), you need
to do something like ....
(untested)

my $basedir  = 'put some default directory here';
$basedir = $ENV{BASEDIR} if defined $ENV{BASEDIR};

This should import the environment variable BASEDIR if BASEDIR is
defined in the shell.  However, if it isn't defined, we already set a
default directory to use (just in case and to avoid getting a warning
about an undefined variable).

HTH

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
"Virtual" means never knowing where your next byte is coming
from. 


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

Date: 22 Dec 2003 10:33:00 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Parsing File
Message-Id: <bs6h8s$pqu$1@mamenchi.zrz.TU-Berlin.DE>

BrokenSaint <tartemp@epix.net> wrote in comp.lang.perl.misc:
> Tore Aursand <tore@aursand.no> wrote in message
> news:<pan.2003.12.21.09.42.11.727893@aursand.no>...
> > On Sat, 20 Dec 2003 19:21:35 -0800, BrokenSaint wrote:
> > > i have a file with the following data:
> > > ...
> > > Record created on 24-Jun-2003.
> > > Database last updated on 27-Nov-2003 17:14:03 EST.
> > > 
> > > Domain servers in listed order:
> > > 
> > > ns00.nameserver.com 123.456.789.012
> > > ns00.nameserver.com 123.456.789.012
> > > =====================================================
> > > What i would like to do is parse thru the file and find and retain
> > > "ns00.nameserver.com" to a variable. The data i desire almost always is
> > > available after the words "Domain servers...:"
> > 
> > What have you tried so far?  What doesn't work?
> 
> I can open the file and read it, but not sure how to go about parsing
> thru it to find "ns00.nameserver.com "
> i've tried grep to find the line using: grep "Domain servers"
> filename, but would rather use an if or while statement to find the
> line and then get the ns00....but am clueless to getting it
> accomplished

What's wrong with

    print if /^ns00/;

Anno


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

Date: Mon, 22 Dec 2003 17:50:43 GMT
From: James Willmore <jwillmore@remove.adelphia.net>
Subject: Re: Parsing File
Message-Id: <20031222125042.661d02e6.jwillmore@remove.adelphia.net>

On 22 Dec 2003 07:37:19 -0800
genericax@hotmail.com (Sara) wrote:
> tartemp@epix.net (BrokenSaint) wrote in message
> news:<24813030.0312201921.3708d8f0@posting.google.com>...

>   die "duuuh gee Tenessee it wont even open!\n" 
>    unless open F, 'myBigoleFile.dat';

You *really* mean 

my $filename = '/path/name_of_file';
open F, "$filename" or die "Can't open $filename: $!\n";

right?

I realize that it's good to throw some humor into code (believe it or
not), but not at the expense of knowing what happened.  I mean, if you
want to have a list of codes related to what happened, be my guest. 
However,  I enjoy the fact that I can put something into the error
statements that say *exactly* what's going on.  I'm thinking others do
too :-)

And why 'unless'?  Please, explain *why* you check 'open' in such a
way.  It's more efficent to try and open the file first, *then* die if
you can't. 

However, maybe you know something I don't - and if that's the case,
please enlighten me (and others) in the error of our ways ;-)

-- 
Jim

Copyright notice: all code written by the author in this post is
 released under the GPL. http://www.gnu.org/licenses/gpl.txt 
for more information.

a fortune quote ...
Reisner's Rule of Conceptual Inertia:  If you think big enough,
you'll never have to do it. 


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

Date: Mon, 22 Dec 2003 18:11:52 +0000 (UTC)
From: "John J. Trammell" <trammell+usenet@hypersloth.invalid>
Subject: Re: Parsing File
Message-Id: <slrnbuecv8.58u.trammell+usenet@hypersloth.el-swifto.com.invalid>

On Mon, 22 Dec 2003 17:50:43 GMT, James Willmore
<jwillmore@remove.adelphia.net> wrote:
> On 22 Dec 2003 07:37:19 -0800
> genericax@hotmail.com (Sara) wrote:
>> tartemp@epix.net (BrokenSaint) wrote in message
>> news:<24813030.0312201921.3708d8f0@posting.google.com>...
> 
>>   die "duuuh gee Tenessee it wont even open!\n" 
>>    unless open F, 'myBigoleFile.dat';
> 
> You *really* mean 
> 
> my $filename = '/path/name_of_file';
> open F, "$filename" or die "Can't open $filename: $!\n";
          ^         ^
          ^         ^
> 
> right?

Useless use of quotes; I've always liked:

  open(F,$filename) or die "Can't open '$filename': $!";

but TMTOWDTI!

[snip]

> And why 'unless'?  Please, explain *why* you check 'open' in such a
> way.  It's more efficent to try and open the file first, *then* die if
> you can't. 

**boggle**
HIBT?



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

Date: 22 Dec 2003 18:22:41 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Parsing File
Message-Id: <bs7cph$e3r$1@mamenchi.zrz.TU-Berlin.DE>

Sara <genericax@hotmail.com> wrote in comp.lang.perl.misc:
> tartemp@epix.net (BrokenSaint) wrote in message
> news:<24813030.0312201921.3708d8f0@posting.google.com>...
> > i have a file with the following data:
> > ...
> > Record created on 24-Jun-2003.
> > Database last updated on 27-Nov-2003 17:14:03 EST.
> > 
> > Domain servers in listed order:
> > 
> > ns00.nameserver.com 123.456.789.012
> > ns00.nameserver.com 123.456.789.012
> > =====================================================
> > What i would like to do is parse thru the file and find and retain
> > "NS99.WORLDNIC.COM" to a variable. The data i desire almost always is
> > available after the words "Domain servers...:"
> > =====================================================
> > The following 2 formats are common:
> > Domain servers in listed order:
> > 
> > ns00.nameserver.com 123.456.789.012
> > ns00.nameserver.com 123.456.789.012
> >                      OR
> > Domain servers: ns00.nameserver.com
> > ++++++++++++++++++++++++++++++++++++++++
> > 
> > If someone can help me with this, it would be appreciated
> 
> OK this code is untested (for example, I'm sure it wont work for all
> types of domain names, and probably myriad other boundry conditions
> which Anno will surely point out) ,

Oh no.  It's much more fun pointing out glitches the author *hasn't*
anticipated...

>                                     and I'm not entirely sure of what
> you're seeking in the file, but you might consider something like:
> 
>   die "duuuh gee Tenessee it wont even open!\n" 

 ...like the missing "n" in "Tennessee".

Like you, I'm not sure what the OP is trying to extract from the file, so
I can't be sure what you are trying to do in the code below.  I'll do
my best to criticize it anyhow.

>    unless open F, 'myBigoleFile.dat';
> 
> # the \n? is there in case the last line has no EOL
> # should work as long as the name is the first one on the line

The linefeed matters only because you have chosen to extract a pattern
by first assigning the whole string and then changing the string to
what was matched.  That is inefficient and cumbersome, as you have
seen.  You have worried less about text that may precede the match,
but it deserves similar consideration.

>  map s/(\w+\.\w+\.\w+/).+\n?/$1/, (my @data) = grep
                       ^
You don't want that backslash, it's a syntax error.  It's annoying little
slips like that what makes us prefer when people test their code.

> /\w+\.\w+\.\w+/,<F>;
> 
>   close F;

I don't doubt it does what it's intended to do, but yours is a rather
peculiar construction.  The map() should really be a "for" here (you're
not interested in the list of 1s map returns), and the assignment in the
middle of a statement isn't particularly readable either.  As mentioned,
pattern extraction by pattern substitution is in general not recommended.

I don't mind peculiar constructions if they serve a purpose, but this
is a standard situation:  Watch lines passing by and extract matches
to a particular pattern.  The standard solution is

    my @data;
    while ( <F> ) {
        push @data, $1 if /(\w+\.\w+\.\w+)/;
    }

 ... or, if you prefer a one-liner involving map()

    my @data = map /(\w+\.\w+\.\w+)/, <DATA>;

Anno


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

Date: Mon, 22 Dec 2003 10:00:26 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: pid of child forked by pipe
Message-Id: <slrnbue58q.49q.tadmc@magna.augustmail.com>

Andreas Boehm <andreas@andiboehm.de> wrote:

> does there exist a possibility to determine the pid of a child created 
> by open("blaatool |")?


You should read the documentation for the functions that you use!


> If so, how can the pid be deterined?


   perldoc -f open

   If the C<open> involved a pipe, the return value happens to be 
   the pid of the subprocess.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Mon, 22 Dec 2003 09:24:17 +0000
From:  Padraig@Linux.ie
Subject: Re: replacing two EOL chars by one
Message-Id: <3FE6B841.90707@Linux.ie>

Xah Lee wrote:
> i have a bunch of java files that has spaced-out formatting that i
> want to get rid of. I want to replace two end of line characters by
> one end of line characters. The files in question is unix, and i'm
> also working under unix, so i did:
> 
>  perl -pi'*~' -e "s@\n\n@\n@g" *.java

Of course you can do it in Perl.
The handiest way I think is:

tr -s '\n'

Pádraig.



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

Date: Mon, 22 Dec 2003 09:54:18 +0000
From: John William Aldis <John@nospam.syntagma.demon.co.uk>
Subject: shared and \&Function references.
Message-Id: <pWX0kZAK9r5$MA4+@syntagma.demon.co.uk>

Hi. Hopefully this isn't a really stupid question; I've looked on the 
FAQ on perl.com and couldn't find it.

I'm using threads and shared from Perl 5.8.0, and have a shared array of 
hash references (to shared hashes, of course), and I want to put a 
reference to a function into an item of one of these hashes, like

${$hashlist[0]}{function} = \&MyFunction;

However, Perl complains that this isn't a good value for a shared 
variable. Is this possible in some way, or am I barking up the wrong 
tree here?

Thanks in advance for any help!

-- 
| John Aldis             http://www.hypermactive.com/john/
   ...a sort of urgent, hungry enthusiasm, the kind you get
   when someone has just read a really interesting book and
   is determined to tell someone all about it.              |
      -- Count Magpyr, /Carpe Jugulum/, by Terry Pratchett --


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

Date: Mon, 22 Dec 2003 17:31:20 +0000
From: John William Aldis <John@nospam.syntagma.demon.co.uk>
Subject: Re: shared and \&Function references.
Message-Id: <vv$lqTBopy5$MAqa@syntagma.demon.co.uk>

In article <u9oeu1t30c.fsf@wcl-l.bham.ac.uk>, Brian McCauley 
<nobull@mail.com> writes
>John William Aldis <John@nospam.syntagma.demon.co.uk> writes:
>>I want to put a
>> reference to a function into an item of one of these
[shared]
>>hashes, like
 ...[Code sample]...
>I don't think you can have shared functions.  (And, of course, you
>can't put a reference to a non-shared thing in a shared variable).

Thanks. I feared this would be the case.

Does anyone know what the danger would be of letting people store 
\&Function references in their shared variables? AFAI can see, any 
thread that called that function would have it executed internally to 
said thread anyway. I guess the shared checking would have to make sure 
you hadn't done:

$sharedref = \&Function($unsharedv);

(if, indeed, that's possible. This whole area has a feel of "here be 
dragons" to me...)

>The canonical solution is to create a dispatch table (before you
>launch any threads) and store the key into that table in the shared
>variable.

I considered this. However, since it's currently only going to be used 
from one thread, I chose instead to set the dispatch table up in that 
thread (using a global, non-shared variable, but lines otherwise like 
the one above). I might use a Scottish Reference[3] (see below) later, 
if necessary.

>A varient on the above would be to use Perl's own symbol table as your
>dispatch table - i.e. use a symbolic reference[1].

Eek. **Fx: the shuffling of manpages...**

>(I now should
>immediately leave the room, turn around three times, break wind or
>spit, knock on the door and ask permission to re-enter)[2].

If you like.

>[1] Symbolic references should probably be fully qualified.
Hmm. That is, if one is qualified to use symbolic references... :-)

>[2] http://www.humbugsguide.co.uk/anecdotes/superstitions.html
Thanks for this. I had wondered why "break a leg..."

[3] Sorry about this. But then, if they're the things that scotch your 
programming style...?

In any case, thanks very much for your help, I'll bear it in mind. I 
like your signature, BTW...

-- 
| John Aldis             http://www.hypermactive.com/john/
   ...a sort of urgent, hungry enthusiasm, the kind you get
   when someone has just read a really interesting book and
   is determined to tell someone all about it.              |
      -- Count Magpyr, /Carpe Jugulum/, by Terry Pratchett --


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

Date: Mon, 22 Dec 2003 17:03:56 -0000
From: Greg Bacon <gbacon@hiwaay.net>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <vue8vs9vjgj6f0@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 15 Dec 2003 17:06:27 GMT and ending at
22 Dec 2003 23:22:52 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2003 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Excluded Posters
================

perlfaq-suggestions\@(?:.*\.)?perl\.com
faq\@(?:.*\.)?denver\.pm\.org
comdog\@panix\.com

Totals
======

Posters:  198
Articles: 611 (234 with cutlined signatures)
Threads:  139
Volume generated: 1225.3 kb
    - headers:    565.5 kb (10,394 lines)
    - bodies:     625.8 kb (20,769 lines)
    - original:   390.7 kb (13,900 lines)
    - signatures: 33.5 kb (902 lines)

Original Content Rating: 0.624

Averages
========

Posts per poster: 3.1
    median: 2.0 posts
    mode:   1 post - 98 posters
    s:      4.4 posts
Posts per thread: 4.4
    median: 3 posts
    mode:   1 post - 42 threads
    s:      22.1 posts
Message size: 2053.5 bytes
    - header:     947.7 bytes (17.0 lines)
    - body:       1048.7 bytes (34.0 lines)
    - original:   654.8 bytes (22.7 lines)
    - signature:  56.1 bytes (1.5 lines)

Top 20 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   27    82.6 ( 32.5/ 46.6/ 40.5)  tadmc@augustmail.com
   26    55.9 ( 24.0/ 26.0/ 14.2)  Uri Guttman <uri@stemsystems.com>
   26    45.5 ( 24.6/ 18.9/  9.9)  Gunnar Hjalmarsson <noreply@gunnar.cc>
   24    47.3 ( 21.5/ 19.6/ 10.6)  James Willmore <jwillmore@remove.adelphia.net>
   20    42.6 ( 15.2/ 27.4/ 10.5)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   19    30.9 ( 18.7/ 12.1/  7.4)  "Matt Garrish" <matthew.garrish@sympatico.ca>
   16    22.6 ( 15.0/  6.9/  3.9)  "Fengshui" <test@test.com>
   16    39.4 ( 15.7/ 22.5/  9.6)  Brian McCauley <nobull@mail.com>
   10    18.4 (  9.6/  6.3/  3.0)  Ben Morrow <usenet@morrow.me.uk>
    9    20.4 (  6.8/ 12.8/  9.8)  Michele Dondi <bik.mido@tiscalinet.it>
    9    13.7 (  8.2/  5.5/  2.9)  "Jürgen Exner" <jurgenex@hotmail.com>
    8    14.7 (  6.0/  8.6/  4.4)  "David K. Wall" <dwall@fastmail.fm>
    8    16.6 (  9.3/  7.2/  5.6)  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
    7    15.8 (  7.7/  8.1/  6.7)  Mike Flannigan <mikeflan@earthlink.net>
    7     7.9 (  5.6/  2.3/  1.6)  "Eric" <Eric@nowhere.com>
    7    27.0 (  5.8/ 21.1/ 19.9)  Paul Sellis <paul.sellis@alussinan.org>
    7    10.7 (  6.3/  4.4/  2.7)  Carsten Aulbert <carsten@welcomes-you.com>
    7    15.1 (  6.5/  7.0/  2.1)  tassilo.parseval@post.rwth-aachen.de
    7    13.6 (  9.2/  3.9/  2.2)  "A. Sinan Unur" <1usa@llenroc.ude>
    6    16.3 (  7.2/  8.6/  6.6)  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>

These posters accounted for 43.5% of all articles.

Top 20 Posters by Number of Followups
=====================================

             (kb)   (kb)  (kb)  (kb)
Followups  Volume (  hdr/ body/ orig)  Address
---------  --------------------------  -------

       26    55.9 ( 24.0/ 26.0/ 14.2)  Uri Guttman <uri@stemsystems.com>
       25    82.6 ( 32.5/ 46.6/ 40.5)  tadmc@augustmail.com
       25    45.5 ( 24.6/ 18.9/  9.9)  Gunnar Hjalmarsson <noreply@gunnar.cc>
       24    47.3 ( 21.5/ 19.6/ 10.6)  James Willmore <jwillmore@remove.adelphia.net>
       20    42.6 ( 15.2/ 27.4/ 10.5)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
       19    30.9 ( 18.7/ 12.1/  7.4)  "Matt Garrish" <matthew.garrish@sympatico.ca>
       16    39.4 ( 15.7/ 22.5/  9.6)  Brian McCauley <nobull@mail.com>
       10    18.4 (  9.6/  6.3/  3.0)  Ben Morrow <usenet@morrow.me.uk>
        9    13.7 (  8.2/  5.5/  2.9)  "Jürgen Exner" <jurgenex@hotmail.com>
        8    22.6 ( 15.0/  6.9/  3.9)  "Fengshui" <test@test.com>
        8    14.7 (  6.0/  8.6/  4.4)  "David K. Wall" <dwall@fastmail.fm>
        7    15.1 (  6.5/  7.0/  2.1)  tassilo.parseval@post.rwth-aachen.de
        7    10.7 (  6.3/  4.4/  2.7)  Carsten Aulbert <carsten@welcomes-you.com>
        7    13.6 (  9.2/  3.9/  2.2)  "A. Sinan Unur" <1usa@llenroc.ude>
        7    16.6 (  9.3/  7.2/  5.6)  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
        6    27.0 (  5.8/ 21.1/ 19.9)  Paul Sellis <paul.sellis@alussinan.org>
        6    16.3 (  7.2/  8.6/  6.6)  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
        6    10.1 (  5.6/  4.5/  2.5)  "Ragnar Hafstað" <gnari@simnet.is>
        6    20.4 (  6.8/ 12.8/  9.8)  Michele Dondi <bik.mido@tiscalinet.it>
        6     9.3 (  5.7/  3.0/  2.7)  abigail@abigail.nl

These posters accounted for 49.3% of all followups.

Top 20 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  82.6 ( 32.5/ 46.6/ 40.5)     27  tadmc@augustmail.com
  55.9 ( 24.0/ 26.0/ 14.2)     26  Uri Guttman <uri@stemsystems.com>
  47.3 ( 21.5/ 19.6/ 10.6)     24  James Willmore <jwillmore@remove.adelphia.net>
  45.5 ( 24.6/ 18.9/  9.9)     26  Gunnar Hjalmarsson <noreply@gunnar.cc>
  42.6 ( 15.2/ 27.4/ 10.5)     20  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
  39.4 ( 15.7/ 22.5/  9.6)     16  Brian McCauley <nobull@mail.com>
  30.9 ( 18.7/ 12.1/  7.4)     19  "Matt Garrish" <matthew.garrish@sympatico.ca>
  27.0 (  5.8/ 21.1/ 19.9)      7  Paul Sellis <paul.sellis@alussinan.org>
  22.6 ( 15.0/  6.9/  3.9)     16  "Fengshui" <test@test.com>
  22.1 (  8.8/ 13.3/  8.1)      6  Henry <henryn@zzzspacebbs.com>
  20.4 (  6.8/ 12.8/  9.8)      9  Michele Dondi <bik.mido@tiscalinet.it>
  18.9 (  7.0/ 11.8/  8.4)      6  J . W . <jwngaa@att.net>
  18.4 (  9.6/  6.3/  3.0)     10  Ben Morrow <usenet@morrow.me.uk>
  16.6 (  9.3/  7.2/  5.6)      8  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
  16.3 (  7.2/  8.6/  6.6)      6  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
  15.8 (  7.7/  8.1/  6.7)      7  Mike Flannigan <mikeflan@earthlink.net>
  15.3 (  7.9/  7.4/  4.9)      6  Jim Gibson <jgibson@mail.arc.nasa.gov>
  15.1 (  6.5/  7.0/  2.1)      7  tassilo.parseval@post.rwth-aachen.de
  14.7 (  6.0/  8.6/  4.4)      8  "David K. Wall" <dwall@fastmail.fm>
  14.3 (  3.7/ 10.6/  5.4)      5  Bryan Castillo <rook_5150@yahoo.com>

These posters accounted for 47.5% of the total volume.

Top 9 Posters by Volume of Original Content (min. ten posts)
============================================================

        (kb)
Posts   orig  Address
-----  -----  -------

   27   40.5  tadmc@augustmail.com
   26   14.2  Uri Guttman <uri@stemsystems.com>
   24   10.6  James Willmore <jwillmore@remove.adelphia.net>
   20   10.5  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   26    9.9  Gunnar Hjalmarsson <noreply@gunnar.cc>
   16    9.6  Brian McCauley <nobull@mail.com>
   19    7.4  "Matt Garrish" <matthew.garrish@sympatico.ca>
   16    3.9  "Fengshui" <test@test.com>
   10    3.0  Ben Morrow <usenet@morrow.me.uk>

These posters accounted for 28.0% of the original volume.

Top 9 Posters by OCR (minimum of ten posts)
===========================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.869  ( 40.5 / 46.6)     27  tadmc@augustmail.com
0.605  (  7.4 / 12.1)     19  "Matt Garrish" <matthew.garrish@sympatico.ca>
0.561  (  3.9 /  6.9)     16  "Fengshui" <test@test.com>
0.547  ( 14.2 / 26.0)     26  Uri Guttman <uri@stemsystems.com>
0.539  ( 10.6 / 19.6)     24  James Willmore <jwillmore@remove.adelphia.net>
0.521  (  9.9 / 18.9)     26  Gunnar Hjalmarsson <noreply@gunnar.cc>
0.481  (  3.0 /  6.3)     10  Ben Morrow <usenet@morrow.me.uk>
0.425  (  9.6 / 22.5)     16  Brian McCauley <nobull@mail.com>
0.385  ( 10.5 / 27.4)     20  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>

Bottom 9 Posters by OCR (minimum of ten posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.869  ( 40.5 / 46.6)     27  tadmc@augustmail.com
0.605  (  7.4 / 12.1)     19  "Matt Garrish" <matthew.garrish@sympatico.ca>
0.561  (  3.9 /  6.9)     16  "Fengshui" <test@test.com>
0.547  ( 14.2 / 26.0)     26  Uri Guttman <uri@stemsystems.com>
0.539  ( 10.6 / 19.6)     24  James Willmore <jwillmore@remove.adelphia.net>
0.521  (  9.9 / 18.9)     26  Gunnar Hjalmarsson <noreply@gunnar.cc>
0.481  (  3.0 /  6.3)     10  Ben Morrow <usenet@morrow.me.uk>
0.425  (  9.6 / 22.5)     16  Brian McCauley <nobull@mail.com>
0.385  ( 10.5 / 27.4)     20  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>

9 posters (4%) had at least ten posts.

Top 20 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   26  Please critique this short script that scans a log file
   22  strange results using m//g in while loop...
   22  replacing two EOL chars by one
   20  Determine DaysInMonth($month)
   15  [HELP] code modification
   15  redirect without meta
   13  Creating a list of HASHes
   13  RegExp check for nothing or pattern
   12  sort
   12  Add Files to Zip File
   12  ticks and FreeBSD
   11  recursive closures?
   11  Problem with DBI MySQL (UPDATE command)
   10  Signaling another machine
    9  sum of numbers
    9  Is mysql.pm part of DBI?
    9  When closing DOS window...
    9  Login to site with random image code?
    8  Simple text file operation
    8  Starting Perl Script at Bootup

These threads accounted for 43.5% of all articles.

Top 20 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  67.6 ( 26.4/ 39.3/ 22.0)     26  Please critique this short script that scans a log file
  45.9 ( 15.6/ 29.9/ 25.4)     15  [HELP] code modification
  44.7 ( 22.7/ 20.4/ 15.5)     22  replacing two EOL chars by one
  44.1 ( 21.1/ 21.2/  9.6)     22  strange results using m//g in while loop...
  40.0 ( 12.4/ 27.0/ 19.3)     13  Creating a list of HASHes
  33.9 (  2.0/ 32.0/ 32.0)      2  Posting Guidelines for comp.lang.perl.misc ($Revision: 1.4 $)
  32.4 ( 18.4/ 13.6/  7.4)     20  Determine DaysInMonth($month)
  28.5 ( 14.4/ 12.6/  7.5)     15  redirect without meta
  26.8 ( 11.0/ 14.2/  6.5)     11  recursive closures?
  25.2 ( 11.7/ 13.5/  9.0)     12  Add Files to Zip File
  24.0 ( 10.5/ 12.3/  6.5)     12  ticks and FreeBSD
  23.6 ( 10.2/ 13.0/  7.5)     12  sort
  22.1 (  8.9/ 12.9/  7.9)     11  Problem with DBI MySQL (UPDATE command)
  20.5 (  9.1/ 11.4/  5.8)      6  Caching results (?) of lengthy cgi process
  20.2 (  8.9/ 10.6/  4.2)      9  Login to site with random image code?
  18.4 ( 12.4/  5.5/  3.5)     13  RegExp check for nothing or pattern
  17.4 (  8.3/  8.3/  4.4)     10  Signaling another machine
  17.3 (  4.4/ 12.6/  6.5)      6  Asynchronous Objects
  17.3 (  7.9/  8.7/  5.3)      9  When closing DOS window...
  15.9 (  6.4/  9.4/  6.0)      7  Return all points with x km of y

These threads accounted for 47.8% of the total volume.

Top 14 Threads by OCR (minimum of ten posts)
============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.850  ( 25.4/  29.9)     15  [HELP] code modification
0.762  ( 15.5/  20.4)     22  replacing two EOL chars by one
0.714  ( 19.3/  27.0)     13  Creating a list of HASHes
0.666  (  9.0/  13.5)     12  Add Files to Zip File
0.630  (  3.5/   5.5)     13  RegExp check for nothing or pattern
0.612  (  7.9/  12.9)     11  Problem with DBI MySQL (UPDATE command)
0.590  (  7.5/  12.6)     15  redirect without meta
0.573  (  7.5/  13.0)     12  sort
0.561  ( 22.0/  39.3)     26  Please critique this short script that scans a log file
0.544  (  7.4/  13.6)     20  Determine DaysInMonth($month)
0.531  (  6.5/  12.3)     12  ticks and FreeBSD
0.525  (  4.4/   8.3)     10  Signaling another machine
0.457  (  6.5/  14.2)     11  recursive closures?
0.452  (  9.6/  21.2)     22  strange results using m//g in while loop...

Bottom 14 Threads by OCR (minimum of ten posts)
===============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.850  ( 25.4 / 29.9)     15  [HELP] code modification
0.762  ( 15.5 / 20.4)     22  replacing two EOL chars by one
0.714  ( 19.3 / 27.0)     13  Creating a list of HASHes
0.666  (  9.0 / 13.5)     12  Add Files to Zip File
0.630  (  3.5 /  5.5)     13  RegExp check for nothing or pattern
0.612  (  7.9 / 12.9)     11  Problem with DBI MySQL (UPDATE command)
0.590  (  7.5 / 12.6)     15  redirect without meta
0.573  (  7.5 / 13.0)     12  sort
0.561  ( 22.0 / 39.3)     26  Please critique this short script that scans a log file
0.544  (  7.4 / 13.6)     20  Determine DaysInMonth($month)
0.531  (  6.5 / 12.3)     12  ticks and FreeBSD
0.525  (  4.4 /  8.3)     10  Signaling another machine
0.457  (  6.5 / 14.2)     11  recursive closures?
0.452  (  9.6 / 21.2)     22  strange results using m//g in while loop...

14 threads (10%) had at least ten posts.

Top 13 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      19  comp.lang.lisp
      19  comp.lang.python
      19  comp.lang.scheme
      19  comp.lang.ruby
       9  comp.databases
       6  linux.redhat.misc
       5  comp.lang.perl.modules
       5  comp.databases.theory
       3  comp.lang.perl
       2  cgi
       2  comp.infosystems.www.authoring
       1  comp.infosystems.www.authoring.cgi
       1  comp.text.xml

Top 20 Crossposters
===================

Articles  Address
--------  -------

       8  "Ragnar Hafstað" <gnari@simnet.is>
       8  "Jürgen Exner" <jurgenex@hotmail.com>
       8  Gunnar Hjalmarsson <noreply@gunnar.cc>
       8  Jesse Tov <tov@eecs.harvREMOVEard.edu>
       8  Xah Lee <xah@xahlee.org>
       8  Pascal Bourguignon <spam@thalassa.informatimago.com>
       6  Jay Tilton <tiltonj@erols.com>
       5  "Fengshui" <test@test.com>
       4  "Paul McGuire" <ptmcg@austin.rr.com>
       4  Rahul Jain <rjain@nyct.net>
       4  Greg Menke <gregm-news@toadmail.com>
       4  Steve Horsley <shoot@the.moon>
       4  "Matt Garrish" <matthew.garrish@sympatico.ca>
       4  Padraig@Linux.ie
       4  "Bill Kelly" <billk@cts.com>
       3  Jeffrey J. Kosowsky <kosowsky@consult.pretender>
       2  "Joe \"Nuke Me Xemu\" Foster" <jlf%40znet%2ecom>
       2  Tim Shoppa <shoppa@trailing-edge.com>
       2  Ed prochak <ed.prochak@magicinterface.com>
       2  James Willmore <jwillmore@remove.adelphia.net>


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

Date: 22 Dec 2003 10:42:54 -0800
From: google@psyonix.com (Dave...)
Subject: Win32: Output to console
Message-Id: <ca5ed830.0312221042.3ba3f667@posting.google.com>

I'm using Perl on a windows machine to automate Visual Studio .NET C++
builds each day. The command I run is the VS commandline program
devenv.exe which outputs log and error information to the console if
run directly on the commandline. For some reason I am unable to
capture or redirect this output to the console when I run the command
from Perl until the entire build is complete. Using system() I get no
ouput at all so I tried the following...

$|=1;
open(COMPILELOG, "$devenvcommand |");
while( <COMPILELOG> )
{
    print;
}
close(COMPILELOG);

This does capture the output, but doesn't print it out until the
entire build is completed instead of outputing during the build. I
also tried adding 2>&1 to the command but it did not help.

Is there a way to output in real time the way it works on the
commandline or could someone explain to me why it cannot be done?

Dave...


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

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.  

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 5969
***************************************


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