[6981] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 606 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 12 11:17:13 1997

Date: Thu, 12 Jun 97 08:00:35 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 12 Jun 1997     Volume: 8 Number: 606

Today's topics:
     "Large Files" <jpillan@indiana.edu>
     Re: [Q] I cna't use 'use' command on CGI program.. why? (Kjetil Skotheim)
     Re: Accumulating statistics (William G. Royds)
     Re: Better way to split long strings into equal length  <ajohnson@gpu.srv.ualberta.ca>
     Comparing dates. (Brian Mcandrews)
     Re: Copy with PERL ? (Nathan V. Patwardhan)
     Re: Help on executing DOS commands through perl <joshua@mongoose.demon.co.uk>
     Re: how to make a script executable on DOS (Petr Prikryl)
     Re: most *robust* DBD::DBI/database combination ( <1M r (John D Groenveld)
     passing args to an external process, $foo=`lib arg`; or (Anthony Mulligan)
     Perl Programmer llemond@tech.belcan.com
     Re: Printing Prime Numbers (Bill McHale)
     Re: problems with perl5.004 on AIX 3.2.5 (Bob Shair)
     Re: regexp question: greener than godzilla... <danboo@ixl.com>
     Re: regexp question: greener than godzilla... (William G. Royds)
     Re: RFD: comp.lang.perl reorganization (David P. Huff)
     Re: RFD: comp.lang.perl reorganization (A. Deckers)
     Re: RFD: comp.lang.perl reorganization <eglamkowski@mathematica-mpr.com>
     security question brz@hotmail.com
     Re: Sorting Numerically <sibsib@hotmail.com>
     Re: strings (Bob Wilkinson)
     test (Uri Bardugo)
     Upload a gif/jpg file with perl (Uri Bardugo)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 12 Jun 1997 08:07:29 -0500
From: John Pillans <jpillan@indiana.edu>
Subject: "Large Files"
Message-Id: <339FF491.1E87@indiana.edu>

I would like to know if anyone has been able to get Perl to write files
larger than 2^^30-1?  I am running Perl on AIX 4.2.1 which supports file
sizes up to 32 gig.  I have tried adding a #define to perl.h.  One was
_LARGE_FILES this got a compile error.  The other was _LARGE_FILE_API. 
Perl compiled fine, but wrote a test program and the file grew to about
2^^30-1 and stopped.  Anyone done this or is it just impossible under
Perl?

Thanks for any help

John Pillans
jpillan@indiana.edu


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

Date: 12 Jun 1997 12:22:31 GMT
From: kjetil.skotheim@usit.uio.no (Kjetil Skotheim)
Subject: Re: [Q] I cna't use 'use' command on CGI program.. why????
Message-Id: <5nopm7$1v7$2@ratatosk.uio.no>

In article <339e4cb5.74408253@news.hansol.net>, jbkim@cnt.co.kr says...
>
>Sorry.. and Thanks
>
>I can't use 'use' keyword on CGI...
>
>That is executed on command prompt... but not on CGI..
>
>'require' command too.. but, that command is execute if perameter is
>full path...
>
>require "lib.pl"; <- error occur..
>
>require "c:\\cgi-bin\\lib.pl"; <- execute well..
>
>but use command is not execute... why...
>


Maybe you have a env-variable PERLLIB in the shell which is not
defined when the CGI-script runs? Try this:

use lib 'c:\\cgi-bin';
use Whatever;






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

Date: Wed, 11 Jun 1997 21:15:40 +0000
From: az915@freenet.carleton.ca (William G. Royds)
To: josephw@tamu.edu
Subject: Re: Accumulating statistics
Message-Id: <339F157C.29AC@freenet.carleton.ca>

Joseph Weinman wrote:
> 
> I am trying to use perl to keep track of a type of database "fulltext".
> This type can be almost anything, an Article, Review, Editorial, etc.
> 
> Since I do not know all the different elements "type" can have, I was
> wondering if it were possible to have perl accumulate the ones that
> appear in a log.
> 
> For example, say the first fulltext type is an Article.  That is easy
> enough to store.  The next time the type is a Review.  A simple if
> statement to see if the second==first would be easy.  The thrid is an
> Editorial.  The simple if statement would work again.  But the fourth
> time say it is a Review.  If these are the only 4 entries, I would want
> to be able to say "There are 1 Article(s) viewed, 2 Review(s) viewed,
> and 1 Editorial(s) viewed."
> 
> Is there a function of perl that would allows this easily?  I assume
> some kind of array and one would search the array to see if the new
> "type" was already seen before.  Can this be done?  Any help in syntax
> would be greatly appreciated.
> 
> Thanks,
> 
> Joseph R. Weinman
> josephw@tamu.edu


   Why not use a hash with the key being the type  and the values being
the various statistics you want to save about that particular type

   wordcount{$type} += `wc -w $textfile`;
etc.
-- 
Bill Royds
Hunt-Club/OT8(Mooney's Bay)/R16


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

Date: Wed, 11 Jun 1997 23:20:28 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Better way to split long strings into equal length parts?
Message-Id: <339F790C.68A15E59@gpu.srv.ualberta.ca>

Tom Phoenix wrote:
!
! On 11 Jun 1997, Kjetil Skotheim wrote:
! 
! > What is the fastest and/or most elegant way to split a long
! > string into equal length parts into a list.
! 
! > (With unpack?)
! 
! You got it!
! 
!     sub breakup ($$) {
!         my($string, $chunk_size) = @_;
!         my $times = length($string)/$chunk_size;
!         $times++ if $times > int($times);
!         my $format = ('a' . $chunk_size) x $times;
!         unpack $format, $string;
!     }
! 
! Hope this helps!

but he said 'fastest' and 'faster' methods in his
original... I clock yours running 1.5 times slower
than the original. :-)

I won't venture into the subjective realm of 'most elegant' ;-)

regards
andrew


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

Date: 12 Jun 1997 09:29:32 -0500
From: bmcandre@shrike.depaul.edu (Brian Mcandrews)
Subject: Comparing dates.
Message-Id: <5np14c$6c8@shrike.depaul.edu>

How can I compare two dates (ie, todays date being greater than a date 
2 months ago)?

Thanks
Brian



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

Date: 12 Jun 1997 13:51:51 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Copy with PERL ?
Message-Id: <5noutn$rfv@fridge-nf0.shore.net>

Lopez (jlsantos@mail.telepac.pt) wrote:
: Can any one tell me if it is possibel to

It's not possibel, but yes, it's possible.  :-)

