[7706] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1332 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 17 16:17:26 1997

Date: Mon, 17 Nov 97 13:00:32 -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, 17 Nov 1997     Volume: 8 Number: 1332

Today's topics:
     +>> (Steve)
     Re: A Very Simple Perl Script (brian d foy)
     Re: Block comments in Perl? (Frank Hoehne)
     Re: continued match? <rootbeer@teleport.com>
     Re: exclusive file rights someone@usenet.net
     Re: function parameters <rootbeer@teleport.com>
     Re: function parameters (Andrew M. Langmead)
     Help with jump.cgi zebrafink@gmx.net
     Re: Help: problem about sendmail <rootbeer@teleport.com>
     Help: Recursive functions in Perl <vpatel@nba19.med.uth.tmc.edu>
     Re: how can i read a program from the internet (brian d foy)
     Re: LVALUE in perl <sfarrell+usenet@farrell.org>
     Re: OLE Problem <jan.krynicky@st.mff.cuni.cz>
     PATH_INFO <gt1295b@prism.gatech.edu>
     perl to browser ques (1740 co-op)
     Re: print "Location: my_html.html\n\n"; <rootbeer@teleport.com>
     Re: shoving STDOUT into a scalar <rootbeer@teleport.com>
     Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
     Re: Statistics for comp.lang.perl.misc (brian d foy)
     system("...") on Perl 5 on OS/2 <lmenard@caibm.ibm.com>
     Taint checking problem - insecure PATH Part 2 <ernestm@towery.com>
     Re: Tracking people leaving a website (brian d foy)
     Re: Tracking people leaving a website <zenin@best.com>
     Re: variable scope question (Charles DeRykus)
     Re: win32 Perl and NFS <lmricka@lynn.softnet.co.uk>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 17 Nov 1997 20:30:47 GMT
From: syarbrou@ais.net (Steve)
Subject: +>>
Message-Id: <3471a94d.21983381@news.ais.net>

Is +>> (read/append) a valid command in perl for opening a file?  I
thought perl only allowed reading or writing of a file but not both?
If valid, does it have any problems associated with it?  I'm having
some problems with file contents clearing at different times when
running my program and thought this may be involved.  Thanks.

Steve


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

Date: Mon, 17 Nov 1997 14:57:31 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: A Very Simple Perl Script
Message-Id: <comdog-ya02408000R1711971457310001@news.panix.com>

In article <cbks-1711971131080001@dave.magibox.net>, cbks@NOSPAM.magibox.net (Brock Sides) wrote:

>In article <64nvbk$p63$1@agate.nbnet.nb.ca>, Mike Butler <mgb@nbnet.nb.ca>
>wrote:
>
>> Hello All,
>> I'm attempting to use Perl as a CGI script to do a very simple thing and I
>> was wondering if someone could help. I'm currently running RedHat Linux
>> on a standalone Apache Web server.

>You should be able to figure out what's going on from this. 
>Or just re-use the code. This prints out the value of the form
>field named "input" on a new page.
>
>#!/usr/local/bin/perl
>
>if ($ENV{'REQUEST_METHOD'} eq 'GET') {
>
>   # Split the name-value pairs
>   @pairs = split(/&/, $ENV{'QUERY_STRING'});
>
>}
>
>if ($ENV{'REQUEST_METHOD'} eq 'POST') {
>   
>    # Get the input
>   read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>
>   # Split the name-value pairs
>   @pairs = split(/&/, $buffer);
>}


this little bit of cod ebelongs in the mythology section, methinks.

so what happens in there is data in the QUERY_STRING on a 
POST request? or there is a feild name with multiple values?

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 17 Nov 1997 20:42:58 GMT
From: frank.hoehne@hamburg.netsurf.de (Frank Hoehne)
Subject: Re: Block comments in Perl?
Message-Id: <3470aba0.5498033@news.hamburg.netsurf.de>

On 14 Nov 1997 15:30:24 GMT, mbeattie@sable.ox.ac.uk (Malcolm Beattie)
wrote:

