[16669] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4081 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 21 11:10:43 2000

Date: Mon, 21 Aug 2000 08:10:17 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <966870617-v9-i4081@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 21 Aug 2000     Volume: 9 Number: 4081

Today's topics:
    Re: Parsing a variable (Martien Verbruggen)
    Re: Parsing a variable (Martien Verbruggen)
    Re: Parsing a variable (Martien Verbruggen)
    Re: Parsing a variable (B Gannon)
    Re: Parsing a variable (Anno Siegel)
    Re: Parsing a variable (Abigail)
    Re: Parsing a variable (Abigail)
    Re: Perl CGI/forms question <tfm@sei.cmu.edu>
    Re: PERL file handling (Martien Verbruggen)
    Re: PERL file handling (Martien Verbruggen)
    Re: perl's -T switch. <care227@attglobal.net>
    Re: reg exp help (Marcel Grunauer)
    Re: reg exp help <o_dehon@my-deja.com>
        sending mail with mailx <cgibert@tequila-rapido.fr>
    Re: Simple regex problem <care227@attglobal.net>
    Re: Sorting is very slow (Abigail)
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
        udp socket problem aloisious@my-deja.com
    Re: udp socket problem <red_orc@my-deja.com>
        Unpack won't unpack 1A 01 (liitle endian). <eric.kort@vai.org>
    Re: We Need Your Feedback (Anno Siegel)
    Re: Xemacs Perl menu <jhijas@yahoo.es>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 21 Aug 2000 23:00:16 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Parsing a variable
Message-Id: <slrn8q29v0.uou.mgjv@martien.heliotrope.home>

On 21 Aug 2000 12:15:52 GMT,
	B Gannon <admin@kopnews.co.uk> wrote:
> Hello
> 
> I have a varaible $a=mailto:someone@somewhere.com?Subject=Feedback.

That is not valid Perl code, and you shouldn't use $a. It's a variable
with special meaning to Perl.

> How do I split $a into $b=someone@somewhere.com and $c=Feedback

You should also not use $b, for the same reason. $c is ok.

$foo = 'mailto:someone@somewhere.com?Subject=Feedback';
@parts = split /\?/, $foo;

$parts[0] is the first bit, $parts[1] the second. if you _must_ have it
in two variables, and only split into two:

($bar, $baz) = split /\?/, $foo, 2;

Please, read some documentation while you're at it.

Why are $a and $b special?
# perldoc -f sort

What's that split thing?
# perldoc -f split

Why that backslash in front of the question mark?
# perldoc perlre

And you really probably should read some other documentation as well.
You did know that you have some 400,000+ words of perl documentation
installed with perl, right?

# perldoc perl
# perldoc perldoc

or on Windows you should find a perl entry somewhere under your
programs list, if you installed the Activestate version.

If you're just starting, and it seems that way, maybe you should
consider buying a good book on Perl. Start at www.perl.com to get a
list. Andrew Johnson's Elements of Programming with Perl is good.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Little girls, like butterflies, need
Commercial Dynamics Pty. Ltd.   | no excuse - Lazarus Long
NSW, Australia                  | 


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

Date: Mon, 21 Aug 2000 23:19:37 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Parsing a variable
Message-Id: <slrn8q2b39.uou.mgjv@martien.heliotrope.home>

On Mon, 21 Aug 2000 14:40:32 +0200,
	Lincoln Marr <lincolnmarr@nospam.europem01.nt.com> wrote:
> > How do I split $a into $b=someone@somewhere.com and $c=Feedback
> 
> @split = split(/?/,$_);

/?/: ?+*{} follows nothing in regexp at - line 2.

? is a special character in a regexp. You have to escape it.

Besides that, you want to split what's in $a, not what's in $_.

@fields = split /\?/, $a;

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Useful Statistic: 75% of the people
Commercial Dynamics Pty. Ltd.   | make up 3/4 of the population.
NSW, Australia                  | 


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

Date: Mon, 21 Aug 2000 23:35:57 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Parsing a variable
Message-Id: <slrn8q2c1t.uou.mgjv@martien.heliotrope.home>

On Mon, 21 Aug 2000 23:00:16 +1000,
    Martien Verbruggen <mgjv@tradingpost.com.au> wrote:
> On 21 Aug 2000 12:15:52 GMT,
>   B Gannon <admin@kopnews.co.uk> wrote:
> > Hello
> > 
> > I have a varaible $a=mailto:someone@somewhere.com?Subject=Feedback.
> 
> That is not valid Perl code, and you shouldn't use $a. It's a variable
> with special meaning to Perl.
> 
> > How do I split $a into $b=someone@somewhere.com and $c=Feedback
> 
> You should also not use $b, for the same reason. $c is ok.
> 
> $foo = 'mailto:someone@somewhere.com?Subject=Feedback';
> @parts = split /\?/, $foo;