: have a routine that makes a copy of
: somes files in one directory to
: other directory ?

Use the File::Copy module, which is documented in the module (POD).

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Thu, 12 Jun 1997 15:02:14 +0100
From: Joshua <joshua@mongoose.demon.co.uk>
To: Nathan Raupach <webmaster@auditorgen.state.pa.us>
Subject: Re: Help on executing DOS commands through perl
Message-Id: <33A00166.4FDE@mongoose.demon.co.uk>

Nathan Raupach wrote:
> 
> I am having trouble capturing the output of DOS commands through perl.
> When I try to assign the output of a DOS command to a variable using
> 'backticks', the command executes in the DOS window and returns nothing
> to the variable.  For example, if I have the following line in a script:
>         @output = `dir`;
> the "dir" command executes in the DOS window, but returns nothing to the
> variable "output".

That line works fine on my windows 95 machine.  Why don't
you post what version of perl you are using, and the exact
operating system?

--
Joshua Swink
joshua@mongoose.demon.co.uk


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

Date: 12 Jun 1997 12:26:49 GMT
From: prikryl@dcse.fee.vutbr.cz (Petr Prikryl)
Subject: Re: how to make a script executable on DOS
Message-Id: <5nopu9$php$1@boco.fee.vutbr.cz>

Tyler Schutjer (tschutj@xmission.com) wrote:
>This has always worked for me

>C:\PERL\PERL PERLFILE
>(the sole contents of a file called "master.bat" - "PERLFILE" being the
>perl code, of course...)

I agree. I also use more "enhanced" batch files for the case when I
want to modify the work of bigger scripts. Basically, I write a small
perl script which calls the bigger one (functions) and I wrap it to
convert it into batch file this way (the real example):

snap.bat
---------------------------------------------------------------------
@rem = ' -*- mode: perl; -*-
@echo off
perl q:\emtex\0spravce\bin\snap.bat
goto END
';

# snap.pl - Script for maintenance...
######################################################################

use strict;

use lib "q:/perl/uivt";

