[13175] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 585 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 19 10:07:12 1999

Date: Thu, 19 Aug 1999 07:05:08 -0700 (PDT)
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, 19 Aug 1999     Volume: 9 Number: 585

Today's topics:
    Re: arghh!  can't figure out s/// ! <chradil@acuitive.com>
    Re: eliminate ',' from a data set... (Abigail)
    Re: eliminate ',' from a data set... (Abigail)
    Re: HARASSMENT -- Monthly Autoemail <urielw@tiac.net>
    Re: How do you create a directory??? <bowman@montana.com>
        Is GIF animated ? SHAHRAM@webtv.net
        Matching two strings <djanisse@northrock.bm>
        Newbie: How to direct STDOUT & STDERR to file AND termi <Henry.Widman@*XSPAM*DaytonOH.NCR.COM>
    Re: Perl on Linux and MS SQL 7.0 (Dan Wilga)
    Re: Question about date (I.J. Garlick)
    Re: Renaming Windows NT domain users (Helgi Briem)
        Sending HTML Email from Perl Script <isstb@flanet.com>
    Re: Sending HTML Email from Perl Script (David Pashley)
    Re: Sending HTML Email from Perl Script <garethr@cre.canon.co.uk>
    Re: shell script translation <argyrodes@sympatico.ca>
        Spawning new DOS process from within browser. Isiah22@hotmail.com
        Subroutine redefined every time? Perl mod_perl apache <bbarnes@austin.ibm.com>
    Re: Subroutine redefined every time? Perl mod_perl apac <randy@theoryx5.uwinnipeg.ca>
    Re: System resources (elephant)
        Untainting and Safe Pipe Opens for reading (Bill Moseley)
    Re: what does eq do on lists? (Sam Holden)
    Re: what does eq do on lists? (Larry Rosler)
    Re: Why use Python when we've got Perl? (Henrik Seidel)
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: Thu, 19 Aug 1999 09:03:05 -0400
From: "christopher j. hradil" <chradil@acuitive.com>
Subject: Re: arghh!  can't figure out s/// !
Message-Id: <rro031nrboh11@corp.supernews.com>


Why don't we all get in the habit of trying our code BEFORE we post it.

this will work :

#!/usr/local/bin/perl

# 509 Green Avenue

$string = "509 Green Avenue";

$string =~ (s/\s+/\\s+/g);

print "$string\n";




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

Date: 19 Aug 1999 08:56:08 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: eliminate ',' from a data set...
Message-Id: <slrn7ro39i.ap3.abigail@alexandra.delanet.com>

J. Moreno (planb@newsreaders.com) wrote on MMCLXXVIII September MCMXCIII
in <URL:news:1dwqe9z.21aormcs2z0fN@roxboro0-0033.dyn.interpath.net>:
<> Andrew Weller <p8e77@keele.ac.uk> wrote:
<> 
<> > Unfortunately it is also reading in the ',' (comma) in the final field -
<> > when I perform a calculation on this Z value it screws up (obviously)!! Is
<> > there any way to loop around and eliminate the ',' (comma) before performin
<> > calculations??
<> 
<> If that's an accurate representation of your data set then it's really
<> easy -- set the record separator to ",\n".


Really?  The record separator is still present when you read in lines.
You would have to chomp it.



Abigail
-- 
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 19 Aug 1999 08:57:28 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: eliminate ',' from a data set...
Message-Id: <slrn7ro3c1.ap3.abigail@alexandra.delanet.com>

Greg Bacon (gbacon@itsc.uah.edu) wrote on MMCLXXVIII September MCMXCIII
in <URL:news:7peku8$jct$1@info2.uah.edu>:
|| In article <7pej26$36b$1@cfs2.kis.keele.ac.uk>,
|| 	"Andrew Weller" <p8e77@keele.ac.uk> writes:
|| : 
|| : Unfortunately it is also reading in the ',' (comma) in the final
|| : field - when I perform a calculation on this Z value it screws up
|| : (obviously)!! Is there any way to loop around and eliminate the ','
|| : (comma) before performing calculations??
|| 
||     while (<>) {
||         s/,\s*$//;
|| 
||         my($x,$y,$z) = split;
|| 
||         ...;
||     }