And if I had read better, and not let the word 'split' in the question
lead me, I'd have realised that there is more to do.

($address, $subject) = $foo =~ /^mailto:([^?]+)\?[^=]+=(.+)$/;

That linenoise is described in the perlre documentation:

# perldoc perlre

I'll explain it a bit here:

($address, $subject) = $foo =~
m[
    ^           # anchor at the start
    mailto:     # literal 'mailto:'
    ([^?]+)     # at least one character NOT ? (greedy, capture)
    \?          # literal ?
    [^=]+       # at least one character NOT = (greedy)
    =           # literal =
    (.+)        # at least one character (greedy, capture)
    $           # anchor at the end
]x;

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd.   | you come to the end; then stop.
NSW, Australia                  | 


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

Date: 21 Aug 2000 13:57:38 GMT
From: admin@kopnews.co.uk (B Gannon)
Subject: Re: Parsing a variable
Message-Id: <8nrcgi$j41$1@news.liv.ac.uk>

Thanks that worked great.

In article a says...
>
>B Gannon wrote:
>> 
>> Hello
>> 
>> I have a varaible $a=mailto:someone@somewhere.com?Subject=Feedback.
>> 
>> How do I split $a into $b=someone@somewhere.com and $c=Feedback
>
>my ($b,$c) = $a =~ /mailto:([^\?]+)\?subject=(.*)$/i;
>
>The above may fail if the format of your variable is not always like
>the example.  Specifically, It assmes a 'mailto:' immediately
>followed by something of interest.  As soon as a '?' is encountered,
>that thing of interest is at an end, and it expects to find that
>'?', followed by 'subject=' and then a final thing of interest that
>extends to the end of the string.
>
>
>Kirk Haines



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

Date: 21 Aug 2000 14:10:42 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Parsing a variable
Message-Id: <8nrd92$uoa$1@lublin.zrz.tu-berlin.de>

B Gannon <admin@kopnews.co.uk> wrote in comp.lang.perl.misc:
>Hello
>
>I have a varaible $a=mailto:someone@somewhere.com?Subject=Feedback.
>
>How do I split $a into $b=someone@somewhere.com and $c=Feedback

You cannot state a problem by just giving an example of input
and output.  You *must* give us the reasoning that leads from
the input to the output, as well as how the input may vary and
how that is supposed to influence the output.  Otherwise you are
likely to receive correct but useless answers like 

  $b = 'someone@somewhere.com'; $c = 'Feedback';

If, however, someone attempt a serious reply, you are burdening
them with a lot of guesswork about what you really mean.  Just
look through the other replies in this thread, and how they abound
with "I assume you mean..." and "but if it's also possible that...".

In other words, if you want help, invest some time to describe
the problem you want to solve, instead of leaving to the reader
the burden of figuring out what you want to do.

Anno "I want it to print 'n<=2' given 'a**n + b**n = c**n'" Siegel


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

Date: 21 Aug 2000 14:45:53 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Parsing a variable
Message-Id: <slrn8q2g3p.tj3.abigail@alexandra.foad.org>

B Gannon (admin@kopnews.co.uk) wrote on MMDXLVII September MCMXCIII in
<URL:news:8nr6ho$h0k$1@news.liv.ac.uk>:
)) Hello
)) 
)) I have a varaible $a=mailto:someone@somewhere.com?Subject=Feedback.
)) 
)) How do I split $a into $b=someone@somewhere.com and $c=Feedback


    ($b => $c) = (split /mailto:|\?Subject=/ => $a) [1 => 2];


Abigail
-- 
perl -weprint\<\<EOT\; -eJust -eanother -ePerl -eHacker -eEOT


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

Date: 21 Aug 2000 14:50:28 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Parsing a variable
Message-Id: <slrn8q2gcc.tj3.abigail@alexandra.foad.org>