use xadmin;      # use some modules with functions
# ... shortened
#---------------------------------------------------------------------

my $root = "q:/emtex";              # root directory
my $spravce = "$root/0spravce";     # spravce = administrator
my $configs = "$spravce/configs";   # ...

my ($oldcfg, $newcfg) = xadmin::set_config_dirs($configs);  # snaps


# Save contents of the directiories
#
my @dirs = (
    "$root/bibtex",
    "$root/texinput",
    "$root/tfm",
    "$root/win",
    # ... shortened for the brevity
);


######################################################################
# Body
#
{
    unlink xglob::fileglob($newcfg); # erase the old attempt to save
    xls::xls(@dirs);                 # save the contents
}
###################################################################### 
__END__

:END
---------------------------------------------------------------------

The first line says @rem = ' -*- mode: perl; -*-
which is a comment from the batch's point of view and an assignment 
to the array @rem from the Perl's point of view. The string -*-...
is only a mark for editor (JED) to set the Perl mode (syntax 
highligting). It is not important for the run.

Next thre lines (@echo, Perl, and goto) are commands of the batch
file and the continuation of string for the assignment to the 
@rem variable. The batch ignores the lines after goto and finishes
at the :END. 

The third line calls perl and uses the batch file as a perl script.
The script assigns the first few lines into @rem and continues
until __END__ which is a correct and documented way how to say 
the Perl that the script ends here.

I hope that this is clear enough. If you have more questions, ask.

Happy Perling

Petr

P.S. This is written for Perl 5. I am not sure about Perl 4.

--
Petr Prikryl (prikryl@dcse.fee.vutbr.cz)   http://www.fee.vutbr.cz/~prikryl/
TU of Brno, Dept. of Computer Sci. & Engineering;    tel. +420-(0)5-7275 218


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

Date: 12 Jun 1997 10:22:49 -0400
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: most *robust* DBD::DBI/database combination ( <1M records ) ??
Message-Id: <5np0np$1u8$1@tholian.cse.psu.edu>
Keywords: perl,database,DBD,DBI,cgi,www

In article <slrn5p7mp3.jj.amore@teleport.com>,
Linux_User <amore@teleport.com> wrote:
>Any suggestions, or reference articles?

There was an excellent article about DBI and the DBD::* modules in a
recent issue of The Perl Journal.  See http://www.tpj.com/ The DBI mail
list is archived at http://outside.organic.com/mail-archives/dbi-users/
and http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-Interest/

Happy Perl'ng
John
groenvel@cse.psu.edu


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

