[11487] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5087 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 8 11:07:22 1999

Date: Mon, 8 Mar 99 08:00:22 -0800
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, 8 Mar 1999     Volume: 8 Number: 5087

Today's topics:
        &subreadparse problem <brandeda@se.bel.alcatel.be>
    Re: .ASP Post using LWP unsolved. <matthew.sergeant@eml.ericsson.se>
    Re: .ASP Post using LWP unsolved. (Bill Moseley)
    Re: ADO, OLE on WinNT <noel.sant@icl.com>
    Re: ADO, OLE on WinNT <noel.sant@icl.com>
    Re: Array of Array???? <yfang@gte.com>
    Re: Array of Array???? <yfang@gte.com>
    Re: Array of Array???? <yfang@gte.com>
    Re: Array of Array???? <yfang@gte.com>
    Re: Array of Array???? <yfang@gte.com>
    Re: Array of Array???? <yfang@gte.com>
    Re: Array of Array???? <yfang@gte.com>
    Re: cgi and forms (Bill Moseley)
    Re: Combining Files (Tad McClellan)
    Re: dbm open <ebohlman@netcom.com>
        FAQ 3.3: Is there a Perl shell?   <perlfaq-suggestions@perl.com>
        getpwuid  vs. shadow-passwds (Miss Parker)
    Re: How to convince others using perl instead bourne sc <gaa@garnet.dgms.com>
    Re: How to do a Case-insensitive Sort? (Greg Bacon)
    Re: mod_perl + Net::PH => persistant DB connection? <david@sa.nomade.fr>
    Re: MS ACCESS database with perl (Jonathan Stowe)
    Re: need place to start (Tad McClellan)
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: newbie problem with *s (regular expression matching (Tad McClellan)
    Re: OLE, DBI-ODBC conflicts? <lynn@swcp.com>
        Sorry, mail server wrong... <yfang@gte.com>
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: system()/print question (Jake)
        Tied filehandles and Storable <Jochen.Stenzel.gp@icn.siemens.de>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 08 Mar 1999 16:08:25 +0100
From: David Van den Brande <brandeda@se.bel.alcatel.be>
Subject: &subreadparse problem
Message-Id: <36E3E7E9.CCA19CC6@se.bel.alcatel.be>

Hello,

I've problem getting the values back from my HTML form.
With the &subreadparse function I use I get just the following back:

  2:
  5:
  1:

But what I want is (depending from what is selected):

  1:214-32775-TCAA-DT-_03
  2:214-33164-WRAA-DT-_02
  5:215-47629-WRAA-DT-_01

Can anyone help me with this (I suppose) simple problem?
Thanks in advance,
David

Below you'll find the HTML form source and the perl script:

<HTML><BODY>
<form method="post" action="http://.../cgi-bin/newcustpage.cgi">
<TABLE border>
<TR>
<TD><INPUT TYPE="radio" value="NONE" name="1">NONE
<INPUT TYPE="radio" name="1" value="214-32775-TCAA-DT-_03">_03</TD>
<TD>1</TD>
<TD>TRS - Coinbox</TD>
<TD>214-32775-TCAA-DT</TD>
<TD>RL03</TD>
</TR>
<TR>
<TD><INPUT TYPE="radio" value="NONE" name="2">NONE
<INPUT TYPE="radio" name="2" value="214-33164-WRAA-DT-_01">_01
<INPUT TYPE="radio" name="2" value="214-33164-WRAA-DT-_02">_02</TD>
<TD>1</TD>
<TD>TRS - Explicit Call Transfer (ECT)</TD>
<TD>214-33164-WRAA-DT</TD>
<TD>RL02</TD>
</TR>
<TR>
<TD>
<INPUT TYPE="radio" value="NONE" name="5">NONE
<INPUT TYPE="radio" name="5" value="215-47629-WRAA-DT-_01">_01
<INPUT TYPE="radio" name="5" value="215-47629-WRAA-DT-_02">_02
<INPUT TYPE="radio" name="5" value="215-47629-WRAA-DT-_03">_03</TD>
<TD>3</TD>
<TD>TRS - Q-SIG BCG</TD>
<TD>215-47629-WRAA-DT</TD>
<TD>RL03</TD>
</TR>
</TABLE>
<input type="submit">
</FORM>
</BODY></HTML>

#!/usr/local/bin/perl5 -w

print "Content-type: text/html\n\n";	# Script tells server what is
comming.
					# The server will pass the contents of further 
					# print statements back tot the browser.
print"<HTML>";
print"<HEAD>";
print"<TITLEBelgacom customer page</TITLE>";
print"</HEAD>";
print"<BODY BGCOLOR=White>";

&ReadParse;	# subroutine declaration

foreach $key (keys %in)			# Perl's built-in function "keys" returns a
list of all keywords 
{					# in a assosiative array: keyword($key)=value($in{$key}).
	print "<LI>$key:$in{key}";
}					
print "</BODY>";
print "</HTML>";


sub ReadParse			# Reads all the form data from the user and puts them in
the right format 
{				# (an associative array: name=value) into %in en %ENV.
	local(*in) = @_ if @_;		# Declaration of global variables to locally
scoped values within this subroutine.
	local ($i, $key, $val);		
	
	if ($ENV{'REQUEST_METHOD'} eq "GET")	# The form data is  in the
query_string, an appendage of the URL of the script 
	{					# (everything qafter the "?" in the script URL).

		$in = $ENV{'QUERY_STRING'};
	}
	elsif ($ENV{'REQUEST_METHOD'} eq "POST")		# form data -> STDIN
	{
		read (STDIN, $in, $ENV{'CONTENT_LENGTH'});	# Reads "LENGTH(
$ENV{'CONTENT_LENGHT'})" bytes of data into a 
	}							# scalar variable "$in" from the specified filehandle "STDIN".
	
	@in = split(/&/,$in);	# Split the string($in) every time there is a
"&".
				# As a result we get an associative array: name1=value1
				#					   name2=value2	
				#					   ...
	foreach $i (0 .. $#in)		# foreach name=value pair do:
	{
		print "$i<BR>";
		# Convert plus's to spaces (for method GET).
		$in[$i] =~ s/\+/ /g;	
		
		# Split into key and value on the first =	
		($key, $val) = split(/=/,$in[$i],2);	
		
		# Convert %XX from hex numbers to alphanumeric
		$key =~ s/%(..)/pack("c",hex($1))/ge;
		$val =~ s/%(..)/pack("c",hex($1))/ge;
		
		# Associate key and value. \0 is the multiple separator
		$in{$key} .= "\0" if (defined($in{$key}));
		$in{$key} .= $val;
	}
	return length($in);
}
-- 
          V              David Van den Brande, Trainee at
  -----------------      Alcatel Switching VE27
 |  A L C A T E L  |     Fr. Wellesplein 1 - 2018 Antwerp - Belgium
  -----------------      mailto:David.Van_den_Brande@alcatel.be


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

Date: Mon, 08 Mar 1999 15:14:02 +0000
From: Matt Sergeant <matthew.sergeant@eml.ericsson.se>
Subject: Re: .ASP Post using LWP unsolved.
Message-Id: <36E3E93A.201848C@eml.ericsson.se>

Dikheel Al-Dikheel wrote:
> 
> "jamesht" thanks for your help on (LWP: Passing variables to an ASP
> document), but remember we are dealing with a .asp documents not .cgi
> :-)