Lincoln Marr (lincolnmarr@nospam.europem01.nt.com) wrote on MMDXLVII
September MCMXCIII in <URL:news:8nr7v8$3en$1@qnsgh006.europe.nortel.com>:
][ > How do I split $a into $b=someone@somewhere.com and $c=Feedback
][ 
][ @split = split(/?/,$_);
][ $b = $split[0];
][ $c = $split[1];

3 mistakes:
  * a syntax error in the regex (you need to escape the ?).
  * it splits $_ not $a.
  * it doesn't get rid of 'mailto:' nor of 'Subject='.

Furthermore, there's no point to use the @split array. You can just do a
list assignment.



Abigail
-- 
tie $" => A; $, = " "; $\ = "\n"; @a = ("") x 2; print map {"@a"} 1 .. 4;
sub A::TIESCALAR {bless \my $A => A} #  Yet Another silly JAPH by Abigail
sub A::FETCH     {@q = qw /Just Another Perl Hacker/ unless @q; shift @q}


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

Date: Mon, 21 Aug 2000 09:43:03 -0400
From: Ted Marz <tfm@sei.cmu.edu>
Subject: Re: Perl CGI/forms question
Message-Id: <39A131E7.3F95A397@sei.cmu.edu>

My understanding is that it is not so much a security issue, but a
configuration management issue.

Rather than having to maintain 2 items (a chunk of HTML, and a
processing program), you only have to maintain 1 item, which happens to
be both.  This way you know that the form and the form processor are in
sync with each other.

Someone can always create a different input document and try to route
this into your processing script... there is (in general) no way to keep
this from happening.  So, all you can do is do a complete job of
verifying your input.

There are other security problems with CGI, if I remember correctly. 
Seems that there was a way you could format a combined string, and part
of it would be executed by a script processor, and part could be
executed by the shell under the webservers permissions.  I didn't look
into this in detail, and haven't kept up to date, so I may be completely
off base.

Ted


arctic@pdinnen.plus.com wrote:
> 
> ATM i am working on a project, a simple form with some Perl (Win32)
> scripted validation writing to a flat file. This project involves my
> looking at security issues, which i haven't got much experience in. I
> have looked at various FAQs, including: -
> 
> http://www.go2net.com/people/paulp/cgi-security/safe-cgi.txt
> http://www.perl.com/CPAN-local/doc/FAQs/cgi/wwwsf1.html
> 
> I would be interested in any other useful CGI/Perl security resources
> thart people can reccomend.
> 
> My specific query is regarding the use of HTML forms. The scripts that
> i have inherited generate the HTML of the form page from within the
> script and then process the returned data within the same script. As
> far as i can see it would be simpler to write the form as a straight
> HTML page and only use Perl to validate and store the data. However i
> might be missing something, can anyone suggest any security benefits to
> either of these methods.
> 
> Thanks, Patrick Dinnen
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.


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

Date: Mon, 21 Aug 2000 22:42:54 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: PERL file handling
Message-Id: <slrn8q28ue.uou.mgjv@martien.heliotrope.home>

On Mon, 21 Aug 2000 06:04:55 GMT,
	srikdvs@my-deja.com <srikdvs@my-deja.com> wrote:
> I am using a PERL script to split an input file.What is the maximum
> file size that PERL can handle?When I used a 3.6GB file the script
> failed.What is the alternative for handling such big files??

Depends on how it's compiled, and probably the version. Mine says:

[wrapped for readability]

# perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=linux, osvers=2.2.12-20, archname=i686-linux
    uname='linux martien 2.2.12-20 
            #1 mon sep 27 10:40:35 edt 1999 i686 unknown '
    config_args='-des -Dprefix=/opt/perl'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef 
            usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
	                             ^^^^^^^^^^^^^^^^^^^^

If yours says the same, then it should be able to handle that file. What
is your perl version, platform, and how was perl compiled?

How are you 'using' that file anyway?

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | The gene pool could use a little
Commercial Dynamics Pty. Ltd.   | chlorine.
NSW, Australia                  | 


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

Date: Mon, 21 Aug 2000 23:07:55 +1000
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: PERL file handling
Message-Id: <slrn8q2adb.uou.mgjv@martien.heliotrope.home>

[reordered post to respect natural arrow of time]
[reformatted post to wrap sanely]

On Mon, 21 Aug 2000 12:06:58 GMT, srikdvs@my-deja.com
	<srikdvs@my-deja.com> wrote:
> In article <8nr34f$13c$1@qnsgh006.europe.nortel.com>, "Lincoln Marr"
> <lincolnmarr@nospam.europem01.nt.com> wrote:
> >
> > > I am using a PERL script to split an input file.What is the
> > > maximum file size that PERL can handle?When I used a 3.6GB file
> > > the script failed.What is the alternative for handling such big
> > > files??
> >
> > Following the philosophy of perl (no limits) the perl itself can
> > handle whatever you throw at it - the only limit on the size of
> > files you can read in is the physical amount of memory on the
> > computer. In this case it seems like your computer is running out of
> > memory (are you sure it's a 3.6 gigabyte file?? That seems damn big
> > to me).  I'm no perl expert myself but I'll assume you are using the
> > diamond operator to read in the file, line by line. I think there
> > are alternatives to this but I'm not sure what they are - maybe
> > someone else can help out?
>
> Memory is not a problem as the application is running on UNIX box and
> not on a PC.

Are you saying Unix has an infinite amount of memory? There are very few
Unix (and clone) machines that will be able to deal with

open(LARGE, 'large_file.3.6.GB') or die $!;
@foo = <LARGE>;
close LARGE;

that will require at least 3.6 GB of virtual memory, and more likely a
lot more, given that this is Perl[1]. Maybe you should show us a very
little tiny snippet of code that you use to access that file, as well as
answering those other questions that I asked in a separate post in this
thread. If you do indeed have 5+ GB of internal memory, you might get
away with the above, but I'd be surprised if it was necessary, and I am
almost certain that it's a bad thing to do.

If you do

open(LARGE, 'large_file.3.6.GB') or die $!;
while(<LARGE>)
{
# ...
}
close LARGE;

and you haven't fiddled with $/, you should need much memory. If you do
this, do you process part of the file before the failure? Is there an
error message?

You want us to help you. Maybe you should provide some more information.

Martien

[1] The same holds true for other platforms, including win32 (NT does
support 3.6 GB files, doesn't it?).
-- 
Martien Verbruggen              | My friend has a baby. I'm writing
Interactive Media Division      | down all the noises the baby makes so
Commercial Dynamics Pty. Ltd.   | later I can ask him what he meant -
NSW, Australia                  | Steven Wright


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

Date: Mon, 21 Aug 2000 10:01:41 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: perl's -T switch.
Message-Id: <39A13645.94BDC1@attglobal.net>

Abigail wrote:
> 
> Drew Simonis (care227@attglobal.net) wrote on MMDXLIV September MCMXCIII
> in <URL:news:399DAB51.8D5DF8A0@attglobal.net>:
> ][ Jordan Katz wrote:
> ][ >
> ][ >       my $url = shift;
> ][
> ][ Tainted.
> 
> Probably. But not because of this statement. In the posted program, the
> above line never gets executed.

I thought that any data from the shift function was immediately 
considered tainted?  Or is it only if that data is used to act 
on an external file or process?  

Also, why does the line not get executed?  (I am assuming that the 
real code has data being passed to that sub.  Are you not making
that assumption?)


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

Date: Mon, 21 Aug 2000 13:14:00 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: reg exp help
Message-Id: <slrn8q2ao1.3rs.marcel@gandalf.local>

On Mon, 21 Aug 2000 12:17:55 GMT, a94eribe@my-deja.com
<a94eribe@my-deja.com> wrote:

>I need to check that the user submitted a correct swedish postal code.
>The rules is the following:
>
>1. It should either be 5 or 6 characters
>2. If it is 6 characters, character no 4 should be a white space.
>3. It should only contain digits.


    while (<DATA>) {
	    print;
	    print "ok\n" if /^\d\d\d ?\d\d$/;
    }

    __DATA__
    12345
    123 56
    123 567
    123
    123456
    1234 678
    1 345 78

recognizes the first two as ok.


-- 
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . .  <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();


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

Date: Mon, 21 Aug 2000 13:12:41 GMT
From: Olivier Dehon <o_dehon@my-deja.com>
Subject: Re: reg exp help
Message-Id: <8nr9rq$8tv$1@nnrp1.deja.com>

In article <8nr6l8$5f8$1@nnrp1.deja.com>,
  a94eribe@my-deja.com wrote:
> Hi
>
> I´m new to regular expressions and I would like some help.
>

I would suggest reading 'perldoc perlre' then, as a starting point,
and if you can afford it, read "Mastering Regular Expressions", by
Jeffrey Friedl.

> I need to check that the user submitted a correct swedish postal code.
> The rules is the following:
>
> 1. It should either be 5 or 6 characters
> 2. If it is 6 characters, character no 4 should be a white space.
> 3. It should only contain digits.
>

Rule 3 makes rule 2 useless. A white space is not a digit...

> How would the notation for that be?

If I interpret the rules correctly, you can try:

$postcode =~ /^\d\d\d\s?\d\d$/;

-Olivier


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 21 Aug 2000 15:41:39 +0200
From: tequila <cgibert@tequila-rapido.fr>
Subject: sending mail with mailx
Message-Id: <39A13193.F08AF511@tequila-rapido.fr>

I have a problem with mailx.
I must use this program on solaris with perl and It doesn't work (mail
is not sent although the syntax  I use works for sendmail on Unix)
Do you know  what's wrong with it...

Thank you

sub send_email
{
  local ($from,$to,$subject,$contenu)=@_;
  if (open (MAIL, "/usr/bin/mailx -t"))
  {
    print MAIL "To: $to\n";
    print MAIL "From: $from\n";
    print MAIL "Subject: $subject\n";
    print MAIL "MIME-Version: 1.0\n";
    print MAIL "Content-Type: text/plain; charset=ISO-8859-1\n";
    print MAIL "Content-Transfer-Encoding: 8bit\n";
    print MAIL "\n";
    print MAIL "$contenu \n";
    close (MAIL);
  }
  else
  {
    &message("Sorry \! <br>Mail could not been sent.");
  }
  1;
}
With this classical syntax, I always obtain a "Mail could not been
sent"...
Christophe Gibert



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

Date: Mon, 21 Aug 2000 10:11:02 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Simple regex problem
Message-Id: <39A13876.9CC17B11@attglobal.net>

Keith Calvert Ivey wrote:
> 
> Drew Simonis <care227@attglobal.net> wrote:
> 
> >why not just use split()?
> >
> >($header, $footer) = split /\n\n/, $variable;
> 
> It's not a footer, it's the body of an e-mail message, and it's
> likely to contain multiple paragraphs, which your solution will
> discard.  Add a third argument to split():
> 
>     ($header, $body) = split /\n\n/, $variable, 2;
> 

Yeah, my bad there.  I cut/paste from my response to his other post
regarding this same question, in which he didn't specify that it 
was an e-mail message.


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

Date: 21 Aug 2000 14:08:35 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Sorting is very slow
Message-Id: <slrn8q2dtr.tj3.abigail@alexandra.foad.org>

John P. Linderman (jpl@research.att.com) wrote on MMDXLVII September
MCMXCIII in <URL:news:39A0F863.71A12362@research.att.com>:
-: 
-: Sorry, I meant perl, not Perl.  I'm not comfortable enough with
-: perlguts to allocate and deallocate the extra pointers.  Short of
-: that, I think it's close to being drop-in-able.
-: 
-: Heap sort isn't likely to win over merge sort for two reasons.
-: As elements sift down the (logN depth) heap, there are 2
-: comparisons at each node, one to find the lesser subnode,
-: the other to compare it with the sift-down element.
-: That results in roughly twice as many comparisons
-: as merge-sort.   Furthermore, the typical heap layout
-: is a bit of a cache-buster.  As you sift down the heap,
-: you're all over memory.  Merge sort and qsort are much
-: kinder to caches.
-: 
-: If you don't do something to stop me, I'll mail you the
-: merge-based sort for perl.  Maybe it will never go in,
-: but it ABSOLUTELY won't go in if it's never tried.


Well, I don't have the tuits to modify it such that it could be put in
the core - I've stayed away from modifying perl as I don't like C at all.

To have it have any chance ever going to be in the perl core, it should
a) be a working patch, and b) one should have sufficient benchmark material
showing it's indeed an improvement.