Date: 12 Jun 1997 14:18:26 GMT
From: avm@best.com (Anthony Mulligan)
Subject: passing args to an external process, $foo=`lib arg`; or open(PIPE
Message-Id: <avm-3008560511320001@avm.vip.best.com>

I have been trying to pass a series of args , namely, the values of a set
of pre-defined keys using 

 print "<PRE>VoiceDBAccess.060697 $args</PRE>\n";     # Optional, for
 open(PIPE,"VoiceDBAccess.060697 $args |");   # Execute the command,
 while (<PIPE>) {
       
#where args have been defined as :
#
%arguments = (
        "AddOrder"    => "ORDER_NUMBER USER_ID ORDER_COMMIT_DATE
ORDER_NOTE",
        #"ShowOrder"   => "ORDER_NUMBER",
        #"CancelOrder" => "ORDER_NUMBER",
        # Additional commands and argument lists go here
                );
$command = $FORM{'COMMAND'};
$keys = $arguments{$command};
#if ($keys eq "") {
#     print "Content-type: text/plain\n\n Error: unknown command
$command\n";
#     foreach $_ (sort keys %FORM) {
#       print "$_ = ", $FORM{$_}, "\n\n";
#}
#     exit;
#}

   $args = $command;
   foreach $key (split(" ",$keys)) {        # Do positional parameters
    
}
 This seems to be sending just the keys/names,
("AddOrder"    => "ORDER_NUMBER USER_ID ORDER_COMMIT_DATE)
  as args to the lib, when all I wish to send are the positional values
that have been parsed and saved plus the op-code 'AddOrder' as a db_key .
("AddOrder" 12 fred 12-jun-1997), 

Also Should I be using the $foo ``; here instead of open(PIPE, " |");

Here's the complete script. thanks in advance.
#!/usr/local/bin/perl


###
###Oracle ENV VARS
###


$ORACLE_BASE = $ENV{'ORACLE_BASE'} = "/tools/oracle/app/oracle";
$ORACLE_HOME = $ENV{'ORACLE_HOME'} = "$ORACLE_BASE/product/7.3.2";
$ORACLE_SID = $ENV{'ORACLE_SID'} = "DEV";
$ORACLE_TERM = $ENV{'ORACLE_TERM'} = "xsun5";        # ??????
$ORACLE_PATH = $ENV{'ORACLE_PATH'} =
"/orion/httpd/cgi-bin:$ORACLE_HOME/bin:/opt/bin:$ORACLE_HOME/orainst";
$PATH = $ENV{'PATH'} =
"/orion/httpd/cgi-bin:$ORACLE_HOME/bin:/opt/bin:$ORACLE_HOME/orainst";
$LD_LIBRARY_PATH = $ENV{'LD_LIBRARY_PATH'} =
"/orion/httpd/cgi-bin:$ORACLE_HOME/lib:/usr/openwin/lib" .
      ":/tools/SUNWspro/lib:/usr/dt/lib:/tools/atria/sun5/shlib";



# Get the input

if ($ENV{'REQUEST_METHOD'} eq "POST" && $ENV{'CONTENT_LENGTH'} > 0) {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});


} elsif ($ENV{'REQUEST_METHOD'} eq "GET") {

    $buffer = $ENV{'QUERY_STRING'};
} else {      # Assume script is running as a test from the command line
    if (! @ARGV) {      # If no command line arguments...
      @ARGV = (         # ...  default for debugging
        "COMMAND=AddOrder", "ORDER_NUMBER=8", "USER_ID=mulligat",
        "ORDER_COMMIT_DATE=06-JUN-1997", "ORDER_NOTE=Note-this",
      );
}
    $buffer = join("&",@ARGV);  # Put into METHOD=GET form
}

# Split the name-value pairs
@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;
    $name =~ tr/+/ /;
    $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    # If the value has embedded quotes, dollarsigns or backslashes,
    # they must be escaped with a backslash so /bin/sh will pass them
    #$value =~ s/(["$\\]/\\$1/g;  # Put backslash in front of special chars
    $args .= ' "' . $FORM{$key} . '"';
# Remove line about adding quotes around all values

}


$keys = "AddOrder ORDER_NUMBER USER_ID ORDER_COMMIT_DATE ORDER_NOTE";

%arguments = (
        "AddOrder"    => "ORDER_NUMBER USER_ID ORDER_COMMIT_DATE
ORDER_NOTE",
        #"ShowOrder"   => "ORDER_NUMBER",
        #"CancelOrder" => "ORDER_NUMBER",
        # Additional commands and argument lists go here
                );
$command = $FORM{'COMMAND'};
$keys = $arguments{$command};
#if ($keys eq "") {
#     print "Content-type: text/plain\n\n Error: unknown command
$command\n";
#     foreach $_ (sort keys %FORM) {
#       print "$_ = ", $FORM{$_}, "\n\n";
#}
#     exit;
#}

   $args = $command;
   foreach $key (split(" ",$keys)) {        # Do positional parameters
    
}




print <<EOM;            # Send HTML header to the browser
 
Content-type: text/html


<HTML><HEAD><TITLE>Results from /lib/db</TITLE></HEAD>

EOM

print "<BODY BGCOLOR=white>\n";
 
#VoiceDBAccess.060697 this is a C lib that passes the args to a DB.

 print "<PRE>VoiceDBAccess.060697 $args</PRE>\n";     # Optional, for
 open(PIPE,`VoiceDBAccess.060697 $args |`);   # Execute the command,
 while (<PIPE>) {
       @result = split(/~/,$_); # In case more than one "key~val~" per line
       while(@result) {
         $key = shift(@result);
         $val = shift(@result);
           if ($key eq "ERROR_TAG") {
             print "<H1>$val</H1>\n";
           } else {
             print "<i>$key</i>: <b>$val</b>\n";
           }
        }
   
 };
 close(PIPE);
 print "</BODY></HTML>\n\n";


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

Date: Thu, 12 Jun 1997 09:43:43 -0600
From: llemond@tech.belcan.com
Subject: Perl Programmer
Message-Id: <865975298.30196@dejanews.com>