That also removes the \n, which could be a positive side effect, but 
nothing in Andrews posting suggests he removes the newline, or that
he wants the newline to be removed.


Abigail
-- 
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: Thu, 19 Aug 1999 08:58:51 -0400
From: Uriel Wittenberg <urielw@tiac.net>
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <37BBFF8A.EEA09FF2@tiac.net>

Tom Christiansen wrote:

> If someone asks me to stop mentioning to them every month or three that
> their postings have been mangled and maybe they should check into it, then
> I put an entry in the database so they don't get sent that reminder again.
>
> I should put the modules, programs, and datafiles that I use for all
> this up again so that everyone can play.  Peer pressure works.

"All they had to do was ask me to stop."

-Gunman with slimy grin, as police lead him away.




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

Date: Thu, 19 Aug 1999 06:59:29 -0600
From: bowman <bowman@montana.com>
Subject: Re: How do you create a directory???
Message-Id: <37BBFFB1.D59907CA@montana.com>

mkdir


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

Date: Thu, 19 Aug 1999 08:26:31 -0400 (EDT)
From: SHAHRAM@webtv.net
Subject: Is GIF animated ?
Message-Id: <29959-37BBF7F7-8@newsd-111.bryant.webtv.net>


Is there a way to detect if a gif file is animated ?

I need that for GD.
>$im = newFromGif GD::Image(GIF);
It crashes on animated files.

No, I don't have Image::Magic installed.



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

Date: Thu, 19 Aug 1999 14:04:34 GMT
From: "Darren Janisse" <djanisse@northrock.bm>
Subject: Matching two strings
Message-Id: <S9Uu3.3263$1B5.211663@monger.newsread.com>


Hello,

I have a statement in one of my scripts that would read:

write if $raduserid eq $userid;

however this does not work.  $raduserid is the username from a radius log,
and $userid is the username from local user input.  I have done extensive
testing, and for example $raduserid equals "testuser" and $userid equals
"testuser" however it does not run the write command.

Any suggestions would be appreciated.

Thanks,
Darren




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

Date: Thu, 19 Aug 1999 08:55:52 -0400
From: "Henry I. Widman" <Henry.Widman@*XSPAM*DaytonOH.NCR.COM>
Subject: Newbie: How to direct STDOUT & STDERR to file AND terminal
Message-Id: <37bbfefd@rpc1285.daytonoh.ncr.com>

Ok, people, I did my newbie best to find out the answer to this almost
certainly super simple question, but didn't come across anything in the
archives. So it now falls onto your shoulders.  How does one in PERL
have the STDOUT and STDERR data streams simultaneously directed to the
terminal and a file (both data streams to the same file).  I know how to
redirect these channels to seperate files and even to a single file, but
haven't been able to figure out how to have the outputs go to both the
terminal and a single file (like the SPOOL statement in SQL where the
STDOUT and STDERR streams are directed to a spool file but the data
streams continues to be output to the terminal).  Any suggestions from
the PERL gurus out there will be very appreciated by this humble and
unworthy programmer.

Thanks,

Henry

-- 
Don't Thread On Me
------------------
My opinions do not reflect the views of my employer, co-workers, family,
friends, acquaintences or just about anyone else on the planet. Go
figure!
[To send e-mail: Remove *XSPAM* from my e-mail address]


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

Date: Thu, 19 Aug 1999 09:19:37 -0400
From: dwilgaREMOVE@mtholyoke.edu (Dan Wilga)
Subject: Re: Perl on Linux and MS SQL 7.0
Message-Id: <dwilgaREMOVE-1908990919370001@wilga.mtholyoke.edu>

In article <7pf4jj$kid6@SGI3651ef0>, "Juan Riera" <jriera@retemail.es> wrote:

> Hello,
> Does anybody know any DBI/DBD interface to access MS SQL 7.0 on NT from a
> CGI perl script on Linux ?
> 
> Thanks,
> Juan

I use DBD::ODBC for this.

Dan Wilga          dwilgaREMOVE@mtholyoke.edu
** Remove the REMOVE in my address address to reply reply  **


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

