[23644] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5851 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 24 09:05:41 2003

Date: Mon, 24 Nov 2003 06:05:06 -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, 24 Nov 2003     Volume: 10 Number: 5851

Today's topics:
    Re: clarification on comment <REMOVEsdnCAPS@comcast.net>
    Re: comments on JAPH? <ThomasKratz@REMOVEwebCAPS.de>
    Re: Comments on parsing solution. <tore@aursand.no>
    Re: from data file into hash slice <noreply@gunnar.cc>
    Re: Newbie question - calling perl from html <charles_dunhill@postmaster.co.uk>
    Re: Newbie question - calling perl from html <charles_dunhill@postmaster.co.uk>
    Re: Newbie question - calling perl from html <charles_dunhill@postmaster.co.uk>
    Re: Newbie Question: Best way to Extract Post Hashes? <REMOVEsdnCAPS@comcast.net>
    Re: Performance problem on SunOS 5.8 <REMOVEsdnCAPS@comcast.net>
        Reading dbf file over network possible? (Vijoy Varghese)
        Statistics for comp.lang.perl.misc <gbacon@hiwaay.net>
        unpack query (Jack Penarth)
    Re: unpack query (Tad McClellan)
    Re: unpack query (Anno Siegel)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 24 Nov 2003 06:29:47 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: clarification on comment
Message-Id: <Xns943D4C62FFEDFsdn.comcast@216.196.97.136>

Default@IO_Error_1011101.xyz wrote in
news:eogwb.12102$yy5.170@nwrdny01.gnilink.net: 

> for example:
> ===========================================
> Default@IO_Error_1011101.xyz wrote:
>> any way i can accomplish this?
> 
> Accomplish what?
> 
>> the initial print never seems to work,
> 
> Work?
> 
>> untill there is another command after the initial print.
>> (\n <stdin> etc..)
> 
> Sorry, don't understand.
> 
> Please (re-)read the posting guidelines
> http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
> and rewrite your question, following the advice in the guidelines.

And you percieved this as nasty and arrogant, somehow?

-- 
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print


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

Date: Mon, 24 Nov 2003 13:04:03 +0100
From: Thomas Kratz <ThomasKratz@REMOVEwebCAPS.de>
Subject: Re: comments on JAPH?
Message-Id: <3fc1f44b.0@juno.wiesbaden.netsurf.de>

Jay Tilton wrote:

> : That's because you are on Win* are you? It will work when you
> : change the 14 in the first line to 15.
> 
> Alternatively, you could tighten up the algorithm so there's room for code
> to detect when it's running in Windows and adjust itself.
> 
> $r=$^O=~/MSWin32/?75:74;open STDIN,"<&DATA";{    #J~.> a>n~>>e~.......>r.
> seek STDIN,$i||=50,0;$_=getc;/\./&&last;/\w| /   #.u.t.^..oP..r.>h>a~.e..
> &&print;$i+=($d=/~/?$r:/\^/?-$r:/>/?1:/</?-1:$d  #.>s^~h<t< ..~. ...c.^..
> ?$d:1);redo}__END__                              #....>>e>r^..>l^...>k^..

That looks at least more elegant than my code ;-) I have to look at what 
it is doing as soon as I get the time.

> 
> Or, more ambitiously, add path corrections to the befunge-like data that
> will steer the "program address" back on course when run under Windows.
> 

Yes that would be cool. Less cool but effective would be counting the 
bytes between the first 2 "#"s for the length of a line. Or - as I said in 
another post - stop using seek altogether and read the lines into an array.

Thanks to all for the comments
Thomas
-- 
open STDIN,"<&DATA";$=+=14;$%=50;while($_=(seek( #J~.> a>n~>>e~.......>r.
STDIN,$:*$=+$,+$%,0),getc)){/\./&&last;/\w| /&&( #.u.t.^..oP..r.>h>a~.e..
print,$_=$~);/~/&&++$:;/\^/&&--$:;/>/&&++$,;/</  #.>s^~h<t< ..~. ...c.^..
&&--$,;$:%=4;$,%=23;$~=$_;++$i==1?++$,:_;}__END__#....>>e>r^..>l^...>k^..



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