Two entrepreneurs in Austin, Texas looking for a PERL programmer to
develop web-based e-mail program. PERL 4 and 5 and CGI scripting
knowledge on UNIX-based server. Part-time work with potential for
fulltime.

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


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

Date: 12 Jun 1997 13:38:32 GMT
From: wmchal1@umbc.edu (Bill McHale)
Subject: Re: Printing Prime Numbers
Message-Id: <5nou4o$ch5@news.umbc.edu>

the count (eglamkowski@mathematica-mpr.com) wrote:
: Darryl Caldwell wrote:
: > The result is below. Essential it first prints out 1 since we know that
: > it a prime number, then it discards even numbers. Next, it runs a series
: > of tests on the remain odd numbers. 

: Don't forget 2!  It is a prime number,  
: It is, however, the *only* even prime number.
: If you are really interested in this sort of thing, there are 
: a variety of math books that should cover the topic quite nicely.
: There are equations you can use to generate primes, but I don't
: remember any of them off the top of my head ;)

Yes, I do believe that there are some that can generate large Primes very
quickly, but you would probably never want to use the, as only special
types of prime numbers can be generated.  Since the major purpose of
generating a really large prime is cryptology, any of these methods would
be inappropriate.  Now on the other hand there are algorithms that allow
you to generate numbers that you are fairly sure are prime (to an
arbitrary certainty, though 99.999 is fairly easy to reach quickly).
Essentially generate a really large number, then run a test on it which
can be done in constant time such that a prime will always pass, but a
composite (i.e. non prime) will fail at least 50% of the time.  Repeat
this test 10, 20 or 100 times, the more you repeat it the more sure you
are that it is prime (but never 100% sure unless you run more tradition
and much slower test on it).

--
Bill

***************************************************************************
If at first you don't succeed, don't try sky diving!
Bill McHale                            
---------------------------------------------------------------------------
Home page - http://www.gl.umbc.edu/~wmchal1
***************************************************************************


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

Date: 12 Jun 1997 12:40:35 GMT
From: rmshair@uiuc.edu (Bob Shair)
Subject: Re: problems with perl5.004 on AIX 3.2.5
Message-Id: <5noqo3$5ra$1@vixen.cso.uiuc.edu>

Stephen Riehm <sr@pc-plus.de> writes:

>Hi,
>
>While running the tests for the perl installation on an AIX 3.2.5
>machine, the first test in lib/timelocal fails, perl actually dumps
>core! I've tried compiling with perl's malloc, and with AIX's malloc,
>but that doesn't seem to solve the problem.
>
>Has anyone else encountered this problem, any workarounds or sollutions?

Stephen:

I tried to reproduce this, but when I build 5.004 it runs all tests
correctly on my AIX 3.2.5 system.  

sh Configure -d
make
make test

My system:
IBM RS/6000 530H RIOS 1.0 33MHz, 128MB RAM, 18GB disk.
oslevel -b: 3250 is the latest completely installed level 
C compiler: xlccmp.obj 1.3.0.0, addressed as cc

I'll email you my configure.sh from the site where I built it.
-- 
Bob Shair                          Open Systems Consultant
1018 W. Springfield Avenue         rmshair@uiuc.edu
Champaign, IL 61821		   217/356-2684
< Not employed by or representing the University of Illinois >


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

Date: Thu, 12 Jun 1997 09:45:45 -0400
From: Dan Boorstein <danboo@ixl.com>
Subject: Re: regexp question: greener than godzilla...
Message-Id: <339FFD89.6D9436C9@ixl.com>

A. Deckers wrote:
> 
> In <01bc76b1$43728980$5ae004d0@kennyv>,
>         Ken Van Allen <kennyv@montana.com> wrote:
> >Hi all:
> >       I've been racking my brains to find a regexp that will replace ALL
> >instances of a given character in a line, and not just the first!  I know
> >this must be relatively simple.  I've been through the FAQ, CPAN, and other
> >resources, but can't seem to hit upon what I want.  I would appreciate any
> >help...
> 
> #!/usr/bin/perl
> 
> #     1 2 3 4 5 6
> $t = 'acacacacacac';
> $n = ($t =~ s/a/b/g); # Use the /g option.
> print "$n times!\n";