>In article <346c1b7c.1335138@news.hamburg.netsurf.de>,
>Frank Hoehne <frank.hoehne@hamburg.netsurf.de> wrote:
>>>>>This is dumb but how do I do block comments in Perl (5.003)?  perlsyn says C 
>>>>>style /* */ block comment is out, so how?
>>>
>>>>The use of the "here-doc" syntax 
>>>>will let you do /* */-block-comments.
>>>
>>>sorry, but your answer has been added to the WRONG pile.
>>why?
>>>in your "solution", perl will create a new variable name and will grab
>>>a chunk of memory for it.
>>realy: And could you also name that variable:
>>...
>><<'*';
>>This commnents will not
>>go into POD's
>>*
>>...
>>Since here is no assignment to a variable, so why 
>>should any  memory allocation for the here-doc happen.
>>>
>>>since perl has built in block commenting features, ugly pseudo-solutions
>>>can be left at home.
>>>
>>your solution of using the pod-feature for commenting
>>things out seems ok if you realy want to see all the stuff
>>in your POD's.  But this is definetly not always the case.
>>This would made the POD's very ugly - using your nice wording.
>
>print "Hello world\n";
>
>=for nobody
>
>This isn't seen by anybody
>
>=cut
>
>print "more stuff here\n";
>
>--Malcolm
>
>-- 
>Malcolm Beattie <mbeattie@sable.ox.ac.uk>
>Oxford University Computing Services
>"I permitted that as a demonstration of futility" --Grey Roger

Ok, thanks Brian, thanks Malcom!
I tried this as nopod.pl:
 .....
#!/usr/bin/perl -w

print "Hello world\n";

=for nobody

This isn't seen by anybody

=cut

print "more stuff here\n";
 .....
but unfortunately:
pod2text nopod.pl
gave me the unwanted text as POD:

This isn't seen by anybody

which I wasn't hope to see, after having consultat perlpod ( esp.
=for), too.

Did I find a bug in Pod::Text? ( Wow, my first newbie bug-finding ?)
If yes, and if I can't fix it: who to send the bugreport ( to Tom)?

BW: I tried it with perl5.004_01, perl5.004_03, perl5.004_04 
all on solaris and perl5.004_02 on Win 95 with the same result.

Thanks,
Frank 


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

Date: Mon, 17 Nov 1997 10:58:21 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Gustav Kristoffer Ek <stoffer@netcetera.dk>
Subject: Re: continued match?
Message-Id: <Pine.GSO.3.96.971117105700.12318Y-100000@usertest.teleport.com>

On Sun, 16 Nov 1997, Gustav Kristoffer Ek wrote:

> hi, anyone who can tell me how to make a continued match, like $=B4 =3D~ =
m//;
> without using $=B4 ?

I suppose there is somebody who can do that, but since the =B4 character
doesn't even show up on my keyboard, I'm not the one. :-)  If you can tell
us a little better what you wish, maybe someone will be able to help you.
Thanks!

--=20
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Mon, 17 Nov 1997 20:53:23 -0800
From: someone@usenet.net
Subject: Re: exclusive file rights
Message-Id: <34711F43.5085@usenet.net>

Matt Dowell wrote:
> 
> We are running HP-UX and for some reason flock is not in the OS. So here
> is what I did to get around this. I think it's better anyways.
> 
> I first lock the file, and I do that by creating a file with the same
> name, just a .LOCK on the end.
> 
> When someone tried to access the file, i check for the filname.LOCK
> first, if there then loop. Constantly checking.
> 
> When the file is done being used, unlock it. : unlink (file.LOCK)
> 
> Works for me.
> 
> Matt dowell

Well, it is much better than nothing, but still not waterproof.

Imagine two processes waiting for the lock.
Process A finds out the file is free, but before it may lock it, 
it gets suspended. Process B finds out the file is free, so it
locks the file and continues, convicted he has locked the file.
Now the process A wakes and relocks the file.

And now both programs use the file at once, posibly subverting 
the other's work.

You need an atomic "create if nonexistent, fail otherwise".
Do you have such?

Jenda


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

Date: Mon, 17 Nov 1997 11:16:33 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jimmy Oh <jimmy.oh@icommerce.com.sg>
Subject: Re: function parameters
Message-Id: <Pine.GSO.3.96.971117110327.12318Z-100000@usertest.teleport.com>

On Mon, 17 Nov 1997, Jimmy Oh wrote:

> Suppose I have a string, $str.  The amount of stuff contains in $str is
> huge, say 1 Meg.  My question is, is there a difference in doing either
> of these:
> 
> foo($str); or foo(\$str);

Those calls, by themselves, should be essentially the same overhead. (But
use Benchmark if you really want to know.) On the other hand, what foo()
does with the value passed could make a great difference. (If it copies it
unnecessarily, that could be very expensive.) 

> Also for returning value, whether it is %hash, @arr, or $str, which is
> the preferred way(in terms of performance)?
> 
> return(%hash); or return(\%hash);
> return(@arr); or return(\@arr);
> return($str) or return(\$str);