Date: Mon, 24 Nov 2003 13:59:26 +0100
From: Tore Aursand <tore@aursand.no>
Subject: Re: Comments on parsing solution.
Message-Id: <pan.2003.11.22.05.36.48.179381@aursand.no>

On Sat, 22 Nov 2003 05:07:26 +0000, Uri Guttman wrote:
>>> Why not simply
>>> 
>>> my @files;
>>> my %seen;
>>> 
>>> ?
>>> Less typing, less chance for typos.

>> You have a point, of course.  My personal style, however, implies that
>> I set each variable when I declare them.  Even if it's not necessary,
>> and even when they're empty.

> my has a runtime effect of clearing variables.

That's right, but you must be a real speed-demon if you're hoping to gain
anything.  But - I guess - a little here and a little there sums up to be
something very big somewhere else. :-)

Just for the fun of it, I benchmark'ed this.  Setting a scalar, an array
and a hash explicit took more than twice the time than "leaving them
alone".


-- 
Tore Aursand <tore@aursand.no>
"A teacher is never a giver of truth - he is a guide, a pointer to the
 truth that each student must find for himself.  A good teacher is
 merely a catalyst." -- Bruce Lee


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

Date: Mon, 24 Nov 2003 12:27:42 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: from data file into hash slice
Message-Id: <bpsqca$1san8c$1@ID-184292.news.uni-berlin.de>

Edo wrote:
> 
>     my @fields = split /,/;

Add a

     chomp @fields;

here.