Date: Thu, 19 Aug 1999 12:50:09 GMT
From: ijg@connect.org.uk (I.J. Garlick)
Subject: Re: Question about date
Message-Id: <FGpqBL.FHq@csc.liv.ac.uk>

In article <SrLu3.44$z44.10835@vic.nntp.telstra.net>,
"Wyzelli" <wyzelli@yahoo.com> writes:
> Jimtaylor5 <jimtaylor5@aol.com> wrote in message
> news:19990819000209.08662.00000298@ng-fn1.aol.com...
>> >> Can anyone tell me how I would check a date to see if two or more days
>> >> have passed?
> 
> How about if 'now' > 'date of writing file + 172,800' delete file?
[ rest of code barking up the wrong tree snipped ]

No. Use the -M unary operator (somewhere in the perlfunc man page, but I
can't get perldoc -f to find them)

I dare say something like this would work

	opendir DR, $dir or die "Can't open directory $dir: $!";
	foreach (grep !/^\./, readdir DR) { # all files not hidden
		unlink $_ if -M $_ > 2;
	}

on the directory contained in $dir. (If you don't feel like deleteing
files all over the place just swap the unlink for print to test it
harmlessly).

-- 
Ian J. Garlick
ijg@csc.liv.ac.uk

Everyone is a genius.  It's just that some people are too stupid to
realize it.



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

Date: Thu, 19 Aug 1999 13:58:40 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: Renaming Windows NT domain users
Message-Id: <37bc0cf4.2699000@news.isholf.is>

On Thu, 19 Aug 1999 15:26:11 +1000,
elephant@squirrelgroup.com (elephant) wrote:

>Michael Blackmore writes ..
>>Anybody know if it is possible to rename users within a Windows NT
>>domain?  I've looked at Win32::NetAdmin and Win32::API::Net.  These
>>can provide and change user details, but not it seems the username.  I
>>am developing a script to rename around 400 users.
>
>you can't change the username from within the WindowsNT User Manager 
>program .. that would seem to suggest that Microsoft use the username as 
>the primary key for the user record thus making it un-changeable
>
Wrong.  You can change it easily within NT User Manager.
Highlight the user
Go to the main menu
User - Rename - hey presto!
As for changing it from a script. I don't know, 
haven't tried it.

Helgi Briem


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

Date: Thu, 19 Aug 1999 12:29:40 GMT
From: Bill Nelson <isstb@flanet.com>
Subject: Sending HTML Email from Perl Script
Message-Id: <37BBF5CA.9F3B7FC@flanet.com>

Hi,

I have written a Perl Script which will send an email message to a user
(see below).  This works without any problems.  But what if I want to
send the message in HTML format rather than standard ASCII text format?
What needs to be changed?  I tried including a

print MAIL "Content-type: text/html\n\n";

in the message, but this does not work.

Any Suggestions?

thanks,

bill

=======================================================

sub send_email
{
    # Open The Mail
    open(MAIL, "|$mailprog -t") || die "Can't open $mailprog!\n";

    # Mail Header Info
    print MAIL "To: $FORM{'useremail'}\n";
    print MAIL "From: $FromEmail ($FromName)\n";
    print MAIL "Subject: $Subject\n\n";

    # Mail Body Info
    print MAIL "Submitted on: $date\n\n";
    print MAIL "Name:                     $FORM{'lastname'},
$FORM{'firstname'}\n";
    print MAIL "Email:                      $FORM{'useremail'}\n\n";
    print MAIL "Social Security #:     $FORM{'userssnum'}\n\n";
    print MAIL "Date Sub Needed:   $FORM{'datesubneeded'}\n";
    print MAIL "Time Sub Needed:   $FORM{'timesubneeded'}\n";
    print MAIL "Client:                      $FORM{'client'}\n";
    print MAIL "Reason:                    $FORM{'reason'}\n";

    if ($FORM{'reason'} eq "Other (see below)")
    {
        print MAIL "Description:  $FORM{'reason-desc'}\n";
    }

    close (MAIL);

}







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

Date: Thu, 19 Aug 1999 13:49:53 +0100 (BST)
From: cszdp@cslin002.leeds.ac.uk (David Pashley)
Subject: Re: Sending HTML Email from Perl Script
Message-Id: <1999Aug19.124953.6877@leeds.ac.uk>

Bill Nelson's words, in praise for the llamas, were:
> Hi,
> 
> I have written a Perl Script which will send an email message to a user
> (see below).  This works without any problems.  But what if I want to
> send the message in HTML format rather than standard ASCII text format?
> What needs to be changed?  I tried including a
> 
> print MAIL "Content-type: text/html\n\n";
> 
> in the message, but this does not work.
> 
> Any Suggestions?
> 
Try printing some html tags. That could help.

-- 
David Pashley
david@davidpashley.com
http://www.davidpashley.com
Now he understood - "If it ain't broken, don't fix it"


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

Date: Thu, 19 Aug 1999 13:27:49 GMT
From: Gareth Rees <garethr@cre.canon.co.uk>
To: Bill Nelson <isstb@flanet.com>
Subject: Re: Sending HTML Email from Perl Script
Message-Id: <siso5fyk6i.fsf@cre.canon.co.uk>

Bill Nelson <isstb@flanet.com> wrote:
> what if I want to send the e-mail message in HTML format?

The MIME-tools distribution has tools for generating MIME messages.
http://www.cpan.org/modules/by-module/MIME/MIME-tools-4.124.tar.gz

-- 
Gareth Rees


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

Date: Thu, 19 Aug 1999 14:04:03 GMT
From: Norman Crooks <argyrodes@sympatico.ca>
Subject: Re: shell script translation
Message-Id: <37BC1247.47CF37FD@sympatico.ca>

Thanks for the help.

-Norm

Donovan Rebbechi wrote:

> On Wed, 18 Aug 1999 17:51:44 -0700, Larry Rosler wrote:
> >In article <slrn7rmabh.poq.elflord@panix3.panix.com> on 18 Aug 1999
> >17:45:22 -0400, Donovan Rebbechi <elflord@panix.com> says...
> >...
> >> in perl, like shellscript, variables are expanded inside single ( but
> >> not double ) quotes.
> >
> >You have that backwards.
>
> Doh ! I knew that (-;
>
> --
> Donovan



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

Date: Thu, 19 Aug 1999 13:46:41 GMT
From: Isiah22@hotmail.com
Subject: Spawning new DOS process from within browser.
Message-Id: <7ph1rr$rp7$1@nnrp1.deja.com>

Hi All,

Having difficulty spawning a new dos bat file process from a perl CGI
script.
If i execute the script from the dos command line it works O.K. however
if i try to run the same kind of script from a web server (Apache for
NT), the bat file fails to run.

The code is below.


#!/perl/bin/perl -w
#use strict;
use CGI qw(:standard escapeHTML);
$q = new CGI;
use Win32;

use Win32::Process;
print $q->header();

print $q->start_html(-title=>'Clients Started');

Win32::Process::Create($ProcessObj,
		"C:\\dev\\testing\\test.bat",
                "",
	        0,
		NORMAL_PRIORITY_CLASS,
		".")|| die "Unable to create process\n";

print $q->end_html();

Thanks For any tips/suggestions.

BTW i'm running the Apache NT server as a service with same security
priveleges as myself.

ISiah


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Thu, 19 Aug 1999 07:19:34 -0500
From: "Brian P. Barnes" <bbarnes@austin.ibm.com>
Subject: Subroutine redefined every time? Perl mod_perl apache
Message-Id: <37BBF656.5D19F147@austin.ibm.com>

Hi,

                  I am using mod_perl with a bunch of Perl modules
compiled into it. I have a rather long
                  program which runs under Apache and every time someone
clicks a button, I get a
                  message similar to the following for every function I
have:
                      Subroutine changepw redefined at
/usr/apache/cgi-bin/tvtx.pl line 498.

                  It causes the error_log to grow very rapidly because
it is a web application with dozens
                  of people using it 24 hours per day and every button
click sends 34 lines to the error file.

                  There was a thread in some of the Perl news groups 5
months ago, but either there
                  was no resolution or it was not recorded in the
newsgroup.

                  Is there a way to turn off error checking for this in
Apache?

                  I am using perl 5.005_02 compiled on aix  4.3.2.0 and
Apache 1.3.6. I use the following
                  modules:
                  use strict;
                  use CGI qw/:standard :html3/;  CGI->compile(':all');
                  use DBI;
                  use DBD::DB2;
                  use Storable;
                  use Apache;
                  use Apache::DBI;
                  use Apache::Constants;
                  use Apache::Registry();
                  use GIFgraph::bars;
                  use GIFgraph::lines;
                  use GIFgraph::colour;
                  use Date::Manip;  # Date manipulation functions.
                  use Time::Local;  # Time conversion functions.
                  use File::Basename;
                  use FileHandle;

                  I have the following subroutines:
                  bbarnes@tracker:/usr/apache/cgi-bin> grep -n  '^sub '
tvtx.pl 501:sub changepw()  {
                  616:sub printchangepwpg()  {
                  668:sub getignore()  {
                  745:sub ignoresteps() {
                  831:sub commitignore()  {
                  876:sub tester()  {
                  916:sub risk()  {
                  1663:sub getcal()  {
                  1711:sub calcsteps()  {
                  1759:sub commitholiday()  {
                  1831:sub holiday()  {
                  2012:sub printappgraph()  {
                  2553:sub printlanggraph()  {
                  3210:sub printalgraph()  {
                  3643:sub printallsteps()  {
                  3779:sub printstepfails()  {
                  3891:sub printhist()  {
                  4030:sub printdefnote()  {
                  4288:sub printsteppg()  {
                  4636:sub printtcasepg()  {
                  4802:sub printlangpg  ()  {
                  5106:sub printprojpg  ()  {
                  5177:sub getbasedat()  {
                  5470:sub getcache()  {
                  5519:sub putcache()  {
                  5554:sub gettcasedat()  {
                  5609:sub getstepdat()  {
                  5845:sub getcurstepstat()  {
                  5918:sub doselect()  {
                  5954:sub dodo()  {
                  5973:sub printidx()  {
                  6161:sub dumpparam()  {
                  6187:sub multinumsort  ()  {
                  6235:sub GetConfig() { #JPC

                  I get the following set of error messages:
                  Subroutine changepw redefined at
/usr/apache/cgi-bin/tvtx.pl line 498. Subroutine
                  printchangepwpg redefined at
/usr/apache/cgi-bin/tvtx.pl line 612.
                  Subroutine getignore redefined at
/usr/apache/cgi-bin/tvtx.pl line 664. Subroutine
                  ignoresteps redefined at /usr/apache/cgi-bin/tvtx.pl
line 740.
                  Subroutine commitignore redefined at
/usr/apache/cgi-bin/tvtx.pl line 826.
                  Subroutine tester redefined at
/usr/apache/cgi-bin/tvtx.pl line 871. Subroutine risk
                  redefined at /usr/apache/cgi-bin/tvtx.pl line 911.
Subroutine getcal redefined at
                  /usr/apache/cgi-bin/tvtx.pl line 1656. Subroutine
calcsteps redefined at
                  /usr/apache/cgi-bin/tvtx.pl line 1703.

                  Subroutine commitholiday redefined at
/usr/apache/cgi-bin/tvtx.pl line 1751.
                  Subroutine holiday redefined at
/usr/apache/cgi-bin/tvtx.pl line 1823. Subroutine
                  printappgraph redefined at /usr/apache/cgi-bin/tvtx.pl
line 2004.
                  Subroutine printlanggraph redefined at
/usr/apache/cgi-bin/tvtx.pl line 2541.
                  Subroutine printalgraph redefined at
/usr/apache/cgi-bin/tvtx.pl line 3191.
                  Subroutine printallsteps redefined at
/usr/apache/cgi-bin/tvtx.pl line 3619.
                  Subroutine printstepfails redefined at
/usr/apache/cgi-bin/tvtx.pl line 3755.
                  Subroutine printhist redefined at
/usr/apache/cgi-bin/tvtx.pl line 3864. Subroutine printdefnote redefined
at /usr/apache/cgi-bin/tvtx.pl line 4003.
                  Subroutine printsteppg redefined at
/usr/apache/cgi-bin/tvtx.pl line 4261.
                  Subroutine printtcasepg redefined at
/usr/apache/cgi-bin/tvtx.pl line 4605.
                  Subroutine printlangpg redefined at
/usr/apache/cgi-bin/tvtx.pl line 4769.
                  Subroutine printprojpg redefined at
/usr/apache/cgi-bin/tvtx.pl line 5072.
                  Subroutine getbasedat redefined at
/usr/apache/cgi-bin/tvtx.pl line 5143.
                  Subroutine getcache redefined at
/usr/apache/cgi-bin/tvtx.pl line 5435. Subroutine
                  putcache redefined at /usr/apache/cgi-bin/tvtx.pl line
5484. Subroutine gettcasedat
                  redefined at /usr/apache/cgi-bin/tvtx.pl line 5518.
                  Subroutine getstepdat redefined at
/usr/apache/cgi-bin/tvtx.pl line 5569.
                  Subroutine getcurstepstat redefined at
/usr/apache/cgi-bin/tvtx.pl line 5802.
                  Subroutine doselect redefined at
/usr/apache/cgi-bin/tvtx.pl line 5873. Subroutine
                  dodo redefined at /usr/apache/cgi-bin/tvtx.pl line
5904. Subroutine printidx redefined
                  at /usr/apache/cgi-bin/tvtx.pl line 5922. Subroutine
dumpparam redefined at
                  /usr/apache/cgi-bin/tvtx.pl line 6110.

                  Subroutine multinumsort redefined at
/usr/apache/cgi-bin/tvtx.pl line 6135.
                  Subroutine GetConfig redefined at
/usr/apache/cgi-bin/tvtx.pl line 6182.



                  Any pointers appreciated,

                      Brian Barnes



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

Date: 19 Aug 1999 13:57:06 GMT
From: Randy Kobes <randy@theoryx5.uwinnipeg.ca>
Subject: Re: Subroutine redefined every time? Perl mod_perl apache
Message-Id: <7ph2fi$ljn$1@canopus.cc.umanitoba.ca>

In comp.lang.perl.misc, Brian P. Barnes <bbarnes@austin.ibm.com> wrote:

>                   I am using mod_perl with a bunch of Perl modules
> compiled into it. I have a rather long
>                   program which runs under Apache and every time someone
> clicks a button, I get a
>                   message similar to the following for every function I
> have:
>                       Subroutine changepw redefined at
> /usr/apache/cgi-bin/tvtx.pl line 498.
[snip]

Hi,
   Is this problem mod_perl specific? If you can run your script
as a regular cgi script, do the same messages result?
   You may want to look in the mod_perl mailing list archive
or other docs at http://perl.apache.org/ for hints about why
this might occur under mod_perl.
   I've seen these warnings if I edit a script that's been
called before under mod_perl - if I restart the server, the
warnings subsequently disappear. Does somehow the last modified
date of your script get changed each time it's called?
  The perldiag man page has a suggestion for suppressing these
warnings. However, it would probably be a good idea to first
understand why so many arise in the first place.

		best regards,
		Randy Kobes
-- 
Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theoryx5.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: Thu, 19 Aug 1999 23:52:27 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: System resources
Message-Id: <MPG.1226b726a0bc0146989c59@news-server>

asssi@my-deja.com writes ..
>When programming for the NT platform, what do you think would run
>faster, an executable code compiled from C language (EXE) file or a perl
>script?

I really hope this is a joke

>please also reply to this via email at asssi@deja.com

not likely

-- 
 jason - elephant@squirrelgroup.com -


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

Date: Thu, 19 Aug 1999 06:10:49 -0700
From: moseley@best.com (Bill Moseley)
Subject: Untainting and Safe Pipe Opens for reading
Message-Id: <MPG.1225a235f58233fe9896c4@nntp1.ba.best.com>

I'm running a program with open( PIPE, "$command_line|" ) which -T 
checks don't like, of course.

(In $command_line I quote all data from external sources.)


I'm not clear on what perlipc and perlsec (Safe Pipe Opens) is offering 
instead.

The open( PIPE, "-|") spawns off a child where there I can run an exec() 
to send output back to the parent.  

The reason being is 
1) the parent can't call exec() directly because exec() would kill the 
parent, and

2) exec() is the only way to run an external program without running 
through the shell, which is considered dangerous.

Am I thinking clearly?

(Is is faster to spawn a child and exec than run through the shell?)

And in the perlipc manpage, there's the line:

   ($EUID, $EGID) = ($UID, $GID); # suid only

What does that do for me security wise?  If the parent is running suid 
does that make the kid run NOT suid?


Is there another way to untaint the open( PIPE, "$command|")?


As always, thanks,




-- 
Bill Moseley mailto:moseley@best.com
pls note the one line sig, not counting this one.


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

Date: 19 Aug 1999 12:36:30 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: what does eq do on lists?
Message-Id: <slrn7rnujf.2an.sholden@pgrad.cs.usyd.edu.au>

On Thu, 19 Aug 1999 04:12:41 GMT, Rick Delaney <rick.delaney@home.com> wrote:
>[posted & mailed]
>
>[@a[0..3] is a list, not an array]
>
>Sam Holden wrote:
>> 
>> But this begs the question why is it called an 'array slice'.
>
>Not really.  It _is_ a slice of an array.  But the word slice in Perl
>means list and it is the noun in this phrase.
>
>An array slice is not an array.
>A hash slice is not a hash.
>A pizza slice is not a pizza.

Fair enough. However, I was under the impression that lists wre constant
in perl. However :

@ar = (1,2,3,4);
@ar[1,2] = (10,20);

Changes the values in @ar. How can I modify a list?

-- 
Sam

Just don't create a file called -rf.  :-)
	--Larry Wall


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

Date: Thu, 19 Aug 1999 06:09:08 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: what does eq do on lists?
Message-Id: <MPG.1225a1cb13a58900989e74@nntp.hpl.hp.com>

In article <slrn7rnrjk.2an.sholden@pgrad.cs.usyd.edu.au> on 19 Aug 1999 
11:45:23 GMT, Sam Holden <sholden@pgrad.cs.usyd.edu.au> says...
> On Wed, 18 Aug 1999 11:41:18 +0200,
>     Philip 'Yes, that's my address' Newton <nospam.newton@gmx.net> wrote:
> >Sam Holden wrote:
> >> 
> >> Or you could use join() to create the strings to compare, but
> >> then you have the problem of what to use as the first argument to
> >> join, so you don't get any collisions.
> >
> >$; might be a value to start with, since \034 is unlikely to occur in
> >data.
> 
> Unlikely doesn't really cut it, if it is does use '\0', but I'm sure someone has
> suggested that already...

Yes, William Herrera suggested using that *two-character* string.  I 
countered that the one-character string "\0" (which I had suggested 
earlier) is better.  Anno Siegel pointed out that '\0' would work also, 
if it were not in the data.  But it reduces to a statistical 
unlikelihood, because one datum may end in '\\' and another begin with 
'0', etc.  Whereas the presence of "\0" is usually well determined.

I'm sure you meant "\0" to begin with, and we are having fun hair-
splitting.  It wouldn't be the first time!  :-)

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 19 Aug 1999 13:46:42 GMT
From: Henrik.Seidel@gmx.de (Henrik Seidel)
To: bill@fccj.org ("Bill Jones")
Subject: Re: Why use Python when we've got Perl?
Message-Id: <7ph1s2$dq$1@mamenchi.zrz.TU-Berlin.DE>

[Posted and mailed]

In article <199908151815.OAA21697@astro.fccj.cc.fl.us>,
	bill@fccj.org ("Bill Jones") writes:
> 
> perl -e '$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'
> 
> Who knew it said "Just Another Perl Hacker", not I; but will I lose sleep
> because I don't understand how it does it???
> 

perl -e '$_="\031/5`3(/5,\$`3).#%`)4`)3`3/`%!39j";s/./"\"\\c$&\""/gees;print;'


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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. 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" from
almanac@ruby.oce.orst.edu. 

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


------------------------------
End of Perl-Users Digest V9 Issue 585
*************************************


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