With an aggregate, it's generally considered more efficient to return a
reference, if you can set up your algorithm to work that way. With a
scalar, it usually doesn't matter. But if the scalar is large, I'd
consider returning a reference as well. (Or, consider modifying an
argument passed by reference rather than having a return value.)

In any case, Benchmark is the One True Way to find out for sure. :-)

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Mon, 17 Nov 1997 20:07:26 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: function parameters
Message-Id: <EJt3wE.CzG@world.std.com>

jzawodn@wcnet.org (Jeremy D. Zawodny) writes:
>On Mon, 17 Nov 1997 11:06:53 +0800, Jimmy Oh
><jimmy.oh@icommerce.com.sg> wrote:

>>foo($str); or foo(\$str);

>Yes, a big one. One passes a few bytes (the later), while the other
>makes a 1MB copy of the data and passes it (the former).

Actually, the "foo($str)" isn't that big of a deal, its the 
"my ($str) = @_" that is done inside the foo subroutine that is the
killer. The subroutine call just makes $_[0] an alias to $str, its the
assignment inside the subroutine that makes the copy.

Its just without the assignment you end up having to deal with the
identifier-that-looks-like-line-noise "$_[0]".
-- 
Andrew Langmead


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

Date: Mon, 17 Nov 1997 14:33:20 -0600
From: zebrafink@gmx.net
Subject: Help with jump.cgi
Message-Id: <879797187.8842@dejanews.com>

Hello !

I want to use this script with frames ! Script in one frame called AUSWAHL
and the Links should be shown in the next frame called INHALT !

Can someone help me ?

Answers pleas to Zebrafink@gmx.net

#!/usr/bin/perl

  &parse_form;

  $gotourl = $FORM{'url'};

  print "Location: $gotourl\n\n";


sub parse_form {

   read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
   @pairs = split(/&/, $buffer);
   foreach $pair (@pairs) {
      ($name, $value) = split(/=/, $pair);

      $value =~ tr/+/ /;
      $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

      $FORM{$name} = $value;
   }
}

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Mon, 17 Nov 1997 11:43:59 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: ChuoSenko <thada@chuosenko.th.com>
Subject: Re: Help: problem about sendmail
Message-Id: <Pine.GSO.3.96.971117114302.12318c-100000@usertest.teleport.com>

On Mon, 17 Nov 1997, ChuoSenko wrote:

> #!/usr/local/perl
> open(SENDMAIL, "|/usr/lib/sendmail -t") ;
> print SENDMAIL <<EOF;
> From: user@domain1.com

If this doesn't give you a helpful error message, you're not using a
recent version of Perl. Install 5.004 and try again. Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Mon, 17 Nov 1997 12:54:24 -0600
From: Viren Patel <vpatel@nba19.med.uth.tmc.edu>
Subject: Help: Recursive functions in Perl
Message-Id: <347092E0.F57D5A3F@nba19.med.uth.tmc.edu>

Hello all. I am trying to write a recursive function in Perl. I have
been unable to find a single example on-line. Any pointers would be
greatly appreciated. As a start I have the following simple script:

    &scan_dir($ARGV[0]);

    sub scan_dir {
        local($dir);
        local($nextname);

        $dir = $_[0];
        chdir($dir);

        print "Current dir ==> $dir\n\n";

        while ($nextname = <*>) {
            print "\t$nextname\n";
            if (-d $nextname) {
                &scan_dir($dir."/".$nextname);
            }
        }
    }


On the following directory structure:

        ddd
            sub1
                sub1_file1
                sub1_file2
            sub2
                sub2_file1
            ddd_file1

I get the following output:

    Current directory ==> ddd

        ddd_file1
        sub1

    Current directory ==> ddd/sub1

        sub2
        sub1_file1
        sub1_file2


My questions: why does sub2 get printed while processing sub1? And after
finishing with sub1 why does the script not process sub2?

--

Viren Patel

Email : vpatel@nba19.med.uth.tmc.edu





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

Date: Mon, 17 Nov 1997 15:07:57 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: how can i read a program from the internet
Message-Id: <comdog-ya02408000R1711971507570001@news.panix.com>

In article <01bcf353$436ec7e0$19a4e8ca@univac-ii>, "Rafael Tokashiki" <rtt@ii-okinawa.ne.jp> wrote:

>How cain i read a perl program that is on the cgi bin directory?

ask the author for the source. :)

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 17 Nov 1997 19:31:38 GMT
From: stephen farrell <sfarrell+usenet@farrell.org>
To: msuarez@cybernet.com
Subject: Re: LVALUE in perl
Message-Id: <8767prmi5h.fsf@phaedrus.uchicago.edu>