Although I could imagine it being a configuration option:

    Do you want perl to use quicksort or mergesort [quicksort]?

Further (serious) discussion of this should be addressed to the p5p
mailing list.


Abigail
-- 
map{${+chr}=chr}map{$_=>$_^ord$"}$=+$]..3*$=/2;        
print "$J$u$s$t $a$n$o$t$h$e$r $P$e$r$l $H$a$c$k$e$r\n";


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

Date: Mon, 21 Aug 2000 13:34:12 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <sq2buktn87v49@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 14 Aug 2000 14:36:32 GMT and ending at
21 Aug 2000 14:18:14 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) 2000 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

Totals
======

Posters:  492
Articles: 1677 (666 with cutlined signatures)
Threads:  429
Volume generated: 2990.1 kb
    - headers:    1309.8 kb (26,403 lines)
    - bodies:     1595.7 kb (51,205 lines)
    - original:   1016.4 kb (35,119 lines)
    - signatures: 82.9 kb (2,009 lines)

Original Content Rating: 0.637

Averages
========

Posts per poster: 3.4
    median: 1.0 post
    mode:   1 post - 271 posters
    s:      7.2 posts
Posts per thread: 3.9
    median: 3 posts
    mode:   1 post - 107 threads
    s:      4.6 posts
Message size: 1825.8 bytes
    - header:     799.8 bytes (15.7 lines)
    - body:       974.4 bytes (30.5 lines)
    - original:   620.6 bytes (20.9 lines)
    - signature:  50.6 bytes (1.2 lines)