I'm sorry - but the original poster was correct, just not in this
curcumstance... ASP acts exactly like CGI in accepting form variables -
otherwise you'd have to have modified browsers to be able to view ASP
pages (much as Microsoft would love that). However the weakness (or
potentially a strength) comes in the use of the API.

> Unlike cgi scripts, .asp documents act diffrently when someone tries to
> invoke input by passing it through the URL. Programs seem to reload in
> some occasions or cause a server error.

I doubt that. You've just misunderstood.

> Here is an example with only two inputs,
> http://back1.headhunter.net/scripts/UserNew.asp?DisclaimerOK=1&Submit=I+Agree
> 
> Try pasting the URL, and you will see that the page reloads it's self.
> Nothing seems to happen?!
> 
> Now try:
> http://back1.headhunter.net/scripts/UserNew.asp
> 
> when you submit by clicking on "I Agree" you get sent to the next step;
> now why is that?

It uses the POST method. In ASP you have to either get at the POST or
the GET variables - they come from different API calls. (Request.Form or
Request.QueryString). You can get at either/or just like in CGI, but
unfortunately doing so in VBScript could also get you a cookie... In
PerlScript it's as simple as:

use Win32::ASP;
my $value = GetFormVariable('DisclaimerOK');

So, the answer to your question is to read the LWP documentation on how
to do a POST request with data.

-- 
<Matt email="msergeant@ndirect.co.uk" />

| Fastnet Software Ltd              |   Perl in Active Server Pages   |
| Perl Consultancy, Web Development |   Database Design   |    XML    |
| http://come.to/fastnet            |    Information Consolidation    |


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

Date: Mon, 8 Mar 1999 07:28:43 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: .ASP Post using LWP unsolved.
Message-Id: <MPG.114d8c839fc746169896d2@206.184.139.132>

In article <36E391BC.15E1695A@ResumeGuide.com>, Dikheel@ResumeGuide.com 
says...
> "jamesht" thanks for your help on (LWP: Passing variables to an ASP
> document), but remember we are dealing with a .asp documents not .cgi
> :-)

So what exactly is the difference between CGI, .cgi, and .asp?  Is 
ColdFustion CGI or 'middleware'?


> Unlike cgi scripts, .asp documents act diffrently when someone tries to
> invoke input by passing it through the URL. Programs seem to reload in
> some occasions or cause a server error.
> 
> Here is an example with only two inputs,
> http://back1.headhunter.net/scripts/UserNew.asp?DisclaimerOK=1&Submit=I+Agree

That works fine for me.


> Now try:
> http://back1.headhunter.net/scripts/UserNew.asp

Works, too.

> when you submit by clicking on "I Agree" you get sent to the next step;
> now why is that?

program logic, I'd guess.

> If anyone knows of a solution to such problem, I will be greatful, as
> I'm sure many other programmers working on LWP, would too if they have
> or will reach this point.

Could you post your Perl code that's isn't working they way you think it 
should?


-- 
Bill Moseley mailto:moseley@best.com


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

Date: Mon, 8 Mar 1999 14:26:54 -0000
From: "Noel Sant" <noel.sant@icl.com>
Subject: Re: ADO, OLE on WinNT
Message-Id: <36e3dc5f.0@145.227.194.253>

Thanks. I tried it and:

1. As you wrote, I died at the open with:
----------------
OLE exception from "ADODB.Connection":

ADO could not find the specified provider.

Win32::OLE::0.0810 error 0x800a0e7a
    in methodcall/getproperty "Open"
----------------

2. Removing the Provider=... part of the string, and using any sort of path
for the Data Source, I got the original message, (couldn't find it).

3. Without provider, but with "Chorus" instead of "Chorus.dsn" in Data
Source=..., AND provided that dsn is shown in the "User DSN" tab of the ODBC
applet in Control Panel, NOT the "File DSN" tab (as it was originally), I
died at the open with: "0" Eh?!

By the  way, what is the "Provider"? Also what is the "Initial Catalog" (I
assumed it was the DB name)?

Regards,

    Noel

Rick Hensh wrote in message <7bqd3q$ief$1@msunews.cl.msu.edu>...
>I'm not sure why DSN's don't seem to work with SQL server. Try this
instead:
>
>Replace #1,#2,#3, and  #4 with info specific to your setup. For example, #1
>= the path to your SQL server. #1 is NOT a DSN.
>
>====================================================================
>
>$providerStr = "Provider=SQLOLEDB; Data Source=#1; User Id=#2; Password=#3;
>Initial Catalog=#4;";
>$conn->Open("$providerStr");
>
>====================================================================
>
>regards
>ricky
>
>Noel Sant wrote in message <36e028ae.0@145.227.194.253>...
>>I have a problem with ADO & OLE, too, but on Win95, and one step further
>on.
>>My code:
>>
>> $connection = Win32::OLE->new("ADODB.Connection");
>> $connection->Open("DSN=C:\\Chorus.dsn;UID=Noel;PWD=noel") or die
>>Win32::OLE::LastError(), "\n";
>>
>>
>>Thanks in anticipation,
>>
>>        Noel Sant
>
>




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

Date: Mon, 8 Mar 1999 15:06:28 -0000
From: "Noel Sant" <noel.sant@icl.com>
Subject: Re: ADO, OLE on WinNT
Message-Id: <36e3e5a1.0@145.227.194.253>

P.S. Re 3. in my previous message, it's the "or die" wot done it. I followed
an example in Matt Sergeant's FAQ, but "0" is a GOOD return code.

Now I've changed that to "if ($conn.....) {die...}" it's works OK. But the
questions remain:
What is the "Provider"?
What is thee "Initial Catalog"?

Thanks again,

    Noel

Noel Sant wrote in message <36e3dc5f.0@145.227.194.253>...
>Thanks. I tried it and:
>
>1. As you wrote, I died at the open with:
>----------------
>OLE exception from "ADODB.Connection":
>
>ADO could not find the specified provider.
>
>Win32::OLE::0.0810 error 0x800a0e7a
>    in methodcall/getproperty "Open"
>----------------
>
>2. Removing the Provider=... part of the string, and using any sort of path
>for the Data Source, I got the original message, (couldn't find it).
>
>3. Without provider, but with "Chorus" instead of "Chorus.dsn" in Data
>Source=..., AND provided that dsn is shown in the "User DSN" tab of the
ODBC
>applet in Control Panel, NOT the "File DSN" tab (as it was originally), I
>died at the open with: "0" Eh?!
>
>By the  way, what is the "Provider"? Also what is the "Initial Catalog" (I
>assumed it was the DB name)?
>
>Regards,
>
>    Noel
>
>Rick Hensh wrote in message <7bqd3q$ief$1@msunews.cl.msu.edu>...
>>I'm not sure why DSN's don't seem to work with SQL server. Try this
>instead:
>>
>>Replace #1,#2,#3, and  #4 with info specific to your setup. For example,
#1
>>= the path to your SQL server. #1 is NOT a DSN.
>>
>>====================================================================
>>
>>$providerStr = "Provider=SQLOLEDB; Data Source=#1; User Id=#2;
Password=#3;
>>Initial Catalog=#4;";
>>$conn->Open("$providerStr");
>>
>>====================================================================
>>
>>regards
>>ricky
>>
>>Noel Sant wrote in message <36e028ae.0@145.227.194.253>...
>>>I have a problem with ADO & OLE, too, but on Win95, and one step further
>>on.
>>>My code:
>>>
>>> $connection = Win32::OLE->new("ADODB.Connection");
>>> $connection->Open("DSN=C:\\Chorus.dsn;UID=Noel;PWD=noel") or die
>>>Win32::OLE::LastError(), "\n";
>>>
>>>
>>>Thanks in anticipation,
>>>
>>>        Noel Sant
>>
>>
>
>




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

Date: Mon, 08 Mar 1999 09:56:38 -0500
From: Yu Fang <yfang@gte.com>
Subject: Re: Array of Array????
Message-Id: <36E3E526.193F7D0D@gte.com>

I think you are talking about 2-d array.

Here is one way:
@array = (['a','b'],['c','d']);
#   $array[1][1] will be 'd'.

Here is another way:
@a = ('a','b');
@b = ('c','d');
@array = (\@a, \@b);
#   $array[1][1] will be 'd'.

lufan@hotmail.com wrote:
> 
> hi,
> 
> How to make a PERL array contains several pointers to
> others arrays ? All 2 arrays are scalable.
> 
> Here is what I think of it,
> 
>     array1 ->   {a,b,c,d,e,f ...}
> 
>     array1{a} -> {1,2,3,4 ..}
>     array1{b} -> {4,1,2,3,4 ..}
> 
> thanks ;)

-- 
Frank Yu Fang 

GTE Internetworking
40 Sylvan Road
Waltham, MA 02451-1128

Phone: 781-466-3351  
Fax: 781-466-2650
Pager: 1-800-759-8888 PIN# 1619895 or 1619895@skytel.com


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

Date: Mon, 08 Mar 1999 09:57:15 -0500
From: Yu Fang <yfang@gte.com>
Subject: Re: Array of Array????
Message-Id: <36E3E54B.22A0C5FC@gte.com>

I think you are talking about 2-d array.

Here is one way:
@array = (['a','b'],['c','d']);
#   $array[1][1] will be 'd'.

Here is another way:
@a = ('a','b');
@b = ('c','d');
@array = (\@a, \@b);
#   $array[1][1] will be 'd'.

lufan@hotmail.com wrote:
> 
> hi,
> 
> How to make a PERL array contains several pointers to
> others arrays ? All 2 arrays are scalable.
> 
> Here is what I think of it,
> 
>     array1 ->   {a,b,c,d,e,f ...}
> 
>     array1{a} -> {1,2,3,4 ..}
>     array1{b} -> {4,1,2,3,4 ..}
> 
> thanks ;)