"Michael A. Suarez" <msuarez@cybernet.com> writes:

> I have also posted this program which clearly shows how the bug occurs. 
> (And it is a bug, it doesn't happen in 5.001, didn't try 5.002).

I'm reading this as:

if you pass as an argument to a function an array (or hash) which is
indexed out-of-bounds/non-existent key (which, of course, perl should
handle gracefully) it somehow whacks up the ability of ref() so that
it returns LVALUE instead of SCALAR, but other refs still work
ok.... 


Is this what you're thinking as well?

Have you found that assuming that "LVALUE" is synonymous with "SCALAR"
a work-around for this problem?

--sf


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

Date: Mon, 17 Nov 1997 21:10:29 -0800
From: Jan Krynicky <jan.krynicky@st.mff.cuni.cz>
To: Gilles.Maire@ungi.com
Subject: Re: OLE Problem
Message-Id: <34712345.59C@st.mff.cuni.cz>

Gilles Maire wrote:
> 
> Hello,
> 
> I use a small program to open many Excel file in Perl and the problem
> crash after 10 files because the Excel program doesn't end fine and
> stay in memory.
> 
> I have 10 excel files loaded.
> 
> Any suggestions ?
> 
> My program is  :
> 
> use OLE;
>      $dir1="c:/dir1/";
>      $dir2="c:\\dir2\\" ;
> 
>      opendir ( DIR , $dir1 );
>      while ( $file=readdir (DIR) )
>      {
>      if ( $file=~/.xls$/ )
>       {
>        $excel = CreateObject OLE 'Excel.Application' or warn "Couldn't
> create new instance of Excel App!!";
> 
>        print "$file : " ;
>        $file=$dir2 . $file ;
> 
>        $excel->Workbooks->open("$file");
> 
> $count=$excel->Workbooks(1)->Worksheets('Shet1')->Cells(43,5)->{Value}
> 
>         print "$count\n";
>         $excel->quit ();
> 
>      }
> }
> 
>      }
> 
>      print "$total F H.T.\n" ;
> 
>      close (DIR);
> 
> 
> 
> Amicalement
> 
>           Gilles.Maire@ungi.com
> |||||||||||||||||||||||||||||| - UNGI - ||||||||||||||||||||||||||||||
>           http://www.ungi.com

Well maybe I'm stupid but ... why do you keep quiting and restarting
Excel?


use OLE;
$dir1="c:/dir1/";
$dir2="c:\\dir2\\" ;

$excel = CreateObject OLE 'Excel.Application' 
or warn "Couldn't create new instance of Excel App!!";

opendir ( DIR , $dir1 );
while ( $file=readdir (DIR) ) {

 if ( $file=~/.xls$/ ) {

   print "$file : " ;
   $file=$dir2 . $file ;

   $excel-Workbooks->open("$file");

  
$count=$excel->Workbooks(1)->Worksheets('Shet1')->Cells(43,5)->{Value}
 
   print "$count\n";

   $excel->Workbooks(1)->Close(); # not sure about this one
    # may look a bit different
 
 }
}
 
print "$total F H.T.\n" ;
 
close (DIR);
$excel->quit ();
 
__END__


This should do the trick much more quickly.

Jenda


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

Date: Mon, 17 Nov 1997 15:14:13 -0800
From: "Jodi M. Shephard" <gt1295b@prism.gatech.edu>
Subject: PATH_INFO
Message-Id: <3470CFC5.4661@prism.gatech.edu>

How do I set a $ENV{PATH_INFO}?  I need to track a user_name through
this.  

Thank for any help!


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

Date: Mon, 17 Nov 1997 14:33:07 -0600
From: "Brian Wrenn (1740 co-op)" <1740.co-op.0517515@nt.com>
Subject: perl to browser ques
Message-Id: <3470A9FB.742D@nt.com>

Hey all,

I'm fairly new at perl, so this may seem very entry level to most, but I
have a perl (Perl for Win 32) script that does exactly as it should
(calls a java program in the same directory) when I run it on the DOS
window command line, but when I run it through CGI with Netscape 4.0,
none of the java program's standard output displays in the browser.  I
only get the printed regular html text.  I'm calling the java program
like this:

print "Content-type: html/text\n\n";
print "<html><head><title>My Script</title></head>";
print "<body>";
print "<h1>My Script</h1>\n";
$buffer = `java myprog arg1 arg2 arg3`;  # <- this is what doesn't
$exit_code = $?>>8;                      #    output through Netscape
print $buffer;
print "</boyd></html>";