Top 10 Posters by Number of Posts
=================================

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

   78   135.2 ( 68.8/ 58.6/ 24.0)  Jonathan Stowe <gellyfish@gellyfish.com>
   53    90.5 ( 34.3/ 50.2/ 25.8)  Larry Rosler <lr@hpl.hp.com>
   40    82.1 ( 29.3/ 52.7/ 40.8)  Colin Keith <newsgroups@ckeith.clara.net>
   38    77.4 ( 27.6/ 43.9/ 40.3)  abigail@foad.org
   37    89.0 ( 30.3/ 51.5/ 34.0)  mgjv@tradingpost.com.au
   37    51.4 ( 29.4/ 21.9/  8.6)  Drew Simonis <care227@attglobal.net>
   34    52.9 ( 24.7/ 25.7/ 15.9)  nobull@mail.com
   34    63.1 ( 31.6/ 30.1/ 13.4)  jason <elephant@squirrelgroup.com>
   29    43.1 ( 21.2/ 20.4/ 11.9)  Keith Calvert Ivey <kcivey@cpcug.org>
   28    47.0 ( 18.4/ 28.6/ 13.1)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>

These posters accounted for 24.3% of all articles.

Top 10 Posters by Volume
========================

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

 135.2 ( 68.8/ 58.6/ 24.0)     78  Jonathan Stowe <gellyfish@gellyfish.com>
  90.5 ( 34.3/ 50.2/ 25.8)     53  Larry Rosler <lr@hpl.hp.com>
  89.0 ( 30.3/ 51.5/ 34.0)     37  mgjv@tradingpost.com.au
  82.1 ( 29.3/ 52.7/ 40.8)     40  Colin Keith <newsgroups@ckeith.clara.net>
  77.4 ( 27.6/ 43.9/ 40.3)     38  abigail@foad.org
  75.0 (  4.3/ 70.7/ 51.5)      6  "Dr. Peter Dintelmann" <Peter.Dintelmann@dresdner-bank.com>
  63.1 ( 31.6/ 30.1/ 13.4)     34  jason <elephant@squirrelgroup.com>
  57.5 ( 20.5/ 36.9/ 28.1)     25  "Godzilla!" <godzilla@stomp.stomp.tokyo>
  52.9 ( 24.7/ 25.7/ 15.9)     34  nobull@mail.com
  51.4 ( 29.4/ 21.9/  8.6)     37  Drew Simonis <care227@attglobal.net>