> prepare (%segment,...);
> sub prepare (\%...) {
>     my ($data, ...) = @_;
> 
>     foreach my $key ( keys %{$data} ) {
>     my $line =  $data->{$key}[0];
> I need the above line to hold v1a,v1b,v1c,v1d,v1e and not just v1a
> when I DB<4>p $line
> so I need to have
> $records{ $fields[1] } = [ splice @fields, 2 ];
> from the above code to push @somting.. man this is hard to explain.

There is already an (anonymous) array with all those values. Maybe you
want

     my $line = join ',', @{$data->{$key}};

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



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

Date: Mon, 24 Nov 2003 12:20:51 GMT
From: Charles <charles_dunhill@postmaster.co.uk>
Subject: Re: Newbie question - calling perl from html
Message-Id: <fz1XdkDgUfw$Ew1G@postmaster.co.uk>

In message <3FC17EA8.50406@rochester.rr.com>, Bob Walton 
<invalid-email@rochester.rr.com> writes

>I think you've got Perl confused with JavaScript.  JavaScript is a 
>feature of most every web browser these days; Perl is not.  JavaScript 
>runs in the client's web browser.  Your Perl script is a CGI script 
>which runs on your web server, not the client's machine.  To access a 
>CGI script from your HTML, you will need to include one or more links 
>in your HTML (usually with either the <a href="../cgi-bin/hello.cgi"> 
>link text </a> or a form with a submit button.  When the user clicks 
>your link or button, your CGI script will run on your server, and its 
>output will go back to the user's browser.  One other thing you can do 
>is have the user input the URL of your CGI script directly, as in 
>perhaps something like http://www.whatever.com/cgi-bin/hello.cgi .

I don't think I explained myself clearly enough, which I thought I had 
by explaining I'd looked at perl scripts for counters, time displays 
etc.  I wanted it to display both lines of text on the same page, not to 
click on it as a separate page.  The examples I looked at, of perl 
scripts, were called via the script tag.

*snip detailed advice - thanks for the info!*

>Note that CGI setup issues are off-topic for this newsgroup (the issues 
>would be the same if the CGI program were written in C , sh, befunge or 
>whatever).  If you have trouble with CGI, follow everything in:
>
>   perldoc -q 500
>
>and then try comp.infosys.www.authoring.cgi .  If you have trouble with 
>Perl, this is the place.

Apologies - will look at the resource and direct my question to the 
correct forum.

Cheers!
-- 
Charles


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

Date: Mon, 24 Nov 2003 12:20:51 GMT
From: Charles <charles_dunhill@postmaster.co.uk>
Subject: Re: Newbie question - calling perl from html
Message-Id: <jCzIx1E7cfw$EwxD@postmaster.co.uk>

In message <Xns943CD6ACEE6D7asu1cornelledu@132.236.56.8>, A. Sinan Unur 
<asu1@c-o-r-n-e-l-l.edu> writes

>commands won't same my but version even work though

I think I get the point you're using - that the same words in a 
different order will be different even though they are the same.  Is 
that correct?

>It seems like you Javascript, server side includes, and CGI are somehow
>jumpled up together in your brain.

What I saw, which prompted me to try it, was a perl script to display 
the time onto a static web page.  They used the script tag to call the 
perl script.

>Slow down and learn each tool (concept, whatever) separately.

I'm not a youngster - too short a life now to slow down.

Thanks for your help anyway.  Another chap has advised this is the wrong 
forum so I'll refer to other resources.

Cheers!
-- 
Charles


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

Date: Mon, 24 Nov 2003 12:23:47 GMT
From: Charles <charles_dunhill@postmaster.co.uk>
Subject: Re: Newbie question - calling perl from html
Message-Id: <4COOhWFPffw$EwT4@postmaster.co.uk>

In message <bprqcs$5j$1$8300dec7@news.demon.co.uk>, Leigh 
<mail@dytron.demon.co.uk> writes

>You can turn your text string into a link to call your Perl script thus:
>
><html>
><body>
><p><a href="../cgi-bin/hello.cgi">This is some text</a></p>
></body>
></html>

I wanted it to display both lines at the same time - this is what I'd 
seen with other perl scripts but couldn't get it to work.

>Note the use of the anchor tag <a>. You use the <script> tag to add code at
>the client (browser), not the server. It should help you get started. Good
>luck.

Thanks for the help.  I'm going to take the advise of the other chaps 
and read other resources before I try again. ;)

Cheers!
-- 
Charles


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

Date: Mon, 24 Nov 2003 06:20:20 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Newbie Question: Best way to Extract Post Hashes?
Message-Id: <Xns943D4AC95E8A8sdn.comcast@216.196.97.136>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

awilhite@cableone.net (Andrew) wrote in
news:9b7dcecd.0311240148.1ce72a0b@posting.google.com: 

> Sorry about the confusion in my wording.   What I was looking for tips
> on how to  automatically detect all necessary post values the form is
> expecting.  For example, When I look at the source code for
> my.yahoo.com,  there are several hidden attributes that it is
> requesting aside form the obvious username and password fields.  I was
> wondering if anyone knew of a module that could help identify these
> hidden values.

Ah. Sounds like you need a module for parsing HTML, such as 
HTML::TokeParser.

- -- 
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBP8H3sGPeouIeTNHoEQIJpQCg2aK/tSBPzeK0N8+uPrMaaElrPdkAoK+b
wWeoC/ZiZYUbNottDhOoNuli
=Eqi2
-----END PGP SIGNATURE-----


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

Date: Mon, 24 Nov 2003 06:22:15 -0600
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Performance problem on SunOS 5.8
Message-Id: <Xns943D4B1C5F714sdn.comcast@216.196.97.136>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

kielhd@freenet.de (kielhd) wrote in news:10a4173d.0311232306.2648e882
@posting.google.com:

> Hi NG,
> I am running a script doing some calculations on a SunOS box. It takes
> about 11hrs to finish.
> When running the same script on WinNT, it takes only 7min!
> I was very surprised about WinNT being app. 100 times faster then
> SunOS and compared the results. The results are the same, so the
> script is working well on both machines.
> I am using perl v5.8.0 and the module Net::Netmask on both machines.
> 
> Could somebody please explain this to me or - even better - give me a
> hint of how to improve the performance on SunOS.
> 
> Best rgds from rainy germany
> Henning

Greetings from rainy Philadelphia, PA.

I'm not aware of any inherent speed differences between perl 
implementations on Windows versus Unix.  You'll have to post more 
specific information (like, the specific code that is showing such a vast 
speed difference).

- -- 
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBP8H4ImPeouIeTNHoEQL+FQCg9U9whDTHmDp06z/enX8Nbxu/7QwAn2kj
2BgwAoq1SR9gSEFRVIeFs2Z0
=ba35
-----END PGP SIGNATURE-----


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

Date: 24 Nov 2003 05:32:03 -0800
From: viijv@thedifferenZ.com (Vijoy Varghese)
Subject: Reading dbf file over network possible?
Message-Id: <4c08aaff.0311240532.20f26fcf@posting.google.com>

Hello Group,

My perl program is on a Mac OSX and the dbf file on a Windows
machine(both networked).
My question is can I perform a DBI->connect("DBI:XBase: ... ") from
the Mac to access the dbf file on Windows machine giving its IP
address? If yes, what will be its format? Do I need any other Perl
networking modules to do so?

Or is there is any other option?

Or is its something IMPOSSIBLE?
Waiting for some help

TIA
Vijoy


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

Date: Mon, 24 Nov 2003 12:33:50 -0000
From: Greg Bacon <gbacon@hiwaay.net>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <vs3ulerb7llfac@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 17 Nov 2003 13:21:04 GMT and ending at
24 Nov 2003 12:23:47 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:  203
Articles: 773 (348 with cutlined signatures)
Threads:  143
Volume generated: 1610.3 kb
    - headers:    709.5 kb (12,954 lines)
    - bodies:     847.7 kb (27,614 lines)
    - original:   508.2 kb (17,760 lines)
    - signatures: 52.3 kb (1,303 lines)

Original Content Rating: 0.600

Averages
========

Posts per poster: 3.8
    median: 2 posts
    mode:   1 post - 93 posters
    s:      11.1 posts
Posts per thread: 5.4
    median: 4 posts
    mode:   2 posts - 27 threads
    s:      6.6 posts
Message size: 2133.2 bytes
    - header:     939.9 bytes (16.8 lines)
    - body:       1123.0 bytes (35.7 lines)
    - original:   673.2 bytes (23.0 lines)
    - signature:  69.3 bytes (1.7 lines)

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

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

   46   116.4 ( 53.7/ 56.6/ 46.4)  tadmc@augustmail.com
   36    63.8 ( 27.1/ 36.7/ 17.0)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   35    89.2 ( 33.1/ 46.8/ 20.9)  Ben Morrow <usenet@morrow.me.uk>
   34    65.1 ( 32.5/ 30.4/ 14.2)  Gunnar Hjalmarsson <noreply@gunnar.cc>
   24    56.2 ( 28.3/ 27.7/ 18.5)  "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
   20    35.3 ( 19.2/ 13.2/ 12.3)  abigail@abigail.nl
   18    37.8 ( 23.0/ 14.8/  8.8)  Edo <eddhig22@yahoo.com>
   17    44.3 ( 16.4/ 27.7/ 14.2)  sholden@cs.usyd.edu.au
   16    33.5 ( 15.7/ 14.2/  6.1)  Uri Guttman <uri@stemsystems.com>
   16    35.5 ( 15.4/ 16.2/  7.2)  James Willmore <jwillmore@remove.adelphia.net>
   15    23.3 ( 11.5/ 11.7/  6.4)  "Tintin" <me@privacy.net>
   14    27.0 ( 11.7/ 15.3/  9.1)  "Ben Liddicott" <ben.liddicott@comodogroup.com>
   14    27.2 ( 11.0/ 12.0/  7.1)  Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
   13    28.1 ( 10.3/ 17.8/  8.8)  Jay Tilton <tiltonj@erols.com>
   13    22.5 ( 12.5/  9.0/  5.7)  Tore Aursand <tore@aursand.no>
   12    26.9 (  8.9/ 17.8/  8.8)  Default@IO_Error_1011101.xyz
   11    25.0 ( 13.2/ 10.8/  5.0)  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
    9    18.8 (  6.0/ 12.8/  6.0)  Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca>
    8    18.1 (  6.8/ 10.0/  6.4)  mgjv@tradingpost.com.au
    8    11.3 (  6.8/  4.5/  2.4)  "Jürgen Exner" <jurgenex@hotmail.com>

These posters accounted for 49.0% of all articles.

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

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

       44   116.4 ( 53.7/ 56.6/ 46.4)  tadmc@augustmail.com
       35    63.8 ( 27.1/ 36.7/ 17.0)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
       34    65.1 ( 32.5/ 30.4/ 14.2)  Gunnar Hjalmarsson <noreply@gunnar.cc>
       34    89.2 ( 33.1/ 46.8/ 20.9)  Ben Morrow <usenet@morrow.me.uk>
       24    56.2 ( 28.3/ 27.7/ 18.5)  "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
       20    35.3 ( 19.2/ 13.2/ 12.3)  abigail@abigail.nl
       17    44.3 ( 16.4/ 27.7/ 14.2)  sholden@cs.usyd.edu.au
       16    33.5 ( 15.7/ 14.2/  6.1)  Uri Guttman <uri@stemsystems.com>
       16    35.5 ( 15.4/ 16.2/  7.2)  James Willmore <jwillmore@remove.adelphia.net>
       14    27.0 ( 11.7/ 15.3/  9.1)  "Ben Liddicott" <ben.liddicott@comodogroup.com>
       14    27.2 ( 11.0/ 12.0/  7.1)  Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
       13    22.5 ( 12.5/  9.0/  5.7)  Tore Aursand <tore@aursand.no>
       13    23.3 ( 11.5/ 11.7/  6.4)  "Tintin" <me@privacy.net>
       13    37.8 ( 23.0/ 14.8/  8.8)  Edo <eddhig22@yahoo.com>
       13    28.1 ( 10.3/ 17.8/  8.8)  Jay Tilton <tiltonj@erols.com>
       11    25.0 ( 13.2/ 10.8/  5.0)  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
       10    26.9 (  8.9/ 17.8/  8.8)  Default@IO_Error_1011101.xyz
        9    18.8 (  6.0/ 12.8/  6.0)  Malcolm Dew-Jones <yf110@vtn1.victoria.tc.ca>
        8    18.1 (  6.8/ 10.0/  6.4)  mgjv@tradingpost.com.au
        8    11.3 (  6.8/  4.5/  2.4)  "Jürgen Exner" <jurgenex@hotmail.com>

These posters accounted for 56.2% of all followups.

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

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

 116.4 ( 53.7/ 56.6/ 46.4)     46  tadmc@augustmail.com
  89.2 ( 33.1/ 46.8/ 20.9)     35  Ben Morrow <usenet@morrow.me.uk>
  65.1 ( 32.5/ 30.4/ 14.2)     34  Gunnar Hjalmarsson <noreply@gunnar.cc>
  63.8 ( 27.1/ 36.7/ 17.0)     36  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
  56.2 ( 28.3/ 27.7/ 18.5)     24  "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
  44.3 ( 16.4/ 27.7/ 14.2)     17  sholden@cs.usyd.edu.au
  37.8 ( 23.0/ 14.8/  8.8)     18  Edo <eddhig22@yahoo.com>
  35.5 ( 15.4/ 16.2/  7.2)     16  James Willmore <jwillmore@remove.adelphia.net>
  35.3 ( 19.2/ 13.2/ 12.3)     20  abigail@abigail.nl
  33.5 ( 15.7/ 14.2/  6.1)     16  Uri Guttman <uri@stemsystems.com>
  29.7 (  1.1/ 28.5/ 28.2)      2  Greg Bacon <gbacon@hiwaay.net>
  28.1 ( 10.3/ 17.8/  8.8)     13  Jay Tilton <tiltonj@erols.com>
  27.2 ( 11.0/ 12.0/  7.1)     14  Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
  27.0 ( 11.7/ 15.3/  9.1)     14  "Ben Liddicott" <ben.liddicott@comodogroup.com>
  26.9 (  8.9/ 17.8/  8.8)     12  Default@IO_Error_1011101.xyz
  25.6 (  5.0/ 20.6/  9.4)      5  "kbass" <kbass@midsouth.rr.com>
  25.0 ( 13.2/ 10.8/  5.0)     11  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
  24.0 (  1.4/ 22.6/ 14.7)      2  John <jguad98@hotmail.com>
  23.3 ( 11.5/ 11.7/  6.4)     15  "Tintin" <me@privacy.net>
  22.5 ( 12.5/  9.0/  5.7)     13  Tore Aursand <tore@aursand.no>

These posters accounted for 52.0% of the total volume.

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

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

   46   46.4  tadmc@augustmail.com
   35   20.9  Ben Morrow <usenet@morrow.me.uk>
   24   18.5  "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
   36   17.0  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   34   14.2  Gunnar Hjalmarsson <noreply@gunnar.cc>
   17   14.2  sholden@cs.usyd.edu.au
   20   12.3  abigail@abigail.nl
   14    9.1  "Ben Liddicott" <ben.liddicott@comodogroup.com>
   13    8.8  Jay Tilton <tiltonj@erols.com>
   18    8.8  Edo <eddhig22@yahoo.com>
   12    8.8  Default@IO_Error_1011101.xyz
   16    7.2  James Willmore <jwillmore@remove.adelphia.net>
   14    7.1  Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
   15    6.4  "Tintin" <me@privacy.net>
   16    6.1  Uri Guttman <uri@stemsystems.com>
   13    5.7  Tore Aursand <tore@aursand.no>
   11    5.0  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>

These posters accounted for 42.5% of the original volume.

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

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

0.927  ( 12.3 / 13.2)     20  abigail@abigail.nl
0.819  ( 46.4 / 56.6)     46  tadmc@augustmail.com
0.666  ( 18.5 / 27.7)     24  "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
0.626  (  5.7 /  9.0)     13  Tore Aursand <tore@aursand.no>
0.594  (  8.8 / 14.8)     18  Edo <eddhig22@yahoo.com>
0.594  (  9.1 / 15.3)     14  "Ben Liddicott" <ben.liddicott@comodogroup.com>
0.590  (  7.1 / 12.0)     14  Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
0.549  (  6.4 / 11.7)     15  "Tintin" <me@privacy.net>
0.512  ( 14.2 / 27.7)     17  sholden@cs.usyd.edu.au
0.495  (  8.8 / 17.8)     13  Jay Tilton <tiltonj@erols.com>
0.493  (  8.8 / 17.8)     12  Default@IO_Error_1011101.xyz
0.468  ( 14.2 / 30.4)     34  Gunnar Hjalmarsson <noreply@gunnar.cc>
0.463  ( 17.0 / 36.7)     36  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
0.461  (  5.0 / 10.8)     11  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
0.445  ( 20.9 / 46.8)     35  Ben Morrow <usenet@morrow.me.uk>
0.444  (  7.2 / 16.2)     16  James Willmore <jwillmore@remove.adelphia.net>
0.427  (  6.1 / 14.2)     16  Uri Guttman <uri@stemsystems.com>

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

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

0.927  ( 12.3 / 13.2)     20  abigail@abigail.nl
0.819  ( 46.4 / 56.6)     46  tadmc@augustmail.com
0.666  ( 18.5 / 27.7)     24  "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
0.626  (  5.7 /  9.0)     13  Tore Aursand <tore@aursand.no>
0.594  (  8.8 / 14.8)     18  Edo <eddhig22@yahoo.com>
0.594  (  9.1 / 15.3)     14  "Ben Liddicott" <ben.liddicott@comodogroup.com>
0.590  (  7.1 / 12.0)     14  Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
0.549  (  6.4 / 11.7)     15  "Tintin" <me@privacy.net>
0.512  ( 14.2 / 27.7)     17  sholden@cs.usyd.edu.au
0.495  (  8.8 / 17.8)     13  Jay Tilton <tiltonj@erols.com>
0.493  (  8.8 / 17.8)     12  Default@IO_Error_1011101.xyz
0.468  ( 14.2 / 30.4)     34  Gunnar Hjalmarsson <noreply@gunnar.cc>
0.463  ( 17.0 / 36.7)     36  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
0.461  (  5.0 / 10.8)     11  "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
0.445  ( 20.9 / 46.8)     35  Ben Morrow <usenet@morrow.me.uk>
0.444  (  7.2 / 16.2)     16  James Willmore <jwillmore@remove.adelphia.net>
0.427  (  6.1 / 14.2)     16  Uri Guttman <uri@stemsystems.com>

17 posters (8%) had at least ten posts.

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

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

   37  regex to convert 1000000 -> 1,000,000 ?
   26  Protecting Source code of a perl script
   19  Creating UNICODE filenames with PERL 5.8
   18  Need some help...
   17  god im a noob
   15  comments on JAPH?
   13  newbie regular expression questions
   13  running a sub inside regex
   12  extract block of text
   12  Project Organization
   12  where is DBI::DWIM?
   11  Inserting the same thing multi times into array.
   11  Comments: locking variables
   11  Comments on parsing solution.
   11  PERL array of arrays
   11  fork question
   10  first line in each file in a dir
   10  bit sequence match
   10  trying to grep a $line for $line...any ideas?
    9  Printing to one x-y co-ord

These threads accounted for 37.3% of all articles.

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

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

  85.6 ( 41.4/ 41.3/ 21.6)     37  regex to convert 1000000 -> 1,000,000 ?
  52.2 ( 23.4/ 27.4/ 16.2)     26  Protecting Source code of a perl script
  46.0 ( 17.3/ 27.1/ 14.0)     19  Creating UNICODE filenames with PERL 5.8
  43.8 (  3.3/ 39.9/ 22.6)      4  trying to understand fork and wait
  37.5 ( 12.1/ 24.4/ 20.9)     13  running a sub inside regex
  35.3 ( 13.3/ 22.1/ 12.9)     10  bit sequence match
  33.9 (  1.9/ 32.0/ 32.0)      2  Posting Guidelines for comp.lang.perl.misc ($Revision: 1.4 $)
  33.5 ( 15.7/ 15.9/  8.1)     18  Need some help...
  30.7 (  7.1/ 23.4/ 10.7)      7  DBI Question
  28.9 ( 14.4/ 13.7/  8.7)     17  god im a noob
  26.9 ( 11.2/ 13.8/  8.3)     12  where is DBI::DWIM?
  26.3 ( 11.7/ 14.1/  6.6)     13  newbie regular expression questions
  25.2 ( 12.7/ 10.2/  5.5)     15  comments on JAPH?
  24.3 (  9.9/ 13.4/  8.3)     11  Comments on parsing solution.
  23.5 ( 11.4/ 11.9/  7.4)     11  Comments: locking variables
  23.0 ( 11.2/ 11.0/  7.0)     12  Project Organization
  22.8 (  9.2/ 13.4/  6.5)     10  trying to grep a $line for $line...any ideas?
  22.5 ( 10.4/ 11.4/  7.1)     12  extract block of text
  20.7 (  9.4/ 10.6/  4.7)      9  MIME::Lite - From email address to name of the company..
  19.4 ( 10.2/  8.7/  5.0)     11  PERL array of arrays

These threads accounted for 41.1% of the total volume.

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

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

0.859  ( 20.9/  24.4)     13  running a sub inside regex
0.634  (  7.0/  11.0)     12  Project Organization
0.633  (  8.7/  13.7)     17  god im a noob
0.619  (  7.1/  11.4)     12  extract block of text
0.618  (  7.4/  11.9)     11  Comments: locking variables
0.618  (  8.3/  13.4)     11  Comments on parsing solution.
0.603  (  8.3/  13.8)     12  where is DBI::DWIM?
0.592  ( 16.2/  27.4)     26  Protecting Source code of a perl script
0.585  ( 12.9/  22.1)     10  bit sequence match
0.573  (  5.0/   8.7)     11  PERL array of arrays
0.568  (  4.1/   7.2)     11  fork question
0.538  (  5.5/  10.2)     15  comments on JAPH?
0.532  (  3.5/   6.5)     10  first line in each file in a dir
0.523  ( 21.6/  41.3)     37  regex to convert 1000000 -> 1,000,000 ?
0.516  ( 14.0/  27.1)     19  Creating UNICODE filenames with PERL 5.8
0.509  (  8.1/  15.9)     18  Need some help...
0.482  (  6.5/  13.4)     10  trying to grep a $line for $line...any ideas?
0.481  (  3.3/   6.8)     11  Inserting the same thing multi times into array.
0.469  (  6.6/  14.1)     13  newbie regular expression questions

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

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

0.859  ( 20.9 / 24.4)     13  running a sub inside regex
0.634  (  7.0 / 11.0)     12  Project Organization
0.633  (  8.7 / 13.7)     17  god im a noob
0.619  (  7.1 / 11.4)     12  extract block of text
0.618  (  7.4 / 11.9)     11  Comments: locking variables
0.618  (  8.3 / 13.4)     11  Comments on parsing solution.
0.603  (  8.3 / 13.8)     12  where is DBI::DWIM?
0.592  ( 16.2 / 27.4)     26  Protecting Source code of a perl script
0.585  ( 12.9 / 22.1)     10  bit sequence match
0.573  (  5.0 /  8.7)     11  PERL array of arrays
0.568  (  4.1 /  7.2)     11  fork question
0.538  (  5.5 / 10.2)     15  comments on JAPH?
0.532  (  3.5 /  6.5)     10  first line in each file in a dir
0.523  ( 21.6 / 41.3)     37  regex to convert 1000000 -> 1,000,000 ?
0.516  ( 14.0 / 27.1)     19  Creating UNICODE filenames with PERL 5.8
0.509  (  8.1 / 15.9)     18  Need some help...
0.482  (  6.5 / 13.4)     10  trying to grep a $line for $line...any ideas?
0.481  (  3.3 /  6.8)     11  Inserting the same thing multi times into array.
0.469  (  6.6 / 14.1)     13  newbie regular expression questions

19 threads (13%) had at least ten posts.

Top 1 Targets for Crossposts
============================

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

      20  comp.lang.perl.modules

Top 14 Crossposters
===================

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

       4  "John B. Kim" <provicon@earthlink.net>
       2  Jim Toth <jtoth@acm.org>
       2  tadmc@augustmail.com
       2  James Willmore <jwillmore@remove.adelphia.net>
       1  David Efflandt <efflandt@xnet.com>
       1  "James E Keenan" <nospam_for_jkeen@concentric.net>
       1  Anand Ramamurthy <anand_ramamurthy@yahoo.com>
       1  "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
       1  Cognition Peon <cenxnfu@rpr.nevmban.rqh>
       1  Gunnar Hjalmarsson <noreply@gunnar.cc>
       1  William Herrera <posting.account@lynxview.com>
       1  "Tintin" <me@privacy.net>
       1  Ben Morrow <usenet@morrow.me.uk>
       1  "Greg Patnude" <gpatnude@adelphia.net>


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

Date: 24 Nov 2003 04:40:06 -0800
From: jackpenarth@aol.com (Jack Penarth)
Subject: unpack query
Message-Id: <f27d1c90.0311240440.7850db1b@posting.google.com>

I use the following code snippet on a file extracted from a
database(fixed length fields)before formatting the output for
printing.

Field3 is the prime record identifier and often contains duplicate
entries. How can I modify my code so that only the first instance
(record) is used and the remaining records ditched?

Code snippet follows:

while (<FILE>) {
 ($field1, $field2, $field3, $field4, $field5, $field6, $field7,
$field7, $field8, $field9, $field10, $field11, $field12, $field13,
$field14, $field15, $field16) = unpack($format1, $_)
write(OUT_PUT);

TIA

John


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

Date: Mon, 24 Nov 2003 07:14:28 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: unpack query
Message-Id: <slrnbs411k.pl8.tadmc@magna.augustmail.com>

Jack Penarth <jackpenarth@aol.com> wrote:

> Field3 is the prime record identifier and often contains duplicate
> entries. How can I modify my code so that only the first instance
> (record) is used and the remaining records ditched?


The way the answer to your Frequently Asked Questions suggests.

   perldoc -q duplicate


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


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

Date: 24 Nov 2003 13:44:55 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: unpack query
Message-Id: <bpt20n$rnv$1@mamenchi.zrz.TU-Berlin.DE>

Jack Penarth <jackpenarth@aol.com> wrote in comp.lang.perl.misc:
> I use the following code snippet on a file extracted from a
> database(fixed length fields)before formatting the output for
> printing.
> 
> Field3 is the prime record identifier and often contains duplicate
> entries. How can I modify my code so that only the first instance
> (record) is used and the remaining records ditched?
> 
> Code snippet follows:
> 
> while (<FILE>) {
>  ($field1, $field2, $field3, $field4, $field5, $field6, $field7,
> $field7, $field8, $field9, $field10, $field11, $field12, $field13,
> $field14, $field15, $field16) = unpack($format1, $_)
> write(OUT_PUT);

There should be a "my" in front of the parenthesis full of variables.
You're not running under strict, are you?  What about warnings?

Instead of single scalars ($field1, ... $field16), it would
be better to use an array "@field".  

Also, there is a semicolon missing after unpack().  Is this really your
code?  Don't re-type code, copy/paste it.

To select unique keys, use a hash to keep track of which you have seen:

    my %seen;
    while ( <FILE> ) {
        my ($field1, $field2, $field3, $field4, $field5, $field6, $field7,
        $field7, $field8, $field9, $field10, $field11, $field12, $field13,
        $field14, $field15, $field16) = unpack($format1, $_);
        next if $seen{ $field3};
        write(OUT_PUT);
        $seen{ $field3} = 1;
    }

Anno


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

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


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