If there is a better way to do the same thing, please tell me.

Thanks,
Brian


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

Date: Mon, 17 Nov 1997 11:42:06 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: jerome bradenbaugh <bradenb@ibm.net>
Subject: Re: print "Location: my_html.html\n\n";
Message-Id: <Pine.GSO.3.96.971117114116.12318b-100000@usertest.teleport.com>

On Mon, 17 Nov 1997, jerome bradenbaugh wrote:

> However, NN won't cooperate. Any ideas how to workaround?

If there is a way, the people who know about browsers might be able to
help. Unless there's a version of Netscape Navigator which is written in
Perl, it's off-topic here! :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: Mon, 17 Nov 1997 11:40:43 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Brad Fitzpatrick <usenet_post@bradfitz.com>
Subject: Re: shoving STDOUT into a scalar
Message-Id: <Pine.GSO.3.96.971117111726.12318a-100000@usertest.teleport.com>

On Mon, 17 Nov 1997, Brad Fitzpatrick wrote:

> what I'd like to do is capture everything printed to STDOUT for a
> portion of my script and concatenate it all together in one scalar. 

It's probably better to just concatenate things into the scalar from the
beginning. Or to open another filehandle for output, select it as the
default, and let the output go there. But one way would be to use a tied
filehandle. Another would be to open STDOUT with the pipe() function, and
read it in periodically. Be sure to read often enough to prevent
deadlocks, though! Or you could redirect output to a file, then seek() and
re-read the file, more or less like this. 

    $filename = "/tmp/stdout.$$.$^T";
    open SAVEOUT, ">&STDOUT"
	or die "Can't dup stdout: $!";
    close STDOUT	# explicitly
	or die "Can't close stdout: $!";
    open STDOUT, "+>$filename"
	or die "Can't redirect stdout: $!";
    unlink $filename;	# works on Unix-type systems, at least

    # Your existing code prints here:
    print "this goes to the file...\n";
    print "so does this.\n";

    # Now we want to see what was printed
    select SAVEOUT;	# So we can see the output!
    seek STDOUT, 0, 0
	or die "Can't seek: $!";
    print "Saved: $_" while <STDOUT>;

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/
              Ask me about Perl trainings!



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

Date: 17 Nov 1997 19:41:22 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <64q6l2$9q9$1@info.uah.edu>

Following is a summary of articles spanning a 7 day period,
beginning at 08 Nov 1997 09:58:35 GMT and ending at
15 Nov 1997 04:59:44 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" e-mail address and name.
    - Original Content Rating is the ratio of the original content volume
      to the total body volume.
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.

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

perlfaq-suggestions@mox.perl.com

Totals
======

Total number of posters:  395
Total number of articles: 833 (322 with cutlined signatures)
Total number of threads:  329
Total volume generated:   1372.8 kb
    - headers:    552.1 kb (11,412 lines)
    - bodies:     756.4 kb (24,500 lines)
    - original:   518.8 kb (17,573 lines)
    - signatures: 62.2 kb (1,168 lines)
Original Content Rating: 0.6859

Averages
========

Number of posts per poster: 2.11
    median: 1 post
    mode:   1 post - 271 posters
    s:      4.30 posts
Number of posts per thread: 2.53
    median: 2 posts
    mode:   1 post - 123 threads
    s:      2.02 posts