These posters accounted for 25.9% of the total volume.

Top 10 Posters by OCR (minimum of five posts)
==============================================

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

0.962  (  3.2 /  3.3)      5  fgont@my-deja.com
0.917  ( 40.3 / 43.9)     38  abigail@foad.org
0.903  (  7.2 /  7.9)      7  BUCK NAKED1 <dennis100@webtv.net>
0.773  ( 40.8 / 52.7)     40  Colin Keith <newsgroups@ckeith.clara.net>
0.772  (  9.8 / 12.6)     19  Mark-Jason Dominus <mjd@plover.com>
0.768  (  3.7 /  4.8)      7  Bart Lateur <bart.lateur@skynet.be>
0.767  ( 24.5 / 31.9)     25  Greg Bacon <gbacon@cs.uah.edu>
0.765  (  1.6 /  2.1)      5  David H. Adler <dha@panix.com>
0.761  (  8.6 / 11.3)     14  "Alan J. Flavell" <flavell@mail.cern.ch>
0.760  ( 28.1 / 36.9)     25  "Godzilla!" <godzilla@stomp.stomp.tokyo>

Bottom 10 Posters by OCR (minimum of five posts)
=================================================

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

0.425  (  3.3 /  7.9)     12  Erik van Roode <newsposter@cthulhu.demon.nl>
0.409  ( 24.0 / 58.6)     78  Jonathan Stowe <gellyfish@gellyfish.com>
0.402  (  7.3 / 18.2)     12  Bob Walton <bwalton@rochester.rr.com>
0.395  (  8.6 / 21.9)     37  Drew Simonis <care227@attglobal.net>
0.389  (  0.6 /  1.5)      5  "chris" <jemand@klop.com>
0.387  (  0.8 /  2.1)      5  Tom Briles <sariq@texas.net>
0.385  (  3.4 /  8.8)      8  Ala Qumsieh <aqumsieh@hyperchip.com>
0.374  (  4.3 / 11.5)     12  Teodor Zlatanov <tzz@iglou.com>
0.311  (  1.2 /  3.9)      5  "Brendon Caligari" <bcaligari@shipreg.com>
0.193  (  0.5 /  2.8)      6  bmetcalf@nortelnetworks.com

70 posters (14%) had at least five posts.