-- 
Frank Yu Fang 

GTE Internetworking
40 Sylvan Road
Waltham, MA 02451-1128

Phone: 781-466-3351  
Fax: 781-466-2650
Pager: 1-800-759-8888 PIN# 1619895 or 1619895@skytel.com


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

Date: Mon, 08 Mar 1999 09:57:42 -0500
From: Yu Fang <yfang@gte.com>
Subject: Re: Array of Array????
Message-Id: <36E3E566.533D66C2@gte.com>

I think you are talking about 2-d array.

Here is one way:
@array = (['a','b'],['c','d']);
#   $array[1][1] will be 'd'.

Here is another way:
@a = ('a','b');
@b = ('c','d');
@array = (\@a, \@b);
#   $array[1][1] will be 'd'.

lufan@hotmail.com wrote:
> 
> hi,
> 
> How to make a PERL array contains several pointers to
> others arrays ? All 2 arrays are scalable.
> 
> Here is what I think of it,
> 
>     array1 ->   {a,b,c,d,e,f ...}
> 
>     array1{a} -> {1,2,3,4 ..}
>     array1{b} -> {4,1,2,3,4 ..}
> 
> thanks ;)

-- 
Frank Yu Fang 

GTE Internetworking
40 Sylvan Road
Waltham, MA 02451-1128

Phone: 781-466-3351  
Fax: 781-466-2650
Pager: 1-800-759-8888 PIN# 1619895 or 1619895@skytel.com


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

Date: Mon, 08 Mar 1999 09:58:37 -0500
From: Yu Fang <yfang@gte.com>
Subject: Re: Array of Array????
Message-Id: <36E3E59D.8678D1D9@gte.com>

I think you are talking about 2-d array.

Here is one way:
@array = (['a','b'],['c','d']);
#   $array[1][1] will be 'd'.

Here is another way:
@a = ('a','b');
@b = ('c','d');
@array = (\@a, \@b);
#   $array[1][1] will be 'd'.


lufan@hotmail.com wrote:
> 
> hi,
> 
> How to make a PERL array contains several pointers to
> others arrays ? All 2 arrays are scalable.
> 
> Here is what I think of it,
> 
>     array1 ->   {a,b,c,d,e,f ...}
> 
>     array1{a} -> {1,2,3,4 ..}
>     array1{b} -> {4,1,2,3,4 ..}
> 
> thanks ;)

-- 
Frank Yu Fang 

GTE Internetworking
40 Sylvan Road
Waltham, MA 02451-1128

Phone: 781-466-3351  
Fax: 781-466-2650
Pager: 1-800-759-8888 PIN# 1619895 or 1619895@skytel.com


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

Date: Mon, 08 Mar 1999 10:02:32 -0500
From: Yu Fang <yfang@gte.com>
Subject: Re: Array of Array????
Message-Id: <36E3E688.F1B32A93@gte.com>

I think you are talking about 2-d array.

Here is one way:
@array = (['a','b'],['c','d']);
#   $array[1][1] will be 'd'.

Here is another way:
@a = ('a','b');
@b = ('c','d');
@array = (\@a, \@b);
#   $array[1][1] will be 'd'.


lufan@hotmail.com wrote:
> 
> hi,
> 
> How to make a PERL array contains several pointers to
> others arrays ? All 2 arrays are scalable.
> 
> Here is what I think of it,
> 
>     array1 ->   {a,b,c,d,e,f ...}
> 
>     array1{a} -> {1,2,3,4 ..}
>     array1{b} -> {4,1,2,3,4 ..}
> 
> thanks ;)

-- 
Frank Yu Fang 

GTE Internetworking
40 Sylvan Road
Waltham, MA 02451-1128

Phone: 781-466-3351  
Fax: 781-466-2650
Pager: 1-800-759-8888 PIN# 1619895 or 1619895@skytel.com


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

Date: Mon, 08 Mar 1999 10:03:50 -0500
From: Yu Fang <yfang@gte.com>
Subject: Re: Array of Array????
Message-Id: <36E3E6D6.E1B7182B@gte.com>

I think you are talking about 2-d array.

Here is one way:
@array = (['a','b'],['c','d']);
#   $array[1][1] will be 'd'.