Message size: 1687.5 bytes
    - header:     678.7 bytes (13.7 lines)
    - body:       929.8 bytes (29.4 lines)
    - original:   637.8 bytes (21.1 lines)
    - signature:  76.4 bytes (1.4 lines)

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

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

   56    88.4 ( 38.4/ 38.1/ 20.8)  brian d foy <comdog@computerdog.com>
   43    68.7 ( 29.6/ 29.5/ 18.3)  Martien Verbruggen <mgjv@comdyn.com.au>
   33    56.4 ( 19.3/ 37.1/ 22.0)  Tad McClellan <tadmc@flash.net>
   25    49.6 ( 13.3/ 28.4/ 15.5)  Mike Stok <mike@stok.co.uk>
   22    32.8 ( 18.7/  9.4/  6.0)  Tom Phoenix <rootbeer@teleport.com>
   12    17.3 (  7.8/  7.8/  4.7)  Zenin <zenin@best.com>
    9    20.5 (  6.2/ 14.3/ 10.3)  "Creede Lambard" <fearless@io.com>
    8    18.6 (  5.3/ 13.3/  9.5)  Mark Mielke <markm@nortel.ca>
    8    12.0 (  5.2/  6.6/  2.4)  Toutatis <toutatis@_SPAMTRAP_toutatis.net>
    7    18.3 (  3.6/ 13.7/ 10.6)  Greg Bacon <gbacon@cs.uah.edu>

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

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

  88.4 ( 38.4/ 38.1/ 20.8)     56  brian d foy <comdog@computerdog.com>
  68.7 ( 29.6/ 29.5/ 18.3)     43  Martien Verbruggen <mgjv@comdyn.com.au>
  56.4 ( 19.3/ 37.1/ 22.0)     33  Tad McClellan <tadmc@flash.net>
  49.6 ( 13.3/ 28.4/ 15.5)     25  Mike Stok <mike@stok.co.uk>
  32.8 ( 18.7/  9.4/  6.0)     22  Tom Phoenix <rootbeer@teleport.com>
  20.5 (  6.2/ 14.3/ 10.3)      9  "Creede Lambard" <fearless@io.com>
  18.6 (  5.3/ 13.3/  9.5)      8  Mark Mielke <markm@nortel.ca>
  18.3 (  3.6/ 13.7/ 10.6)      7  Greg Bacon <gbacon@cs.uah.edu>
  17.3 (  8.9/  8.4/  5.5)      7  Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
  17.3 (  7.8/  7.8/  4.7)     12  Zenin <zenin@best.com>

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

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

0.9984     3.8 /   3.8      6  John Moreno <phenix@interpath.com>
0.9891     3.5 /   3.6      5  Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh" <bsa@void.apk.net>
0.9266     7.9 /   8.5      5  Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
0.8750     3.4 /   3.8      5  Matthew Cravit <mcravit@best.com>
0.8307     5.6 /   6.8      6  "Kelvin D. Olson" <kelvin@pubgroup.com>
0.7759    10.6 /  13.7      7  Greg Bacon <gbacon@cs.uah.edu>
0.7758     4.9 /   6.3      6  Andrew M. Langmead <aml@world.std.com>
0.7150    10.3 /  14.3      9  "Creede Lambard" <fearless@io.com>
0.7142     9.5 /  13.3      8  Mark Mielke <markm@nortel.ca>
0.6494     5.5 /   8.4      7  Eli the Bearded <usenet-tag@qz.little-neck.ny.us>

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

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

0.5464    20.8 /  38.1     56  brian d foy <comdog@computerdog.com>
0.5449    15.5 /  28.4     25  Mike Stok <mike@stok.co.uk>
0.5318     2.4 /   4.6      6  Charles DeRykus <ced@bcstec.ca.boeing.com>
0.5316     2.3 /   4.3      5  Douglas Seay <seay@hol.fr>
0.4864     2.1 /   4.4      5  Ilya Zakharevich <ilya@math.ohio-state.edu>
0.4589     4.1 /   9.0      5  William R. Ward <hermit@cats.ucsc.edu>
0.4479     2.7 /   5.9      5  Bill Guindon <billg@networkapparel.com>
0.4297     2.0 /   4.6      5  petri.backstrom@icl.fi
0.3617     2.4 /   6.6      8  Toutatis <toutatis@_SPAMTRAP_toutatis.net>
0.2758     3.3 /  11.9      5  on.maps.barker@cix.co.uk

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

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

   17  Block comments in Perl?
   16  CPAN confusion
   11  Better Way in Perl
   11  How To Test if number is ODD or EVEN?
    8  "perl aware" vi editor?
    8  Passing Variables
    8  odd difference between C and Perl
    8  How do I create a random number with Perl?
    8  carriage returns
    7  Foo - Bar

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

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

  36.6 ( 12.5/ 22.0/ 12.0)     16  CPAN confusion
  27.3 (  5.0/ 22.0/ 11.6)      6  Alternatives to CGI.pm (was Re: Continuations in perl?)
  26.5 ( 12.8/ 12.3/  6.8)     17  Block comments in Perl?
  19.8 (  8.9/ 10.3/  5.2)     11  Better Way in Perl
  16.9 (  4.3/ 12.5/ 10.2)      6  Statistics for comp.lang.perl.misc
  15.2 (  7.9/  6.7/  3.7)     11  How To Test if number is ODD or EVEN?
  14.8 (  3.8/ 10.5/  8.0)      6  Q: Wierd argument passing, bug?
  14.6 (  2.6/ 12.0/  4.2)      4  Help/newtoPERL/Input files
  13.1 (  5.1/  8.0/  4.8)      8  Passing Variables
  12.5 (  3.1/  9.2/  6.0)      5  What's wrong w/this picture?

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

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

      11  comp.lang.perl.modules
       9  alt.fan.e-t-b
       8  comp.lang.c
       4  comp.lang.perl
       3  comp.lang.perl.tk
       3  comp.infosystems.www.misc
       3  comp.lang.java
       2  comp.lang.java.programmer
       1  misc.forsale.computers.other.misc
       1  alt.marketplace.books

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

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

       7  Sax Therapy <saxmania@ripco.com>
       7  Eli the Bearded <usenet-tag@qz.little-neck.ny.us>
       3  "carl Nygard" <nygard@knmi.nl>
       3  Fabrizio Pivari <pivari@geocities.com>
       2  John Davis <jd@mukh.asc.ox.ac.uk>
       2  Zenin <zenin@best.com>
       2  Casper H.S. Dik - Network Security Engineer <Casper.Dik@Holland.Sun.Com>
       2  Brian Wheeler <bdwheele@indiana.edu>
       2  "Billy Patton" <bpatton@flash.net>
       2  "Peter Lagerweij" <lagerwey@knmi.nl>


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