Or, if the job is always replacing one character with another use
the translation operator (tr//). I believe it tends to be considerably
faster for such operations.

A little benchmark shows the following:

#!/usr/bin/perl
use Benchmark;
timethese(50000, {
  'subst', q($t = 'acacacacacac'; $t =~ s/a/b/g;),
  'trans', q($t = 'acacacacacac'; $t =~ tr/a/b/;),
} );

Benchmark: timing 50000 iterations of subst, trans...
     subst: 11 secs (10.42 usr  0.00 sys = 10.42 cpu)
     trans:  1 secs ( 1.24 usr  0.01 sys =  1.25 cpu)

If you've got any serious iterative process going on, it 
looks like tr// can save you a bundle of time.

Dan


> 
> __END__
> 
> Output:
> 
> 6 times!
> 
> Looks like you need to read the perlre manual page again.
> 
> HTH,
> 
> Alain
> 
> --
> Perl information: <URL:http://www.perl.com/perl/>
>     Perl archive: <URL:http://www.perl.com/CPAN/>
>         Perl FAQ: <URL:http://www.perl.com/CPAN/doc/FAQs/FAQ/>
> >>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<


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

Date: Wed, 11 Jun 1997 21:17:20 +0000
From: az915@freenet.carleton.ca (William G. Royds)
To: Ken Van Allen <kennyv@montana.com>
Subject: Re: regexp question: greener than godzilla...
Message-Id: <339F15E0.7676@freenet.carleton.ca>

Ken Van Allen wrote:
> 
> Hi all:
>         I've been racking my brains to find a regexp that will replace ALL
> instances of a given character in a line, and not just the first!  I know
> this must be relatively simple.  I've been through the FAQ, CPAN, and other
> resources, but can't seem to hit upon what I want.  I would appreciate any
> help...
> 
> Thanks!
> 
> Please reply via email:  kennyv@montana.com


try using tr as in
tr /x/y/;
to replace all x's by y's
-- 
Bill Royds
Hunt-Club/OT8(Mooney's Bay)/R16


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

Date: 12 Jun 1997 12:46:03 GMT
From: david@ti.com (David P. Huff)
Subject: Re: RFD: comp.lang.perl reorganization
Message-Id: <5nor2b$cmu@dsk92.itg.ti.com>

In article <5nmj87$282$1@nadine.teleport.com>, deckers@man.ac.uk says...
>
>                     REQUEST FOR DISCUSSION (RFD)
>            moderated group comp.lang.perl.data-structure
>             moderated group comp.lang.perl.inter-process
>              moderated group comp.lang.perl.programmer
>                 moderated group comp.lang.perl.regex
>
>This is a formal Request for Discussion (RFD) for the creation of
>world-wide moderated Usenet newsgroups in the comp.lang.perl
>hierarchy.  This is not a call for votes; you cannot vote at this
>time. Procedural details are below.

This is a *great* idea. I'm certainly one of those who have stopped reading 
c.l.p.misc because of the sheer volume of msg traffic and high percentage of 
off-topic posts. 

One suggestion would be to try to get Jeffrey Friedl (author of O'Reilly's 
_Mastering Regular Expressions_) to be a moderator of c.l.p.regex. :)

Regards,

David P. Huff
Texas Instruments, Inc.
david@ti.com



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

Date: 12 Jun 1997 14:18:09 GMT
From: deckers@man.ac.uk (A. Deckers)
Subject: Re: RFD: comp.lang.perl reorganization
Message-Id: <slrn5q0190.nj7.deckers@news.rediris.es>

[NB: Followup-To: news.groups]

In <5nor2b$cmu@dsk92.itg.ti.com>,
	David P. Huff <david@ti.com> wrote:
>In article <5nmj87$282$1@nadine.teleport.com>, deckers@man.ac.uk says...
>>
>>                     REQUEST FOR DISCUSSION (RFD)
>>            moderated group comp.lang.perl.data-structure
>>             moderated group comp.lang.perl.inter-process
>>              moderated group comp.lang.perl.programmer
>>                 moderated group comp.lang.perl.regex
>>
>>This is a formal Request for Discussion (RFD) for the creation of
>>world-wide moderated Usenet newsgroups in the comp.lang.perl
>>hierarchy.  This is not a call for votes; you cannot vote at this
>>time. Procedural details are below.
>
>This is a *great* idea. I'm certainly one of those who have stopped reading 
>c.l.p.misc because of the sheer volume of msg traffic and high percentage of 
>off-topic posts. 

Good. Then you're exactly the sort of person this reorg is designed to bring
back to comp.lang.perl.*.

>One suggestion would be to try to get Jeffrey Friedl (author of O'Reilly's 
>_Mastering Regular Expressions_) to be a moderator of c.l.p.regex. :)