Here is another way:
@a = ('a','b');
@b = ('c','d');
@array = (\@a, \@b);
#   $array[1][1] will be 'd'.


lufan@hotmail.com wrote:
> 
> hi,
> 
> How to make a PERL array contains several pointers to
> others arrays ? All 2 arrays are scalable.
> 
> Here is what I think of it,
> 
>     array1 ->   {a,b,c,d,e,f ...}
> 
>     array1{a} -> {1,2,3,4 ..}
>     array1{b} -> {4,1,2,3,4 ..}
> 
> thanks ;)

-- 
Frank Yu Fang 

GTE Internetworking
40 Sylvan Road
Waltham, MA 02451-1128

Phone: 781-466-3351  
Fax: 781-466-2650
Pager: 1-800-759-8888 PIN# 1619895 or 1619895@skytel.com


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

Date: Mon, 08 Mar 1999 10:07:33 -0500
From: Yu Fang <yfang@gte.com>
Subject: Re: Array of Array????
Message-Id: <36E3E7B5.11598125@gte.com>

I think you are talking about 2-d array.

Here is one way:
@array = (['a','b'],['c','d']);
#   $array[1][1] will be 'd'.

Here is another way:
@a = ('a','b');
@b = ('c','d');
@array = (\@a, \@b);
#   $array[1][1] will be 'd'.


lufan@hotmail.com wrote:
> 
> hi,
> 
> How to make a PERL array contains several pointers to
> others arrays ? All 2 arrays are scalable.
> 
> Here is what I think of it,
> 
>     array1 ->   {a,b,c,d,e,f ...}
> 
>     array1{a} -> {1,2,3,4 ..}
>     array1{b} -> {4,1,2,3,4 ..}
> 
> thanks ;)

-- 
Frank Yu Fang 

GTE Internetworking
40 Sylvan Road
Waltham, MA 02451-1128

Phone: 781-466-3351  
Fax: 781-466-2650
Pager: 1-800-759-8888 PIN# 1619895 or 1619895@skytel.com


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

Date: Mon, 8 Mar 1999 06:45:49 -0800
From: moseley@best.com (Bill Moseley)
Subject: Re: cgi and forms
Message-Id: <MPG.114d827792e26a4b9896d1@206.184.139.132>

> In article <7bttbh$r9q$1@nnrp1.dejanews.com>,
>   jaspo@my-dejanews.com wrote:
> > Hello,
> >
> > I am using forms in html and a perl cgi script.  however, on the web server,
> > when I hit submit, the cgi script code shows up in the browser window?  any
> > ideas!!!

In article <7bus8r$jf0$1@nnrp1.dejanews.com>, mmueller007@hotmail.com 
says...
> You are probably using the following:
> <form method="get" ...
> instead use
> <form method="post" ...
> That should take care of it.

Huh?  The server isn't running the script.  It's a server setup problem, 
or the script is in the wrong directory/has wrong extension -- or maybe 
shebang is pointing to cat?



-- 
Bill Moseley mailto:moseley@best.com


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

Date: Mon, 8 Mar 1999 03:42:43 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Combining Files
Message-Id: <3i20c7.7o.ln@magna.metronet.com>

golfer@usa.net wrote:
: I am stumped!  I have 50 text tab delimited files that I am trying to
: combine into one file based upon the username variable.
                        ^^^^^^^^^^^^^^^^^^^^^^^

: I can do it if the names are present in all files but each file may or
: may not have that person's name.


   So then, you do not _have_ the basis on which to combine them.

   There is no blood in that turnip, it cannot be done.


   How would a human know which username is associated with those
   files that do not indicate the username?


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Mon, 8 Mar 1999 14:47:53 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: dbm open
Message-Id: <ebohlmanF8A6Ft.IoG@netcom.com>

Bill Binkley <bwb@dowebpages.com> wrote:
: Does anyone know why this tie will not create the DBM file, but will
: work OK
:  after the file is created.

:  $vdb = tie %vendor, DB_File, $vendb, O_RDWR|O_CREAT, 0700 || die "Could

:  not open DBM file $vendb : $!\n";
:  untie %vendor;

Change the '||' to 'or' which will fix the problem that's preventing you 
from seeing what's going wrong (right now your 'die' will never execute, 
even if the tie fails, because your code says to execute it only if 700 
octal is zero).



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

Date: 8 Mar 1999 07:13:20 -0700
From: Tom Christiansen <perlfaq-suggestions@perl.com>
Subject: FAQ 3.3: Is there a Perl shell?  
Message-Id: <36e3db00@csnews>

(This excerpt from perlfaq3 - Programming Tools 
    ($Revision: 1.33 $, $Date: 1998/12/29 20:12:12 $)
part of the standard set of documentation included with every 
valid Perl distribution, like the one on your system.
See also http://language.perl.com/newdocs/pod/perlfaq3.html
if your negligent system adminstrator has been remiss in his duties.)

  Is there a Perl shell?

    In general, no. The Shell.pm module (distributed with perl) makes
    perl try commands which aren't part of the Perl language as shell
    commands. perlsh from the source distribution is simplistic and
    uninteresting, but may still be what you want.

-- 
    "It's okay to be wrong temporarily." --Larry Wall


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

Date: Mon, 8 Mar 1999 15:39:22 +0100
From: miss.parker@dialcom.com.pl (Miss Parker)
Subject: getpwuid  vs. shadow-passwds
Message-Id: <MPG.114dff8588be7e4f98969c@218.1.1.10>

hi!

by assingment:
	$pwd = (getpwuid($user))[1];
you can get encrypted passwd of $user,
but what to do if someone has installed shadow-passwds?
(in my case the line above returns only 'x' - proper portion
 of /etc/passwd file, but it should rather look in /etc/shadow)

(I installed perl(5.00404) first and the upgraded password
system to shadow-passwds, then upgraded perl to perl5.00502
my system is RH5.1)


thanks

-----------
miss.parker@dialcom.com.pl



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

Date: 08 Mar 1999 09:27:49 -0500
From: Gary Algier <gaa@garnet.dgms.com>
Subject: Re: How to convince others using perl instead bourne scripts
Message-Id: <otd82krr8a.fsf@garnet.dgms.com>


dzuy@my-dejanews.com writes:
> 
> In article <35E4828F.B9E16F20@transarc.com>,
>   Dennis Chang <dchang@transarc.com> wrote:
> > Hi,
> >
> > My friend keeps saying bourne script and C is more efficient than perl.
> > Where can I find the advantages and disadvantage among perl, bourne
> > scripts and C?
> >
> > Thanks,
> >
> > --
> > Dennis Chang
> >
> >
> 	Challenge him/her to write an sh script or C program that reads in
> 	a file, then re-arrange the lines randomly.  For example, I have a
> 	file which is a list of names sorted in alphabetical order.  Re-generate
> 	the file so that all the names are in random order.  If stumped,
> 	email me and I'll send a 20 line Perl script to solve this problem.
> 	Try it with a language of your choice.
> 
> 	Dzuy
> 
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum
What's wrong with this (only 12 lines, not counting blanks):
        integer n=0 i=0

        while read x
        do
                line[n]="$x"
                ((n++))
        done

        while ((n > 0))
        do
                ((i = RANDOM % n))
                print ${line[i]}
                line[i]=${line[--n]}
        done