Date: Mon, 17 Nov 1997 14:43:19 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Statistics for comp.lang.perl.misc
Message-Id: <comdog-ya02408000R1711971443190001@news.panix.com>

In article <EJsqCs.1ro@world.std.com>, aml@world.std.com (Andrew M. Langmead) wrote:

>I have been toying with an idea that may alleviate the situation. If
>the frequent posters to comp.lang.perl.* put a header in their posts
>that are answers to FAQs (maybe with the contents of the header being
>a URL to the source of their answers.) others may find a way to kill
>both the response and its originating question. They reason that I'm
>thinking of putting the URL in the header is to differentiate the
>posts between absolutely factual answers and replies that are contain
>they authors opinions.

let's not forget that URLs don't differentiate between fact and opinion. :)

but please elaborate.  it sounds interesting.

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: Mon, 17 Nov 1997 15:29:16 -0500
From: Larry Menard <lmenard@caibm.ibm.com>
Subject: system("...") on Perl 5 on OS/2
Message-Id: <3470A91C.2F87@caibm.ibm.com>

Hi all.

   We've been using Perl 4 on our OS/2 environment here for a long, long
time.  However, we have found a problem with it which may force us to
move to Perl 5.  (The problem is that taking the output of &gmtime() and
pumping it through &timegm() does NOT return the original values).


   In my testing of Perl 5 on OS/2, I've found that system("...") no
longer works: system("cmd /c ...") must be used.

   We didn't have to do this on Perl 4.  Why is it now necessary in Perl
5?

   Unfortunately, nobody knows who originally set up the Perl 4 on our
OS/2 environment.  I was hoping that this is some local customization
that was done to our Perl 4 to allow us to not have to use the whole
"cmd /c" schmeer.

   Anybody have any suggestions?

   Thanks in advance.

-- 

Larry Menard
Team Lead, Workstation DataBase Regression Testing.
Defender of geese and of all things natural.


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

Date: Mon, 17 Nov 1997 13:36:04 -0600
From: Ernest Mueller <ernestm@towery.com>
Subject: Taint checking problem - insecure PATH Part 2
Message-Id: <34709CA4.E04D313F@towery.com>

> > OK, we have a CGI Perl script with tainting enabled, which when run from
> > the command line works fine.  When run from the Web server it gives us
> > the "insecure $env{path} while running with -t switch at..." error.
> > However, it appears that the PATH is set just fine.

OK, thanks for the explanation everyone - I now know I'm supposed to set PATH in
all taint enabled scripts (the perlsec manpage was *not* clear on this), and I
can accept that.  I'm still very concerned that there is no such error occuring
when I run the script from the command line.

If I run my script, we'll say "ernestm.cgi", from the command line, either as
root or a normal user, it runs fine and spits out the error HTML for empty
fields we've defined in the script.  If I run it through the Web server, it
fails and sticks the "insecure PATH" error in the Web log.

The top line of the script is #!/usr/bin/perl -T.  If I add a PATH definition,
the error goes away and it works from the Web server too - but my question is
now why is it *not* giving me that error from the command line?  I'm running
perl 5.003 + patches on an IRIX 6.4 box.  The problem also occurs in perl
5.004_1 on IRIX 6.3.

The Web server is setting up a standard environment much like the one I'm
logging in under.  So I'm not sure what would be different - any ideas?

Thanks,
Ernest
-- 
Ernest C. Mueller                                ernestm@towery.com
Webmaster                                        Phone: (901) 251-7000
Towery Publishing                                http://www.towery.com


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