Top 10 Threads by Number of Posts
=================================

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

   24  Regex Alternation Question
   20  Eval and Regexps Help
   20  obfusicate routine to count max string len in hash
   19  Sorting is very slow
   17  Perl - Blinking Text
   16  Perl code for a newbie!!
   16  Array Printing
   15  Following Hyperlinks with cgi
   15  perl 5.6
   15  Checking if variables exist

These threads accounted for 10.6% of all articles.

Top 10 Threads by Volume
========================

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

  79.9 (  5.5/ 74.1/ 53.1)      7  Problem with IIS4
  48.5 ( 18.6/ 28.7/ 19.0)     24  Regex Alternation Question
  47.7 ( 15.0/ 30.5/ 22.1)     19  Sorting is very slow
  38.2 ( 13.2/ 24.5/ 12.5)     15  Checking if variables exist
  34.9 ( 12.2/ 22.5/ 14.1)     14  Out of memory! error. Working with arrays...
  33.4 ( 16.8/ 15.6/  8.7)     20  Eval and Regexps Help
  32.7 ( 16.5/ 14.8/  8.3)     20  obfusicate routine to count max string len in hash
  31.2 ( 12.6/ 18.1/ 11.7)     15  Certain Items in a string
  30.5 ( 12.3/ 17.7/ 11.4)     15  cross platform newline processing
  29.0 ( 16.6/ 11.6/  6.0)     16  Perl code for a newbie!!

These threads accounted for 13.6% of the total volume.

Top 10 Threads by OCR (minimum of five posts)
==============================================

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

0.894  (  2.1/   2.4)      5  perl's -T switch.
0.862  ( 15.3/  17.7)      6  Can't call a script from html created by another script
0.833  (  5.0/   6.0)      5  Script skipping a section!?!?
0.805  (  4.6/   5.7)     10  Perfect Place to find Perl Jobs
0.770  (  5.9/   7.7)      7  Pattern match - Extract info from a page
0.765  (  2.4/   3.2)      5  try & catch
0.743  (  4.1/   5.5)      7  cookie problem
0.743  (  4.8/   6.5)      5  Help in Parsing
0.743  (  2.7/   3.6)      6  Grabbing ALL parameters in a cgi script
0.742  (  2.2/   3.0)      5  Open Multiple Files

Bottom 10 Threads by OCR (minimum of five posts)
=================================================

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

0.454  (  2.3 /  5.0)      7  translating tr/a-z/A-Z/ best or s/.....
0.451  (  1.9 /  4.2)      5  readdir in order by date
0.449  (  6.3 / 14.0)      9  tag parsing.
0.415  (  3.2 /  7.8)      6  setting up a cgi directory
0.414  (  3.3 /  8.0)      9  help foreach doesn't work
0.394  (  1.9 /  4.9)      9  regex
0.394  (  2.3 /  5.8)      5  Passing argument to Perl script
0.377  (  2.7 /  7.2)      8  need help with msql and perl
0.352  (  1.7 /  4.8)      5  HELP: TEXTAREA field and newlines
0.342  (  1.1 /  3.4)      6  array weirdness.

119 threads (27%) had at least five posts.

Top 10 Targets for Crossposts
=============================

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

      18  comp.lang.perl
      14  alt.perl
       9  comp.lang.perl.modules
       6  comp.mail.misc
       5  comp.lang.perl.tk
       3  comp.os.linux.misc
       3  de.comp.lang.perl.misc
       3  de.comp.lang.perl.cgi
       3  comp.mail.sendmail
       2  news.answers

Top 10 Crossposters
===================

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

       6  "Alexander" <thewarehouse@europe.com>
       4  Astrid Behrens <behrens@haulpak.com>
       4  amonotod <amonotod@netscape.net>
       3  Eli the Bearded <elijah@workspot.net>
       3  Tom Phoenix <rootbeer&pfaq*finding*@redcat.com>
       2  "J. Strübig" <struebig@mail.uni-mainz.de>
       2  jari.aalto@poboxes.com
       2  Greg Bacon <gbacon@cs.uah.edu>
       2  Tony Curtis <tony_curtis32@yahoo.com>
       2  jkline@one.net


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

Date: Mon, 21 Aug 2000 14:00:52 GMT
From: aloisious@my-deja.com
Subject: udp socket problem
Message-Id: <8nrcm8$cac$1@nnrp1.deja.com>

I'm having trouble getting two ends of a udp connection working.
The "listener" complains:
    Argument "SOCK_DGRAM" isn't numeric in socket at
    /usr/local/lib/perl5/5.6.0/sun4-solaris/IO/Socket.pm line 74.
    Could not create socket: Protocol not supported

I had these scripts talking to one-another using tcp protocol and
SOCK_STREAM type, then I changed to udp and SOCK_DGRAM and it fails.
The OS is Solaris 2.7.