This reminds me of the day that someone came to me and said that the
6809 could do anything that the 6502 could do and quicker.  I found
that BCD math was a few cycles faster on the 6502.  Latter, Motorola
and Intel and National Semiconductor got into producing code snippets
chosen to solve a problem whereby they were faster then the other guy.

Lest this become a pissing contest, I agree that there are many things
best done with Perl and some things perhaps better done with the shell.
I would say that if most of the work can be done by already written tools,
use a shell script.  Otherwise, if use perl for processing intensive
jobs.

I end up writing a lot of shell scripts because I need to make things work
on systems either before /usr is mounted (like in rc scripts) or on
systems that I can't count on perl being installed.

One thing that can effect the performance of a perl script is the latency
to load perl.  If I am using a shell to issue the command, there should
be very little latency to load the shell.  Whereas, if perl needs to
load from disk and on top of that it is dynamically linked, the startup
time can be siginificantly longer than "loading" a staticly linked shell.
(Which it usually is because /usr is not available during startup).

-- 
Gary Algier, WB2FWZ       gary.algier@dgms.com              +1 609 608 2758
DGM&S Telecom, 1025 Briggs Rd, Mt. Laurel, NJ 08054     Fax:+1 609 866 8850
"Paperwork is the embalming fluid of bureaucracy, maintaining an appearance
of life where none exists."                               Robert J. Meltzer


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

Date: 8 Mar 1999 15:40:18 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: How to do a Case-insensitive Sort?
Message-Id: <7c0r12$n6l$1@info2.uah.edu>

In article <MPG.1149e3b51bf998109896e9@nntp.hpl.hp.com>,
	lr@hpl.hp.com (Larry Rosler) writes:
: 1.  Timing many iterations of a tiny sort distorts the measurements so 
: that few useful conclusions can be drawn.  A tiny sort is dominated by 
: any setup time (which is O(n)), and effects caused by too many costly 
: comparisons (which is O(n log n)) are never seen.  In essence, for tiny 
: sorts, any old way will do.  For huge sorts, you'd better use the best 
: techniques.

Rob mentions this:

    Rule 3.  Fancy algorithms are slow when n is small, and n is usually
             small.  Fancy algorithms have big constants. Until you know
             that n is frequently going to be big, don't get fancy.
             (Even if n does get big, use Rule 2 first.)   For example,
             binary trees are always faster than splay trees for
             workaday problems. 

Anyone who doesn't recognize this excerpt should immediately proceed to
<URL:http://www.lysator.liu.se/c/pikestyle.html>.

: 2.  Nevertheless, your generalization that a Schwartz Transform loses 
: when the comparison function is simply lc() is correct.  Greg Bacon sees 
: 'Too many lc()s' and concludes incorrectly that this is expensive.

You cannot label my statement incorrect (nor can I defend my assertion)
without some knowledge of the size of the data.  In fact, quicksort
might not even be the best approach to sorting the particular data
in question.

: lc() is a built-in function whose execution is not 
: significantly more expensive than other Perl expressions, such as array 
: access through a reference.

So?  Adding integers is something that most processors do very rapidly,
but that doesn't mean I'd haphazardly add 0 to something many times
just because the processor can do it relatively quickly.

: 3.  Factor out as much overhead as possible.

What do you think doing O(n) lc()s instead of O(n lg n) lc()s is?

: As I observed recently, 
: qw() is a run-time operation, which should not be included in the 
: benchmark code.

Fixed in the next release. :-)

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


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

Date: Mon, 08 Mar 1999 16:49:20 +0100
From: David =?iso-8859-1?Q?Doum=E8che?= <david@sa.nomade.fr>
Subject: Re: mod_perl + Net::PH => persistant DB connection?
Message-Id: <36E3F180.579BB9EC@sa.nomade.fr>

Il s'agit d'un message multivolet au format MIME.
--------------20CCA6DCDAB95F8D918C41E5
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hello,

    I am an old camel on cgi, but a newbie with perl. So this advice is just to
take with care:  take a look on Netscape entreprise Documentation: They have
implemented a persistent database connection with just the small livewire, and
this was working great. The algorythm could be used with perl.

Anyway, I don't feel like competent enought to do it by myself.

Give me some feedback if you can...

otis@my-dejanews.com a icrit :

> Hello,
>
> I am about to try setting up some web-based Qi/Ph clients using Net::PH Perl
> module (part of libnet) and mod_perl Apache module.
> One of the things that I would like to accomplish is creating persistant
> connections to the Qi/Ph database so that I don't have to establish a new
> connection each time a CGI is invoked and goes against the Qi/Ph Db.
>
> My question is - has anyone done this? Is it possible? All mod_perl examples
> for creating persistant Db connections are for relational databases via DBI,
> but I'd like to try the same for Ph db.
>
> Any help, hints, suggestions or even just a simple 'yes, it is doable' or
> 'no, not possible, sorry' would be welcome.

--
                _______________________

David Doumhche,
Nomade, le guide du net francophone - [diveloppement]
http://www.nomade.fr

Til:  01.70.91.33.00
Icq:  8910432
mail: david@objectifnet.fr


--------------20CCA6DCDAB95F8D918C41E5
Content-Type: text/x-vcard; charset=us-ascii;
 name="david.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Carte pour David Doumhche
Content-Disposition: attachment;
 filename="david.vcf"

begin:vcard 
n:Doumeche;David Doumeche
tel;work:01 70 91 33 35
x-mozilla-html:TRUE
adr:;;;;;;
version:2.1
email;internet:david@objectifnet.fr
title:Webmaster
x-mozilla-cpt:;4544
fn:David Doumeche
end:vcard

--------------20CCA6DCDAB95F8D918C41E5--



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

Date: Mon, 08 Mar 1999 14:40:33 GMT
From: gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: MS ACCESS database with perl
Message-Id: <36e3e0e1.19306606@news.dircon.co.uk>

On Mon, 8 Mar 1999 14:43:57 +0100, "Nicolas Malfeyt"
<nicolasm@luon.be> wrote:

>Is it possible and how hard would it be to send some kind of SQL query to an
>MS ACCESS database residing on your webserver with Perl, and then using the
>results in your web application?
>

As easy as installing Win32::ODBC, reading the documentation ,setting
up the appropriate DSN for your database and writing a script to do
whatever you want with it.


/J\


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

Date: Mon, 8 Mar 1999 03:48:31 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: need place to start
Message-Id: <vs20c7.7o.ln@magna.metronet.com>

judson@nettaxi.com wrote:
: i was wondering if anybody had any suggestions about where to start
: learning perl. 


   http://www.perl.com


: please reply to judson@nettaxi.com


   Ask it here, get the answer here.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 8 Mar 1999 15:15:38 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <7c0piq$nae$2@info2.uah.edu>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 01 Mar 1999 15:10:01 GMT and ending at