Date: Mon, 17 Nov 1997 15:01:21 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Tracking people leaving a website
Message-Id: <comdog-ya02408000R1711971501210001@news.panix.com>

In article <879759472.311694@thrush.omix.com>, Zenin <zenin@best.com> wrote:

>Peter Schoon <alex1@#nospam#.usa.net> wrote:
>: Does anybody know of the existence of a perl script that tracks users
>: leaving a webpage and where they are going ie.
>: http://www.whatever.com/redirect?url=www.yahoo.com
>: Call me lazy and I know it's a small programming job but I just don't
>: want to go and do it and then find out somebody else has done it and
>: is just giving it away.
>
>        Untested and off the top of my head, but here ya go:

hmmm... a combination that usually leads to bad answers...

>        #!/usr/local/bin/perl -w
>        use strict;
>        print "Location: http://$ARGV/\n\n";

from where does that $ARGV come?  doesn't the script complain
about unimported variables and use of uninitialized values?

-- 
brian d foy                                  <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)*  <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>


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

Date: 17 Nov 1997 20:50:39 GMT
From: Zenin <zenin@best.com>
Subject: Re: Tracking people leaving a website
Message-Id: <879799996.546860@thrush.omix.com>

brian d foy <comdog@computerdog.com> wrote:
: In article <879759472.311694@thrush.omix.com>, Zenin <zenin@best.com> wrote:
: >        Untested and off the top of my head, but here ya go:
: hmmm... a combination that usually leads to bad answers...

	Well, ya get what ya pay for. :)

: from where does that $ARGV come?  doesn't the script complain
: about unimported variables and use of uninitialized values?
	Yes, it would, had I tested it.  Like I said, it was off the
	top of my head and untested, with about 2 hours sleep.  :-)

: >        print "Location: http://$ARGV/\n\n";

	Here, change it to:

	print "Location: http://$ARGV[0]/\n\n";

	There, feel better? :-)

-- 
-Zenin
 zenin@best.com


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

Date: Mon, 17 Nov 1997 19:21:01 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: variable scope question
Message-Id: <EJt1r3.BFz@bcstec.ca.boeing.com>

In article <upsetter-1611972300070001@mfs-01-214.port.shore.net>,
Scratchie <upsetter@ziplink.net> wrote:
 > 
 > Greetings;
 > 
 > I'm looking for some Perl advice.
 > 
 > Here is a code fragment:
 > 
 >    sub printTableNew {
 >       my ($flag, $save_these, $total, %my_hash) = @_;
 >    
 > I wanted to do something like this:
 >    
 >       my($sort_method);
 >    
 >       if ($flag eq 'a') {
 >          $sort_method = sub { ($a cmp $b) };
 >       } else {
 >          $sort_method =  sub { 
 >             ($my_hash{$b} <=> $my_hash{$a}) || ($a cmp $b)
 >          };
 >       }
 >    
 >        foreach $key (sort &$sort_method keys %my_hash){
 >    
 >          # do some processing here...
 >       }
 > 
 > However, this failed... I believe that this is because the my(%my_hash) is
 > not visible to the anonymous subroutines referenced by $sort_method.
 > Correct?
 > 
 > 

No, the sort needs either a bare subroutine name or a block which
points to an anonymous inline sort routine. In this case, our
anonymous inline routine consists of a single subroutine call.
 

Try this:

 foreach $key (sort { &$sort_method } keys %my_hash){




HTH,
--
Charles DeRykus


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

Date: 17 Nov 1997 20:53:46 GMT
From: "Lynn. Rickards" <lmricka@lynn.softnet.co.uk>
Subject: Re: win32 Perl and NFS
Message-Id: <01bcf202$b1ceaea0$LocalHost@swhpziuv>

Matthew,

I have had no problems with the combination of Gurusamy Sarathy's perl/Tk
binary distribution, and NFS sharing from Solaris 1.x using Samba.

For most of my users, I have set the perl and p/tk scripts to run from a 
single NFS share also.

HTH

Lyndon Rickards  

Matthew H. Gerlach <gerlach@netcom.com> wrote in article
<gerlachEJK4Kn.92M@netcom.com>...
> 
> Hi,
> 
> We are using Activeware's perl 5.003_07 under Windoze 95.  We are having
> problems making perl scripts read files that NFS mounted.  The open()
> fails with the error, "Not enough space".  We are using FTP's NFS client
> software.
> 
> Has anyone had luck reading NFS mounted files from perl scripts under
> win95?  Which perl and which NFS?
> 
> Matthew
> 


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.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 1332
**************************************

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