I don't know whether Friedl would have either the time or the
inclination to become a member of the moderation panel, but since the
moderation process is fully automated and requires hardly any human
intervention, the composition of the moderation panel doesn't require
gurudom in the subject matter of the groups. Still, anyone is free to
become a member of the moderation panel if the circumstances arise, subject to
the approval of existing members.

Alain

-- 
Perl information: <URL:http://www.perl.com/perl/>
    Perl archive: <URL:http://www.perl.com/CPAN/>
        Perl FAQ: <URL:http://www.perl.com/CPAN/doc/FAQs/FAQ/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<


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

Date: Thu, 12 Jun 1997 10:02:40 -0400
From: the count <eglamkowski@mathematica-mpr.com>
Subject: Re: RFD: comp.lang.perl reorganization
Message-Id: <33A00180.3C74@mathematica-mpr.com>

A. Deckers wrote:
>                      REQUEST FOR DISCUSSION (RFD)
>             moderated group comp.lang.perl.data-structure
>              moderated group comp.lang.perl.inter-process
>               moderated group comp.lang.perl.programmer
>                  moderated group comp.lang.perl.regex

I'm generally opposed to moderated newsgroups in principle, 
but since these are technical topics (as opposed to, say 
political or religious), it probably isn't as much a problem.  

But still....

> Newsgroups lines:
> comp.lang.perl.data-structure   Using Perl data structures. (Moderated)
> comp.lang.perl.inter-process    Inter-process communications in Perl. (Moderated)
> comp.lang.perl.programmer       General non-FAQ Perl programming issues. (Moderated)
> comp.lang.perl.regex    Using Perl regular expressions. (Moderated)


> RATIONALE: all groups

> In addition, a significant fraction of the traffic on clpm
> consists of off-topic articles, many of them widely cross-posted
> through the comp.* hierarchy and ammounting to little more than
> flame-wars, articles asking questions that are answered in the
> FAQs, and above all, a regular flow of articles asking questions
> related to the Common Gateway Interface (CGI) but unrelated to
> Perl.

There's always kill files :)
(actually, I use netscape for news, so I don't even have access 
to a killfile...)

> CHARTER: all groups
> The moderation script will escrow submissions from first-time
> posters, who will be sent registration instructions in addition
> to the group charter and pointers to relevant references.
> Submitions from registered users will be auto-approved provided
> their posts comply with all the criteria set out in this charter.

This is bad, and I would vote no on the creation of these groups 
just on this basis alone.  There should NOT be any registration 
for any newsgroup.  At that point, why not just set up a closed 
mailing list instead?  That is essentially what these newsgroups
would be.

> In addition, the moderation script shall be configured to reject
> any article:
> 
> + which is cross-posted, save for the blanket cross-posting
>   provisions described below;
> 
> Posters are requested not to post answers to questions which are
> explicitly addressed in the documentation, including the relevant
> FAQs.  A pointer to the relevant resource should instead be
> emailed to the questionner.

What if there *is* a solution in the docs, *but* someone wants 
to post an alternate solution that is not in any documentation?  
Would this be acceptable?
Or would such people be told to mail their reply privately (and
thereby possibly deprive the Perl community of a useful tip or
neat trick)

> The moderators of comp.lang.perl.announce, comp.answers and
> news.announce.newgroups, and any succesor groups thereto, are
> hereby granted blanket permission to cross-post to the proposed
> groups at their discretion.
> 
> While permission to routinely cross-post to the group will not be
> granted in other cases, the moderation panel will consider
> requests on a case-by-case basis, and grant their approval if
> they deem that this would be of significant benefit to the
> readership of the group. This provision applies especially, but
> is not limited to, relevant FAQs.

So if I understand this correctly, since crossposted messages
are, in general, automatically rejected, if someone does want
to crosspost, they have to send their post directly to a 
moderator?