08 Mar 1999 21:09:29 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) 1998 Greg Bacon.  All Rights Reserved.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  245 (46.8% of all posters)
Articles: 352 (24.5% of all articles)
Volume generated: 611.6 kb (24.1% of total volume)
    - headers:    263.2 kb (5,207 lines)
    - bodies:     344.9 kb (11,362 lines)
    - original:   250.1 kb (8,595 lines)
    - signatures: 3.1 kb (84 lines)

Original Content Rating: 0.725

Averages
========

Posts per poster: 1.4
    median: 1 post
    mode:   1 post - 193 posters
    s:      1.4 posts
Message size: 1779.1 bytes
    - header:     765.7 bytes (14.8 lines)
    - body:       1003.2 bytes (32.3 lines)
    - original:   727.7 bytes (24.4 lines)
    - signature:  9.1 bytes (0.2 lines)

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

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

   14    30.0 ( 11.2/ 18.7/  9.2)  "Ekkis" <ekkis@arix.com>
    7     8.4 (  5.3/  3.1/  3.1)  grumetedapanair@hotmail.com ("Adrian Fiorinni")
    7     7.3 (  5.6/  1.8/  1.8)  anthony belsey <anb5@aber.ac.uk>
    6     8.5 (  3.8/  4.6/  2.9)  Dan Baker <dtbaker@bus-prod.com>
    5     8.8 (  3.8/  5.0/  1.7)  euclid@fantom.com (Dimitri Ostapenko)
    5     6.0 (  3.5/  2.5/  1.5)  Aaron Walker <amwalker@gate.net>
    4     5.9 (  3.0/  2.9/  1.3)  Michael.Cameron@nospam.technologist.com
    4    10.1 (  4.0/  6.1/  3.6)  evanjohn@my-dejanews.com
    4     7.1 (  2.8/  4.3/  3.1)  Mick <horizon@internetexpress.com.au>
    4     4.9 (  2.4/  2.5/  0.8)  Allan Hawdon <udaa460@axolotl.kcl.ac.uk>

These posters accounted for 4.2% of all articles.

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

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

  30.0 ( 11.2/ 18.7/  9.2)     14  "Ekkis" <ekkis@arix.com>
  10.4 (  2.0/  8.3/  2.6)      3  eajam@hotmail.com
  10.1 (  4.0/  6.1/  3.6)      4  evanjohn@my-dejanews.com
   9.9 (  3.3/  6.6/  4.5)      4  Colin Drew <Webmaster@qax.org>
   8.8 (  3.8/  5.0/  1.7)      5  euclid@fantom.com (Dimitri Ostapenko)
   8.5 (  3.8/  4.6/  2.9)      6  Dan Baker <dtbaker@bus-prod.com>
   8.4 (  5.3/  3.1/  3.1)      7  grumetedapanair@hotmail.com ("Adrian Fiorinni")
   8.4 (  2.8/  5.6/  2.6)      3  charlottekane@hotmail.com
   7.7 (  0.7/  7.0/  0.4)      1  n8rupert@my-dejanews.com
   7.7 (  2.1/  5.6/  4.0)      3  nadeem@gate.net

These posters accounted for 4.3% of the total volume.

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

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

1.000  (  3.1 /  3.1)      7  grumetedapanair@hotmail.com ("Adrian Fiorinni")
1.000  (  1.8 /  1.8)      7  anthony belsey <anb5@aber.ac.uk>
1.000  (  0.6 /  0.6)      3  "kris" <khhuntley@capitalnet.com>
0.892  (  3.8 /  4.2)      3  ac256@ncf.ca
0.722  (  3.1 /  4.3)      4  Mick <horizon@internetexpress.com.au>
0.715  (  4.0 /  5.6)      3  nadeem@gate.net
0.689  (  4.5 /  6.6)      4  Colin Drew <Webmaster@qax.org>
0.656  (  1.0 /  1.6)      3  akbishop@aol.com (AKBishop)
0.638  (  2.9 /  4.6)      6  Dan Baker <dtbaker@bus-prod.com>
0.603  (  2.4 /  4.0)      3  Dimitri Ostapenko <dimitrio@sympatico.ca>

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

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

0.515  (  0.5 /  0.9)      3  scott@aravis.softbase.com (Scott McMahan)
0.491  (  9.2 / 18.7)     14  "Ekkis" <ekkis@arix.com>
0.462  (  2.6 /  5.6)      3  charlottekane@hotmail.com
0.456  (  1.3 /  2.9)      4  Michael.Cameron@nospam.technologist.com
0.394  (  1.2 /  2.9)      4  "Aidan Curran" <aidan.curran@agilesoft.com>
0.335  (  1.7 /  5.0)      5  euclid@fantom.com (Dimitri Ostapenko)
0.330  (  1.2 /  3.8)      3  Peter Meyer <pwmeyer@mitre.org>
0.318  (  2.6 /  8.3)      3  eajam@hotmail.com
0.318  (  0.8 /  2.5)      4  Allan Hawdon <udaa460@axolotl.kcl.ac.uk>
0.221  (  0.8 /  3.8)      3  strads@tmisnet.com (George Crissman)

23 posters (9%) had at least three posts.


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

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

      18  pjm@see_my_sig_for_address.com
      15  Doug Hughes <doug@eng.auburn.edu>
      12  "Todd Bandrowsky" <tbandrowsky@del.net>
       9  joh@gmx.net (Jochem Huhmann)
       9  "Bob Butler" <noway@nospam.com>
       9  Mike Tiller <mtiller@ptrs14.srl.ford.com>
       9  Kathryn Taylor Jennings <kat_j@mindless.com>
       9  Howard Brazee <brazee@NOSPAMhome.com>
       9  "Mike Smith" <kld_msmith@NOSPAMearthlink.net>
       9  Martin Harvey <martin@aziraphale.demon.co.uk>


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

Date: Mon, 8 Mar 1999 03:39:32 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: newbie problem with *s (regular expression matching in win32)
Message-Id: <4c20c7.7o.ln@magna.metronet.com>

Scott Carpenter (Sorry@No.Reply.Due.To.Spam) wrote:
: In "Learning Perl" (The llama book), there is an exercise in chapter 7
: that says to create a regular expression that matches "any number of
: backslashes followed by any number of asterisks (any number might be
: zero)"

: I thought to use /\\*\**/ which is also the answer given in the book.
: When I tested it I didn't quite get what I expected:

: $_ = 'fff\\\\****';
: /\\*\**/;
: print $&;

: There wasn't a match.  The f's are just thrown in as filler.


   How do you know that there wasn't a match?

   You are not testing to see if the match succeeded or not.

   You should _never ever_ use the "pattern match" variables
   unless you first test to see that the match succeeded, since
   their values are changed _only_ for a successful match.

     if ( /\\*\**/ )
        { print "matched '$&'\n" }
     else
        { print "NO match\n"; }

   This code shows that it did in fact match (though it did not
   match what you _wanted_ it to match :-)
   

   Your pattern matches zero characters.

   It will match even if    $_ = '';

   In your case, it is matching the null string that comes between
   the beginning of the string and the first 'f'.

   If you put the match in a while() and give it the m//g option,
   It will match 'fff\\****' 5 times:

      while ( /\\*\**/g )
         { print "matched '$&'\n" }

matched ''
matched ''
matched ''
matched '\\****'
matched ''