suggestions?


## Here's the "listener":
#! /usr/local/bin/perl -w
use strict;
use IO::Socket;
my $sock = IO::Socket::INET->new (
                                 PeerAddr => 'localhost',
                                 PeerPort => '4321',
                                 LocalAddr => 'localhost',
                                 LocalPort => '4321',
                                 Proto => 'udp',
                                 Type => 'SOCK_DGRAM',
                                 Listen => 5,
                                 Reuse => 1,
                                );
die "Could not create socket: $!\n" unless $sock;
my $new_sock = $sock->accept();
while(<$new_sock>) {
   print;
}

## here's the "sender":
#! /usr/local/bin/perl -w
use strict;
use IO::Socket;
$|=1;
my $sock = IO::Socket::INET->new (
                                 PeerAddr => 'localhost',
                                 PeerPort => '4321',
                                 LocalAddr => 'localhost',
                                 LocalPort => '4321',
                                 Proto => 'udp',
                                );
die "Could not create socket: $!\n" unless $sock;
$sock->autoflush(1);
print $sock "\n\rHello World!\n\r";
close($sock);
## end


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 21 Aug 2000 14:28:45 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: udp socket problem
Message-Id: <8nrea6$ebd$1@nnrp1.deja.com>

In article <8nrcm8$cac$1@nnrp1.deja.com>,
  aloisious@my-deja.com wrote:
> I'm having trouble getting two ends of a udp connection working.
> The "listener" complains:
>     Argument "SOCK_DGRAM" isn't numeric in socket at
>     /usr/local/lib/perl5/5.6.0/sun4-solaris/IO/Socket.pm line 74.
>     Could not create socket: Protocol not supported
>
> I had these scripts talking to one-another using tcp protocol and
> SOCK_STREAM type, then I changed to udp and SOCK_DGRAM and it fails.
> The OS is Solaris 2.7.
>
> suggestions?
>
> ## Here's the "listener":
> #! /usr/local/bin/perl -w
> use strict;
> use IO::Socket;
> my $sock = IO::Socket::INET->new (
>                                  PeerAddr => 'localhost',
>                                  PeerPort => '4321',
>                                  LocalAddr => 'localhost',
>                                  LocalPort => '4321',
>                                  Proto => 'udp',
>                                  Type => 'SOCK_DGRAM',

Type is supposed to be numeric, as the error message indicates.  You are
sending the string 'SOCK_DGRAM'.


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 21 Aug 2000 10:35:37 -0400
From: "Eric" <eric.kort@vai.org>
Subject: Unpack won't unpack 1A 01 (liitle endian).
Message-Id: <8nremk$t0f$1@msunews.cl.msu.edu>

Hello.  I am writing a program to manipulate data from tiff graphics files.
In unpacking the 2-byte "tags" that mark the various data fields within the
file, I cannot unpack 1A 01 (little endian, = 282 decimal).

Here is the code:

$lookup = read(tiff_file, $vector, 2);
$tag = unpack("v", $vector);

This works properly for all the tags (mostly numbers between 100 and 300),
but I get a blank when the tag is 282.  Could it be related to the fact that
the first byte (1A) is the ASCII code for end of file?

So how can I successfully return the number 282 from unpacking 2 bytes of
binary data?




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

Date: 21 Aug 2000 14:52:28 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: We Need Your Feedback
Message-Id: <8nrfnc$urp$1@lublin.zrz.tu-berlin.de>

Paul R. Andersen <panderse@us.ibm.com> wrote in comp.lang.perl.misc:
>waseema@my-deja.com wrote:
 
>> Please visit http://www.XXXXXX.com
 
>When the first page of something that claims to be big time has multiple
>instances of bad grammar (poor sentence construction, missing commas,
>and so on), I figure the rest of the pages are not going to be worth
>exploring.  Hire an English major to review and correct your pages. 

Oh, I know of a Professor of English who'd love toNO CARRIER

Anno


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

Date: Mon, 21 Aug 2000 16:37:03 +0200
From: Javier Hijas <jhijas@yahoo.es>
To: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Xemacs Perl menu
Message-Id: <39A13E8F.3E1DF61C@yahoo.es>

where can I find cperl-mode.el and mode-compile.el?

Jeff Zucker wrote:
> 
> Javier Hijas wrote:
> >
> > How can I switch on all the Perl tools I find there?, some of them as
> > "run", "syntax"... are always off.
> 
> Dunno about Xemacs, but in Gnu Emacs, installing and byte-compiling
> cperl-mode.el and mode-compile.el did the trick for me.
> 
> --
> Jeff


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

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


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 4081
**************************************


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