> Sites wishing to receive posts approved by the moderation script
> via email, shall apply to the moderation panel, which shall
> maintain a mailing list for this purpose. This provision is
> primarily intended to help poorly connected sites to reduce
> propagation delay for the proposed groups.

Aha!  A mailing list!  ;)

so then why not just make the heirarchy:
bit.listserv.perl-dat
bit.listserv.perl-ip
bit.listserv.perl-prg
bit.listserv.perl-rx

:)

> CHARTER: comp.lang.perl.inter-process
> 
> The group comp.lang.perl.inter-process will deal with issues
> related to the implementation of interprocess communications
> (signals, fifos, pipes, safe subprocesses, sockets, semaphores
> and related issues) in Perl.

I assume CGI related posts are NOT acceptable here?
(just for the record)


The more I think about how this is supposed to run, the
less I like it.  If I were to vote right now on this, as
is, I would have to say 'no' :P


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

Date: Thu, 12 Jun 1997 09:34:29 -0600
From: brz@hotmail.com
Subject: security question
Message-Id: <866125689.5049@dejanews.com>

i've seen people talking about security especially concerning the
use of internet... (setuid scripts etc...) can someone give me
a pointer where i can start learning about these?

for example, how can "hackers" create a directory where he doens't
have permission or only the permission of "nobody"??? and how
would i prevent it?

thanks.

email answer to brz@hotmail.com preferred.

brz

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


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

Date: Thu, 12 Jun 1997 08:08:19 -0400
From: Scott Blanksteen <sibsib@hotmail.com>
Subject: Re: Sorting Numerically
Message-Id: <339FE6B3.8F763657@hotmail.com>

TechMaster Pinyan wrote:
> I have a hash called %hitArray, and it has the format:
> 
> how do I sort it numerically?  i.e.:
> 
> foreach $file (sort keys %hitArray){
>         do the stuff
> }

>From the Perl man pages: 
# sort numerically ascending
@articles = sort {$a <=> $b} @files;

# sort numerically descending
@articles = sort {$b <=> $a} @files;

In your case, you need to replace '@files' with 
'keys %hitArray'.

Scott

-- 
Scott I. Blanksteen
sib (at) worldnet (dot) att (dot) net


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

Date: Thu, 12 Jun 1997 13:31:20 +0100
From: b.wilkinson@pindar.co.uk (Bob Wilkinson)
Subject: Re: strings
Message-Id: <b.wilkinson-1206971331200001@ip57-york.pindar.co.uk>

In article <EBn0p7.Ixv@seas.ucla.edu>, trit@olympic.seas.ucla.edu (Tri Duy
Tram) wrote:

>         I am wondering how do I go about modifying strings in perl?  In 
> particular, I want to do something like changing:
> 
> [CODE1] (options1)
> [CODE2 (options2)]
> [CODE3(options3)]
> 
> to
> 
> [CODE1] (options1)
> [CODE2] (options2)
> [CODE3] (options3)
> 
> Is perl a good candidate to do this?  I can't figure out how to do a regular 
> expressing for this.  I've been able to get rid of the right bracket with
> s/\]//;
> 
> but that also gets rid of the bracket for the first option.  Thanks.

Hello,

      I think that this program does what you want.


Bob


#!/usr/local/bin/perl -w
use strict;
while (<DATA>) {
   s/\s*\(([^)]*)\)\s*\]/] ($1)/;
   print;
}
__END__
[CODE1] (options1)
[CODE2 (options2)]
[CODE3(options3)]

-- 
I have become death, destroyer of the worlds.


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

Date: Thu, 12 Jun 1997 22:01:28 GMT
From: uriba@post.tau.ac.il (Uri Bardugo)
Subject: test
Message-Id: <5noovv$nc7$1@beet.tau.ac.il>


Hello,

test !!!




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

Date: Thu, 12 Jun 1997 22:31:33 GMT
From: uriba@post.tau.ac.il (Uri Bardugo)
Subject: Upload a gif/jpg file with perl
Message-Id: <5noqoc$oat$1@beet.tau.ac.il>

Hello,

I need a source code of a simple  cgi script, in perl that  recive
from the client a gif/jpg file and parse  it, so Ill be able to send
the Uploaded file back to the client as a picture.

E-mail : uriba@post.tau.ac.il


Thank for your help .

Uri B.





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

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

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