: If I tried /\\+\*+/ the print statement returned the expected match:
: \\****


   Because it can no longer match the empty string.


: I took out the f's,  and then suddenly it worked correctly with the *
: pattern.  


   Because _then_ that is the first place where the pattern can match.


: Can anyone tell me what I'm doing wrong?


   You should always take special note when you write a pattern
   that can match the empty string, and ensure that you really
   want to allow that. (if every component of your match is
   optional, you have probably not written it correctly)


       Beware matching the null string!


   So, the answer given in the Llama is correct, since it says
   that zero of each char is what we want matched.


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Mon, 08 Mar 1999 08:43:44 -0700
From: Lynn Wilson <lynn@swcp.com>
Subject: Re: OLE, DBI-ODBC conflicts?
Message-Id: <36E3F030.461FA838@swcp.com>

Steve Grantz wrote:
> 
> Lynn Wilson (lynn@swcp.com) wrote:
> : If I open the spreadsheet first and leave it open, the 'connect' operator with
> : the ODBC fails.  It works fine if I close the OLE prior to opening the ODBC.
> 
> No offense intended, but since there is no code posted I have to ask:
> Are you using the same variable for the OLE and ODBC object handles?
> 

No offense taken.  The two pieces of code are in their own namespace packages.
I'd be glad to post the code but it is over 700 lines for those two packages
alone.

Perhaps I will experiment with a subset of the code to try to get a better
'handle' on it.

Thanks.
Lynn


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

Date: Mon, 08 Mar 1999 10:10:59 -0500
From: Yu Fang <yfang@gte.com>
Subject: Sorry, mail server wrong...
Message-Id: <36E3E883.EE9F93FB@gte.com>

Sorry, sorry...

lufan@hotmail.com wrote:
> 
> hi,
> 
> How to make a PERL array contains several pointers to
> others arrays ? All 2 arrays are scalable.
> 
> Here is what I think of it,
> 
>     array1 ->   {a,b,c,d,e,f ...}
> 
>     array1{a} -> {1,2,3,4 ..}
>     array1{b} -> {4,1,2,3,4 ..}
> 
> thanks ;)

-- 
Frank Yu Fang 

GTE Internetworking
40 Sylvan Road
Waltham, MA 02451-1128

Phone: 781-466-3351  
Fax: 781-466-2650
Pager: 1-800-759-8888 PIN# 1619895 or 1619895@skytel.com


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

Date: 8 Mar 1999 15:15:35 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <7c0pin$nae$1@info2.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 01 Mar 1999 15:10:01 GMT and ending at
08 Mar 1999 21:09:29 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) 1998 Greg Bacon.  All Rights Reserved.
      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:  523
Articles: 1435 (543 with cutlined signatures)
Threads:  452
Volume generated: 2532.5 kb
    - headers:    1074.0 kb (21,391 lines)
    - bodies:     1364.5 kb (44,564 lines)
    - original:   926.2 kb (32,877 lines)
    - signatures: 92.7 kb (1,925 lines)

Original Content Rating: 0.679

Averages
========

Posts per poster: 2.7
    median: 1 post
    mode:   1 post - 343 posters
    s:      6.0 posts
Posts per thread: 3.2
    median: 2.0 posts
    mode:   1 post - 136 threads
    s:      3.5 posts
Message size: 1807.2 bytes
    - header:     766.4 bytes (14.9 lines)
    - body:       973.7 bytes (31.1 lines)
    - original:   660.9 bytes (22.9 lines)
    - signature:  66.1 bytes (1.3 lines)

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

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

   69   118.1 ( 50.5/ 57.8/ 31.3)  gellyfish@btinternet.com
   59   106.5 ( 36.7/ 64.0/ 38.8)  lr@hpl.hp.com (Larry Rosler)
   50    93.5 ( 48.3/ 32.4/ 17.8)  rjk@linguist.dartmouth.edu (Ronald J Kimball)
   32    56.6 ( 26.0/ 25.8/ 23.4)  abigail@fnx.com
   27    37.4 ( 21.3/ 16.1/ 10.4)  bart.lateur@skynet.be (Bart Lateur)
   26    36.3 ( 21.1/ 13.2/  7.8)  Jonathan Feinberg <jdf@pobox.com>
   21    29.6 ( 16.3/ 13.1/  6.8)  jglascoe@giss.nasa.gov
   21    34.5 ( 17.0/ 12.9/  6.9)  Jerome O'Neil <jeromeo@atrieva.com>
   20    28.0 ( 11.5/ 16.5/ 11.6)  tadmc@metronet.com (Tad McClellan)
   20    28.2 ( 11.9/ 13.0/  7.3)  linberg@literacy.upenn.edu (Steve Linberg)

These posters accounted for 24.0% of all articles.

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

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

 118.1 ( 50.5/ 57.8/ 31.3)     69  gellyfish@btinternet.com
 106.5 ( 36.7/ 64.0/ 38.8)     59  lr@hpl.hp.com (Larry Rosler)
  93.5 ( 48.3/ 32.4/ 17.8)     50  rjk@linguist.dartmouth.edu (Ronald J Kimball)
  56.6 ( 26.0/ 25.8/ 23.4)     32  abigail@fnx.com
  55.0 (  5.9/ 48.5/ 46.8)      7  tchrist@mox.perl.com (Tom Christiansen)
  40.1 (  3.5/ 36.6/ 32.5)      4  Richard Robinson <richardr@ldr.com>
  37.4 ( 21.3/ 16.1/ 10.4)     27  bart.lateur@skynet.be (Bart Lateur)
  36.3 ( 21.1/ 13.2/  7.8)     26  Jonathan Feinberg <jdf@pobox.com>
  34.6 ( 15.7/ 13.3/  6.0)     20  Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
  34.5 ( 17.0/ 12.9/  6.9)     21  Jerome O'Neil <jeromeo@atrieva.com>

These posters accounted for 24.2% of the total volume.

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

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

1.000  (  3.1 /  3.1)      7  grumetedapanair@hotmail.com ("Adrian Fiorinni")
1.000  (  1.8 /  1.8)      7  anthony belsey <anb5@aber.ac.uk>
0.986  ( 16.3 / 16.5)     10  fl_aggie@thepentagon.com
0.974  (  7.2 /  7.4)      6  23_skidoo@geocities.com
0.965  ( 46.8 / 48.5)      7  tchrist@mox.perl.com (Tom Christiansen)
0.907  ( 23.4 / 25.8)     32  abigail@fnx.com
0.864  (  5.0 /  5.8)      5  Daniel Grisinger <dgris@moiraine.dimensional.com>
0.857  (  1.1 /  1.3)      5  jamesht <jamesht@idt.net>
0.833  (  3.5 /  4.2)      5  mcafee@waits.facilities.med.umich.edu (Sean McAfee)
0.832  (  6.7 /  8.0)      5  "Dave Roth" <xrxoxtxhxdx@xrxoxtxhx.xnxextx>

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

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

0.460  (  8.9 / 19.3)     20  Eric Bohlman <ebohlman@netcom.com>
0.457  (  0.9 /  2.0)      7  alastair@calliope.demon.co.uk
0.451  (  6.0 / 13.3)     20  Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
0.434  (  1.6 /  3.7)      5  sholden@cs.usyd.edu.au
0.433  (  2.1 /  4.8)      5  ced@bcstec.ca.boeing.com (Charles DeRykus)
0.335  (  1.7 /  5.0)      5  euclid@fantom.com (Dimitri Ostapenko)
0.324  (  1.2 /  3.7)      5  Heiko Marschall <hm@garmisch.net>
0.308  (  2.7 /  8.7)      5  Arne Jamtgaard <arnej@fc.hp.com>
0.269  (  1.1 /  4.0)      6  lufan@hotmail.com
0.260  (  1.6 /  6.0)      8  Chris Morrow <morrowc@his.com>

59 posters (11%) had at least five posts.

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

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

   35  *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
   25  method overriden!
   23  URGENT! Where Do You Hide The CGI Cards From The Spiders?
   21  Pentium III Chips Released with IDs - Intel won't budge
   18  The truth about the Pentium III chip and ID --- **boycott info**
   17  Finding the word after a word
   17  The millennium cometh -- eventually
   17  Getting rid of ^M
   13  Yesterday!
   13  y2k and 4-digit dates (was Re: foreach and while)

These threads accounted for 13.9% of all articles.

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

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

  92.1 ( 36.6/ 52.5/ 38.8)     35  *** FAQ: ANSWERS TO YOUR QUESTIONS! READ FIRST! Posted Twice Weekly ***
  58.6 ( 20.3/ 35.8/ 20.7)     25  method overriden!
  51.3 ( 28.5/ 22.2/ 10.0)     21  Pentium III Chips Released with IDs - Intel won't budge
  45.1 (  1.0/ 44.0/ 43.1)      1  SRC: perlpoint demo
  44.0 ( 21.9/ 21.7/  6.6)     18  The truth about the Pentium III chip and ID --- **boycott info**
  43.4 ( 16.3/ 26.7/ 16.5)     17  The millennium cometh -- eventually
  43.3 (  4.2/ 38.9/ 32.8)      5  gcc, perl, and IRIX 6.5
  41.5 ( 18.2/ 21.0/ 14.2)     23  URGENT! Where Do You Hide The CGI Cards From The Spiders?
  29.2 ( 12.7/ 15.4/ 11.4)     13  y2k and 4-digit dates (was Re: foreach and while)
  26.4 ( 12.7/ 12.7/  5.9)     17  Finding the word after a word

These threads accounted for 18.8% of the total volume.

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

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

0.886  (  4.0/   4.5)      5  MAIL file attachments in Perl Script
0.842  ( 32.8/  38.9)      5  gcc, perl, and IRIX 6.5
0.823  (  3.2/   3.9)     11  deletion problem
0.814  (  1.2/   1.4)      5  Lynux
0.812  (  2.6/   3.3)      5  Beginning Perl Programmer
0.809  (  5.7/   7.0)      5  grep oddity - looking for explaination
0.802  (  4.6/   5.7)      5  Perl & OS/2: problems with makefile.pl & makemaker
0.796  (  6.9/   8.7)      8  How to do a Case-insensitive Sort?
0.783  (  4.6/   5.8)      5  perl targeted url redirection.
0.776  (  2.3/   2.9)      5  Help Please: Script Optimization

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

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

0.470  (  2.1 /  4.4)     11  A smiple question
0.469  (  5.9 / 12.7)     17  Finding the word after a word
0.451  ( 10.0 / 22.2)     21  Pentium III Chips Released with IDs - Intel won't budge
0.446  (  5.1 / 11.4)      6  Newbie question
0.436  (  1.6 /  3.7)      6  Quick Regular Expression Quesion
0.429  (  4.8 / 11.2)      6  Using Perl to resize image?
0.403  (  1.2 /  3.0)      5  HELP!! How to obtain html info by LWP ???
0.395  (  2.0 /  5.0)      7  Statistics for comp.lang.perl.misc
0.376  (  4.8 / 12.9)     10  does perl discourage obfuscated code? (was Re: Perl evangelism)
0.305  (  6.6 / 21.7)     18  The truth about the Pentium III chip and ID --- **boycott info**

78 threads (17%) had at least five posts.

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

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

      37  comp.lang.python
      37  comp.lang.perl.modules
      36  comp.lang.tcl
      32  comp.lang.perl
      21  comp.lang.basic.visual.misc
      21  comp.lang.c
      21  comp.groupware.lotus-notes.programmer
      21  comp.lang.pascal.delphi.misc
      21  comp.lang.javascript
      21  comp.lang.clarion

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

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

      24  "Michael T. Richter" <mtr@ottawa.com>
      18  redsky@ibm.net (Thane Hubbell)
      18  kenny@kacweb.com (Kenny Chaffin)
      18  pjm@see_my_sig_for_address.com
      15  Doug Hughes <doug@eng.auburn.edu>
      14  Jerome O'Neil <jeromeo@atrieva.com>
      12  "Todd Bandrowsky" <tbandrowsky@del.net>
       9  docdwarf@clark.net ()
       9  Mike Tiller <mtiller@ptrs14.srl.ford.com>
       9  Howard Brazee <brazee@NOSPAMhome.com>


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

Date: 8 Mar 1999 10:44:08 -0500
From: jacobc@wilde.oit.umass.edu (Jake)
Subject: Re: system()/print question
Message-Id: <36e3f048.0@oit.umass.edu>

Thanks to all who responded. I ended up using:
select((select(OUT),$|=1)[0]) and it worked!
Hopefully someone else can benefit from this info.
-Jake

Philip Newton (Philip.Newton@datenrevision.de) wrote:
: Tony Curtis wrote:
: > 
: > You're not autoflushing STDOUT, perldoc IO::Handle.
: 
: or perldoc perlvar, and look for $| .
: 
: Something like select((select(OUT),$|=1)[0]) should work, too.
: 
: TMTOWTDI.
: 
: > But why use an external process when perl can do it
: > already?
: > 
: > perldoc -f localtime
: > perldoc POSIX (strftime).
: 
: Because the time was just an example. What he really wants to do is
: something else.
: 
: Cheers,
: Philip


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

Date: Mon, 08 Mar 1999 15:11:47 +0100
From: "Hr. Jochen Stenzel" <Jochen.Stenzel.gp@icn.siemens.de>
Subject: Tied filehandles and Storable
Message-Id: <36E3DAA3.CA507689@icn.siemens.de>

Hello,

I want to use tied filehandles with Storable::store_fd() which is
implemented via Perls C API. The "Advanced Perl Programming" book says
that "once a variable is tied, even
accesses from the C API of the Perl library are delegated to the
corresponding tied object", but my code fails here. (It works well
together with print(), close() etc.)

Control is not delegated to my own function, and the C function dies
with "Bad filehandle: BDATA at blib/lib/Storable.pm (autosplit into
blib/lib/auto/Storable/_store_fd.al) line 127".
(BDATA is the tied "handle", and line 127 is the line were the C
function is called.)

Is there anything special I have to take care of?

Thanks in advance

                                        Jochen



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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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


------------------------------
End of Perl-Users Digest V8 Issue 5087
**************************************

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