[15644] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3057 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 16 00:05:36 2000

Date: Mon, 15 May 2000 21:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <958449910-v9-i3057@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 15 May 2000     Volume: 9 Number: 3057

Today's topics:
    Re: A question from Dynamic Whistler bzooty@my-deja.com
        ACLU says new bill soon TO CENSOR WEBSITES (David Combs)
        Directory - Security sarbx@my-deja.com
    Re: Do YOU use taint-checking? (Neil Kandalgaonkar)
        Getting words between two strings <mcollins@oxford.net>
    Re: How to COPY a website (Charles DeRykus)
    Re: How to COPY a website greg@apple2.com
    Re: How to COPY a website <elaine@chaos.wustl.edu>
        How to lock a tie()d file? <lneilan@vt.edu>
        How to lock a tie()d file? <lneilan@vt.edu>
    Re: How to lock a tie()d file? <webqueen@my-deja.com>
    Re: How to lock a tie()d file? <phill@modulus.com.au>
    Re: How to lock a tie()d file? (Sam Holden)
        Is my Perl 5.005_03 Compiler broken? <webqueen@my-deja.com>
    Re: Job <nospam@devnull.com>
        make error: missing file separator afay@ultranet.com
    Re: make error: missing file separator afay3483@my-deja.com
    Re: make error: missing file separator <tony_curtis32@yahoo.com>
        MS Word to Text help <jgoss@goss-com.com>
        PPMFIX Doesn't Fix Anything mschore@mindspring.com
        Queastion about CGI.pm sticky values jamalone@earthlink.net
    Re: Reading and Writing to a file <xah@xahlee.org>
    Re: Script using MailSender only seems to work with loc <bill@billcampbell.com>
    Re: sigh  ... (Tad McClellan)
    Re: Tanspose rows to columns <xah@xahlee.org>
    Re: What's this line which Perl added to AUTOEXEC.BAT? (Andy)
    Re: zen and the art of trolling [OT] (Neil Kandalgaonkar)
    Re: zen and the art of trolling [OT] <godzilla@stomp.stomp.tokyo>
    Re: zen and the art of trolling [OT] <elaine@chaos.wustl.edu>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 16 May 2000 01:02:23 GMT
From: bzooty@my-deja.com
Subject: Re: A question from Dynamic Whistler
Message-Id: <8fq6mn$jd0$1@nnrp1.deja.com>

Couldn't find the section of the FAQ that tells how to humbly apologize
for ignorant mistakes. Sincerely sorry for the eye strain. Cheers.

Jerry Stogsdill
Dynamic Whistler
http://whistler.bccmedia.com




In article <8fhrr0$be4$1@orpheus.gellyfish.com>,
  Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> On Fri, 12 May 2000 01:18:13 GMT bzooty@my-deja.com wrote:
> > Hey. Dynamic Whistler is an information site about DHTML. We're a
month
> > old and are starting to really get focused on content. We're
thinking
> > about including PERL resources as well. Our question is:
> >
> > What would be the most important resource that an PERL developer
would
> > hope to find on our site?
> >
>
> Probably a pointer to the Perl FAQ wherein it is described how to
spell
> the name of the language for starters.
>
> /J\
> --
> I'm a white male, age 18 to 49. Everyone listens to me, no matter how
> dumb my suggestions are.
> --
> fortune oscar homer
>


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


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

Date: 16 May 2000 01:06:28 GMT
From: dkcombs@netcom.com (David Combs)
Subject: ACLU says new bill soon TO CENSOR WEBSITES
Message-Id: <8fq6uk$vv5$1@slb2.atl.mindspring.net>

I find this aclu list worth "subscribing" to -- you see more darned
stuff that NEVER appears in the newspapers!

Some I agree with, some I don't.

And some PARTS of some I agree with.

Well, here's a nifty one (the "NOTE THIS ONE" marker is MY addition)

About this one (assuming it's true), YOU decide:

> From bounce-action-484780@lists.aclu.org Mon May 15 13:08:20 2000
> Return-Path: <bounce-action-484780@lists.aclu.org>
> Received: from mx1.client-mail.com (mx1.client-mail.com [204.243.96.15])
> 	by netcom.com (8.9.3/8.9.3) with SMTP id NAA21272
> 	for <dkcombs@netcom.com>; Mon, 15 May 2000 13:08:19 -0700 (PDT)
> Date: Mon, 15 May 2000 13:53:17
> Subject: 05-15-00 -- ACLU Action Update: "Dug War" Legislation Assaults Civil Liberties, Stop the Use of Secret Evidence!
> To: action@lists.aclu.org
> From: owner-action@lists.aclu.org
> List-Unsubscribe: <mailto:leave-action-484780I@lists.aclu.org>
> List-Subscribe: <mailto:subscribe-action@lists.aclu.org>
> List-Owner: <mailto:owner-action@lists.aclu.org>
> X-List-Host: ACLU <http://www.aclu.org>
> Reply-To: owner-action@lists.aclu.org
> Message-Id: <LYR484780-304834-2000.05.15-13.53.32--dkcombs#netcom.com@lists.aclu.org>
> Precedence: bulk
> Status: RO
> Content-Length: 4414
> Lines: 88

TO: ACLU Action Network
FR: Jared Feuer, Internet Organizer
DT: May 15, 2000

1). "Drug War" Legislation Assaults Civil Liberties
2). Stop the Use of Secret Evidence

1). "Drug War" Legislation Assaults Civil Liberties: Congress is yet again 
considering an assault on our civil liberties in the name of the "war on 
drugs." The latest attack comes from H.R. 2987, the "Methamphetamine 
Anti-Proliferation Act," which includes several challenges to our rights of 
free speech, privacy and due process.

The legislation slipped through the Senate with absolutely no debate late 
last year. Our only hope of stopping this dangerous measure is to defeat it 
in the House, where it is now awaiting a vote in the Judiciary Committee 
before heading to the floor for final action.

The bill represents a virtual wish list for the Department of Justice and 
other law enforcement agencies. It includes some provisions -- including 
one that would allow police to conduct "black bag" secret searches of 
private homes and businesses -- that were solidly rejected when offered as 
stand-alone legislation.

[========================= NOTE THIS ONE, RE WEBSITE-CENSORING:]
[========================= NOTE THIS ONE, RE WEBSITE-CENSORING:]

Another provision of this legislation would allow the government to censor 
websites, without providing notice to the website's owner. The provision 
would give agencies like the FBI a right usually reserved for the courts; 
to make judgment calls on the intent of online content and individual links 
regarding drug use. The FBI could then order Internet Service Providers to 
take down parts of a web site or the entire site itself within 48 hours -- 
all without telling the website owner!  The only way an owner might learn 
that their site has been altered is to log on and check for him or 
herself!

[==============]


As if this was not enough, the bill would also create several new federal 
drug offenses, ignoring calls to halt the federalization of crime from such 
individuals as Supreme Court Chief Justice William Rehnquist and Rep. 
Maxine Waters. The bill would spend billions of dollars incarcerating 
thousands more non-violent offenders despite a recent Rand Corporation 
study that found that investing an additional $1 million in drug treatment 
programs would be 15 times more effective at reducing serious crime than 
enacting more mandatory sentences for drug offenses.

Take Action! Tell your Representative to vote against this attack on civil 
liberties. You can learn more about the legislation and send a FREE FAX 
from our action alert at:

http://www.aclu.org/action/meth106.html

2). Stop the Use of Secret Evidence: Another foundation of our criminal 
justice system is the right of the accused to face their accuser and to 
see, hear and respond to the government's evidence against them.

But in a harsh bill aimed at curbing immigration in 1996, Congress decided 
to allow the government to use secret evidence when it seeks to deport 
immigrants, including people in the country legally. Currently, the 
Immigration and Nationalization Service is using secret evidence in about a 
dozen cases.

Appalled by this fundamental lack of fairness, Reps. John Conyers (D-MI), 
Bob Barr (R-GA), Tom Campbell (R-CA) and David Bonior (D-MI) introduced 
H.R. 2121, the "Secret Evidence Repeal Act." This legislation, which has 
almost 100 co-sponsors, would insure that no immigrant is deported based on 
secret evidence.

The use of secret evidence is a feature of totalitarian governments, not a 
democracy. Furthermore, the evidence often consists of nothing more than 
rumor and innuendo, impossible to test for reliability during a deportation 
proceeding.

Take Action! The House Judiciary Committee is holding a hearing on the 
Secret Evidence Repeal Act on May 23. We need just a few more votes to move 
this bill to the House floor. Please tell your Representative that you 
support due process in the United States and ask that he or she support the 
Secret Evidence Repeal Act. You can learn more about the bill and send a 
FREE FAX from our action alert at:

http://www.aclu.org/action/secret106.html

---


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

Date: Tue, 16 May 2000 01:28:25 GMT
From: sarbx@my-deja.com
Subject: Directory - Security
Message-Id: <8fq87a$l6p$1@nnrp1.deja.com>

We have a feature in our web site which would allow our customers to
create directories and files in specific area of the web server.
Once a file has been uploaded a script can be called with the 'dirname'
and 'filename' as parameters.
The script opens the file like,

open INPUT, $CUST_DIR/<dirname>/<filename>

and sends the output. The $CUST_DIR is set using a cookie from the
browser which is set after a successful logon.

The problem now is how do I prevent anybody from passing something like
<dirname> = ../../../../etc/
<filename> = passwd

and getting the password file or any other file.

I can only think of searching for the string ".." in the dirname and
raise a security exception.

Is there any other clean method to prevent this kind of access.

Thanks,
-Sarva





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


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

Date: 16 May 2000 01:27:45 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: Do YOU use taint-checking?
Message-Id: <8fq86h$r65$1@newsflash.concordia.ca>

In article <8fplt3$l9$1@nnrp1.deja.com>,
webqueen, queen of the web  <webqueen@my-deja.com> wrote:

>I avoid system() and `` calls and try to stick to things that are safe,
>yet -T seems to complain about almost everything.

I'd like to see an example of the code -T complains about. 

>So, again, are YOU a taint-checker?

Yes.

I'll cop to being lazy and turning taint off for some CPAN modules
which are well-coded (I checked it carefully) but which -T will 
complain about. If I were a good perl hacker, I would have posted
patches to make the modules taint-safe, but sometimes I take the path
of least resistance.

At least develop with taint on. Then you can make some sort of 
informed decision. Same deal with -w -- occasionally it is just too
persnickety about some things.


-- 
Neil Kandalgaonkar
neil@brevity.org


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

Date: Mon, 15 May 2000 23:37:16 -0400
From: Matt Collins <mcollins@oxford.net>
Subject: Getting words between two strings
Message-Id: <3920C26B.5F2EA828@oxford.net>

Hi people!  I'm afraid i've gotten myself into a little problem here.  I
need to get all the words between two other words non inclusive.

for example:

"hello my name is joe"

or

"blah blah blah ni hello my name is joe blah blah blah blah blah blah
blah"

i need to get "my name is" out of that sentence with the sentence being
held in a variable.


Any help i could get would be awesome!
Thanks for listening,
Matt.



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

Date: Tue, 16 May 2000 02:48:03 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: How to COPY a website
Message-Id: <FuMt43.ECH@news.boeing.com>

In article <391F5D27.BBB14B32@My-Deja.com>,
Makarand Kulkarni  <makarand_kulkarni@My-Deja.com> wrote:
>
>> Are there any good scripts out there for retrieving all the files found at a
>> website?  Essentially, I would like to point this tool at a URL and have it
>> decend all the local links and retrieve all the content associated with
>> static html links.
>
>use lynx  ( text base browser)
>
>investigate the options
>
>-crawl
>-traversal
>-dump
>

Another possibility is the CPAN module WWW::Robot 
by Neil Bowers.  There's a script in the examples 
directory called "poacher" (not sure why that name.. 
maybe because it cooks sites :)
 
which could be easily adapted to your needs.

--
Charles DeRykus


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

Date: Mon, 15 May 2000 22:07:10 -0500
From: greg@apple2.com
Subject: Re: How to COPY a website
Message-Id: <greg-EFF971.22071015052000@news.binary.net>

In article <FuMt43.ECH@news.boeing.com>,
ced@bcstec.ca.boeing.com (Charles DeRykus) wrote:

> Another possibility is the CPAN module WWW::Robot 
> by Neil Bowers.  There's a script in the examples 
> directory called "poacher" (not sure why that name.. 
> maybe because it cooks sites :)

Heh, I'm not sure whether you're being facetious or not.

-- 
__  _____________  __
\ \_\ \__   __/ /_/ /                 <greg@apple2.com>                   ___
 \  __ \ | | / __  /----------------------------------------------------\-\|/-/
  \_\ \_\|_|/_/ /_/          <http://www.war-of-the-worlds.org/>


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

Date: Tue, 16 May 2000 03:38:11 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: How to COPY a website
Message-Id: <B5463AE1.400E%elaine@chaos.wustl.edu>

in article FuMt43.ECH@news.boeing.com, Charles DeRykus at
ced@bcstec.ca.boeing.com quoth:
 
> which could be easily adapted to your needs.

uh..no.

rsync, rdist, or mirror.

e. 




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

Date: Mon, 15 May 2000 21:57:00 -0400
From: Leslie Neilan <lneilan@vt.edu>
Subject: How to lock a tie()d file?
Message-Id: <3920AAEB.C7D38B55@vt.edu>

Hi, another newbie here.  This question probably gets asked all the
time, but I can't seem to find the answer in the perl docs.  I'm writing
a CGI that accesses a database by tie()ing it (using DB_File).  I only
read from the database, never write to it (in the CGI).  Do I need to
lock it at all?  If so--and anyway, for future reference--how do I do
it?  I know how to use flock to lock an ordinary file, but how do I lock
a tie()d file?  I could hack around this using touch or something, but
there must be a better way.

Thanks in advance,

Steve Corwin
scorwin@runet.edu



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

Date: Mon, 15 May 2000 23:44:21 -0400
From: Leslie Neilan <lneilan@vt.edu>
Subject: How to lock a tie()d file?
Message-Id: <3920C415.D03AE675@vt.edu>

Thanks to everyone who helped with this question.  Ya know, this might
be the nicest group on the net.  I hope I can contribute eventually.



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

Date: Tue, 16 May 2000 02:32:32 GMT
From: webqueen, queen of the web <webqueen@my-deja.com>
Subject: Re: How to lock a tie()d file?
Message-Id: <8fqc01$p1a$1@nnrp1.deja.com>

Its a good idea to lock it, but not for exclusive use for READONLY. You
can lock the db file itself (there are more than 1 for SDBM), but you
may find it easier if you have several files to lock at once to just
create a textfile used only for locking purposes. It makes things
simplier and avoids interlocks.

Don't forget

 use Fcntl;

for platform-indepedent locking parameters.


-WQ

In article <3920AAEB.C7D38B55@vt.edu>,
  Leslie Neilan <lneilan@vt.edu> wrote:
> Hi, another newbie here.  This question probably gets asked all the
> time, but I can't seem to find the answer in the perl docs.  I'm
writing
> a CGI that accesses a database by tie()ing it (using DB_File).  I only
> read from the database, never write to it (in the CGI).  Do I need to
> lock it at all?  If so--and anyway, for future reference--how do I do
> it?  I know how to use flock to lock an ordinary file, but how do I
lock
> a tie()d file?  I could hack around this using touch or something, but
> there must be a better way.
>
> Thanks in advance,
>
> Steve Corwin
> scorwin@runet.edu
>
>

--
Time is nature's way of preventing everything from happening at once.


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


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

Date: Tue, 16 May 2000 12:46:52 +1000
From: Peter Hill <phill@modulus.com.au>
Subject: Re: How to lock a tie()d file?
Message-Id: <3920B69C.6638@modulus.com.au>

Leslie Neilan wrote:
> 
> Hi, another newbie here.  This question probably gets asked all the
> time, but I can't seem to find the answer in the perl docs.  I'm writing
> a CGI that accesses a database by tie()ing it (using DB_File).  I only
> read from the database, never write to it (in the CGI).  Do I need to
> lock it at all?  

No.

>If so--and anyway, for future reference--how do I do
> it?  I know how to use flock to lock an ordinary file, but how do I lock
> a tie()d file?  

Let's imagine your db is called "customers.db". Prior to tieing, open
"customers.lock" for append, request a lock (exclusive for writing,
shared for reading) on "customers.lock" via its handle. When this is
granted, you can tie.

Immediately after untieing, release the lock on "customers.lock" by
closing the file.

You will no doubt receive other advice that you can lock a filehandle to
the tied object (as this was the common way to do it), but the latest
version of DB_File shows why you should *not* do this.

[snip]

-- 
Peter Hill,
Modulus Pty. Ltd.,
http://www.modulus.com.au/


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

Date: 16 May 2000 03:51:20 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: How to lock a tie()d file?
Message-Id: <slrn8i1hdo.7pk.sholden@pgrad.cs.usyd.edu.au>

On Mon, 15 May 2000 23:44:21 -0400, Leslie Neilan <lneilan@vt.edu> wrote:
>Thanks to everyone who helped with this question.  Ya know, this might
>be the nicest group on the net.  I hope I can contribute eventually.

comp.lang.perl.misc. The only place on usenet where multiple universes exist
at the same time and place. 

comp.lang.perl.misc - the nicest group on the net. ;)

I hope you don't mind being added to my .sigs.

-- 
Sam

this might be the nicest group on the net.
	-- Leslie Neilan about comp.lang.perl.misc <3920C415.D03AE675@vt.edu>


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

Date: Tue, 16 May 2000 02:46:41 GMT
From: webqueen, queen of the web <webqueen@my-deja.com>
Subject: Is my Perl 5.005_03 Compiler broken?
Message-Id: <8fqcqe$q62$1@nnrp1.deja.com>




I had a bug in my code:

   if defined ($s{$_})
    {print "<tr><td><input type=checkbox name=$_ checked>$sta{id}</td>".
           "<td>$sta{name}</td></tr>"}

where I'd left the ()'s from around the

    if (expression).


  *********************************************************
    perl -cw mysource

said no problem- syntax OK (huh???)

running on the command-line with

    perl -w

on the same source produced an output (it didn't get to this line
before it exited normally) with no error messages or warnings.


Running the program through cgi, and even with:

    use CGI::Carp qw(carpout);
    open(LOG, ">./cgi.log") || msg::SayError('cgi log', $!);
    carpout(*LOG);

it left the cgi.log file empty (yes it's write-enabled, and it works on
other errors).

Here's where it get's weird- checking the apache log after running this
script, it says:

  [Tue Apr  4 18:31:59 2000] [warn] [client 24.27.206.68]handler
"cgi-wrapper" not found for: /home/sites/web/cgibin/testdev/pat.cgi
  [Tue Apr  4 18:32:00 2000] [error] [client 24.27.206.68] malformed
header from script. Bad header=syntax error at /home/sites/si:
/usr/cgiwrap/cgiwrap

How can the missing ()'s cause a malformed header, and cause the
cgi-wrapper to "not be found"?


 *******************************************************************

Putting the () around the

  if ()

expression fixes everything; the script runs fine with no warnings and
no errors.

Do I need to tell this client that he has serious server issues, or is
this all logical and congruent?

Colour me confused!

WQ



--
Time is nature's way of preventing everything from happening at once.


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


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

Date: 16 May 2000 03:55:17 GMT
From: The WebDragon <nospam@devnull.com>
Subject: Re: Job
Message-Id: <8fqgr5$nuh$0@216.155.32.110>

In article <slrn8hqbrl.rmg.sjlen@zero-pps.localdomain>, sjlen@ndirect.co.uk 
wrote:

 | Cheers
 | Steve              email mailto:sjlen@ndirect.co.uk
 | 
 | %HAV-A-NICEDAY Error not enough coffee  0 pps. 
 | 
 | web http://www.ndirect.co.uk/~sjlen/
 | 
 | or  http://start.at/zero-pps
 | 
 |  10:08am  up 16 days, 12:09,  4 users,  load average: 1.36, 1.13, 1.03

think you can chomp that sig down to 4 lines or less?

-- 
send mail to mactech (at) webdragon (dot) net instead of the above address. 
this is to prevent spamming. e-mail reply-to's have been altered 
to prevent scan software from extracting my address for the purpose 
of spamming me, which I hate with a passion bordering on obsession.  


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

Date: Tue, 16 May 2000 01:32:56 GMT
From: afay@ultranet.com
Subject: make error: missing file separator
Message-Id: <8fq8g7$la1$1@nnrp1.deja.com>

Hello,

I'm trying to compile perl-5.6.0 on a linux system. After running
 ./Configure with mostly default options I try to run make but it
immediately gives me an error. I don't have the exact output but it
complains about a missing file separator on the line after the last line
of the Makefile. So if there are 569 lines then it complains that there
is a missing file separator on line 570. If it helps, I'm using gnu
make-3.79. I have also tried to compile perl-5.000whatever but I get the
same error. Any suggestions?

Thanks,
Avery Fay




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


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

Date: Tue, 16 May 2000 02:21:19 GMT
From: afay3483@my-deja.com
Subject: Re: make error: missing file separator
Message-Id: <8fqbaj$ocg$1@nnrp1.deja.com>

My bad. Shouldn't be missing file separator just missing separator. Here
is the actual output:

makefile:570: *** missing separator. Stop.

Note: my Makefile is only 569 lines long.

Avery Fay




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


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

Date: Tue, 16 May 2000 03:05:29 GMT
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: make error: missing file separator
Message-Id: <87u2fzurd1.fsf@shleppie.uh.edu>

>> On Tue, 16 May 2000 02:21:19 GMT,
>> afay3483@my-deja.com said:

> My bad. Shouldn't be missing file separator just missing
> separator. Here is the actual output:

> makefile:570: *** missing separator. Stop.

> Note: my Makefile is only 569 lines long.

Could you post the output from "tail makefile"?  I'd guess
that some part of your build process went wrong and left
an incomplete makefile.

Also do "view makefile" (":q" to exit) -- does it complain
about "incomplete last line"?

An ftp to/from another platform (e.g. Windows) isn't
involved here is it?  You might have a CRLF <-> LF problem
with make getting confused by a stray CR.

    "cat -v makefile | tail"

might indicate errant characters.

hth
t


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

Date: Tue, 16 May 2000 04:01:19 GMT
From: "JB Goss" <jgoss@goss-com.com>
Subject: MS Word to Text help
Message-Id: <jK3U4.1616$U4.19728@news1.rdc1.ne.home.com>

I was wondering if anyone had any ideas on a Perl filter.  I was looking for
something simple to strip out the nasty stuff in a Word document and just
leave the text, nothing fancy.

Thanks,
JB




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

Date: Tue, 16 May 2000 01:27:52 GMT
From: mschore@mindspring.com
Subject: PPMFIX Doesn't Fix Anything
Message-Id: <3920a491.4272874@news-server.nc.rr.com>

Does anyone understand the following behavior:
J:\Perl>ppmfix

J:\Perl>ppm verify --upgrade --location=. PPM
Failed to load PPM_DAT file
Error verifying PPM: Package 'PPM' has not been installed by PPM

I unzipped the fix file directly to the Perl directory.

I just did a fresh install of Perl on a Win 2K machine and I am seeing
behavior not seen before. PPM is totally inoperative as well. I was
hoping the the "fix" would solve this problem.

Any help would be greatly appreciated.


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

Date: Tue, 16 May 2000 01:06:20 GMT
From: jamalone@earthlink.net
Subject: Queastion about CGI.pm sticky values
Message-Id: <39209dab.794692@news.earthlink.net>

How is it possible to make variables retrieved from CGI.pm not sticky?
I am going to go and get the book tomorrow but I can't find any online
docs on it right now.

Thanks
Jason


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

Date: Mon, 15 May 2000 20:45:43 -0700
From: Xah <xah@xahlee.org>
Subject: Re: Reading and Writing to a file
Message-Id: <B5461276.9654%xah@xahlee.org>

> Jonathan Stowe wrote:
>> Idiot.
>> 
>> *plonk*

This is exemplary of Perl folk's opuses. Eloquent, insightful, and humorous.

Thanks Jon for the demo. This gift is for you:
 http://x24.deja.com/[ST_rn=ps]/getdoc.xp?AN=590228164&CONTEXT=958445025.365
953046&hitnum=0

"Andrew N. McGuire" <andrew.mcguire@walgreens.com> wrote:
> Here here.  The new troll also seems to mistake a list for a set,
> a troll for a genious, and this newsgroup for the Jerry Springer
> show.

Allow me to proceed to stultify behaviors like yours meanwhile recapitulate
the problem Godzilla is facing.

In the art of flame war, it's passe to pick on people's spellings. Why?
Because the wise understands that an invigorating argument is one that hits
each other's spots, not going for the cheap shots. You grasps my meaning,
and hit me back with reason. I grasp your reason, and kick you with
rationality. That is dialectics. And when exquisitely articulated, it's
rhetoric, delighting a wide audience on the side.

> [ aside to Xah: lists can have duplicate elements, sets can't,
> by definition ]

Does it subtract any meaning from that paragraph i wrote? (and do you think
i don't know that?) Argue with people's head, not their mouth. Focus on what
they mean, not their accents. Poems are for apprehension, not chanting. In
Godzilla's terms: "reading comprehension".

Godzilla's problem, is largely the same problem i face when dealing with
Perl peddlers. Ideas fly over their heads, but they bog you down with petty
details and artless slobber. The Perl mongers and unix weenies, think that
their stupid naming of programs and pathetic syntax makes them giant poets.
I see pubescent laddies playing with their peckers for the first time.

The perl folks with their beads of little eyes, cannot see beyond their
perl-perl-land.

 Xah
 xah@xahlee.org
 http://xahlee.org/PageTwo_dir/more.html
 "I love bondage and discipline languages. <wink wink, geek girls>"



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

Date: Tue, 16 May 2000 03:41:48 GMT
From: "Bill" <bill@billcampbell.com>
Subject: Re: Script using MailSender only seems to work with local email address
Message-Id: <0s3U4.50566$55.1052424@news2.rdc1.on.home.com>


Jan Matejka wrote in message ...
>MailSender7.04 on Redhat 6.2
>SMTP server only seems to recognize local (to the server) email addresses
>with this script.
>Is there a problem with my Script, Mail Sender, or my smtp server?


It's common to disable the mail server from redirecting incoming email. This
is to stop people from using your server as a remailer, thus becoming
someone's tool for anonymous spam.
Your script is not recognized as an authenticated user sending mail out but
as outside mail coming in. Your administrator may be able to enable an
exception to get around this by allowing mail to be redirected when received
from a particular ip address - the one your script will always come from.

Bill






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

Date: Mon, 15 May 2000 20:53:26 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: sigh  ...
Message-Id: <slrn8i1706.1ru.tadmc@magna.metronet.com>

On Mon, 15 May 2000 20:43:21 -0400, JTJ <jtjohnston@courrier.usherb.ca> wrote:

>Sigh ... need help, or someone's objectivity ...


Sigh, need to read the docs for the constructs you are using...


>I have a log file, userstatslog, which I started with this line as it
>only content:
>
>0\t0\t0\t0\t
>
>As the .pl runs, each field value (divided by \t) should increment,
>depending on the version number of browser type, but all I get when I
>read the file is:
>
>1\t1\t\t\t
>
>no matter how many times I run the .pl. Therefore, $STATData[2],
>$STATData[3] write nothing back into the log file when I write it again.
>
>Where did I screw up? :)


By using foreach but not reading about foreach.



>
>open(STATSLOG,"$userstatslog");
               ^             ^
               ^             ^

Those quotes serve no purpose other than making your code harder to read.

You should always, yes *always*, check the return value from open():

   open(STATSLOG, $userstatslog) || die "could not open '$userstatslog'  $!";



>@STATData = <STATSLOG>;
>close(STATSLOG);
>
>foreach $line (@STATData)
                ^^^^^^^^^
>{
> chop $line;
  ^^^^


It has not been spelled that way for 5 years now.

In modern Perl it is spelled "chomp".

   perldoc -f chomp


> @STATData = split (/\t/, $line);
  ^^^^^^^^^
>}


You are changing the array that you are looping over.

The "Foreach Loops" section in perlsyn.pod says in the third paragraph:

--------------------
If any part of LIST is an array, C<foreach> will get very confused if
you add or remove elements within the loop body, for example with
C<splice>.   So don't do that.
--------------------

The Manual said "don't do that", but you did that.

Don't do that.


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


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

Date: Mon, 15 May 2000 18:51:49 -0700
From: Xah <xah@xahlee.org>
Subject: Re: Tanspose rows to columns
Message-Id: <B545F7C5.963A%xah@xahlee.org>


bart.lateur@skynet.be (Bart Lateur) wrote:
> But where is the challenge in that!
> 
> So I've been thinking about a single function that indeed transposes an
> array of arrays.
> 
> So, assuming that @row and $columns are filled as with the above
> function:
> 
> @transposed = map { my $i = $_; [ map { $_->[$i] } @row ] }
> 0 .. $columns-1;
> 
> { 
> #check:
> local($", $\) = "\t";
> print "@$_\n" foreach @transposed;
> }

and that's so impressive for a Perl programer.
Now witness a functional programer:

--
Transpose

 Transpose(tree) returns a result that is the given tree with
 the first two levels transposed. e.g. Transpose(
 [[1,2,3],['a','b','c']] ) returns [[1,'a'],[2,'b'],[3,'c']].

 Transpose(tree, permutationList) transposes the tree
 according to permutationList of the form [n1,n2,...,nm],
 where each n_i is a unique positive integer from 1 to m.
 Transpose($tree) is equivalent to Transpose($tree, [2,1] ).

 Transpose essentially restructures a tree into a different
 shape. Here are some explanations, examples follows at the
 end. First, we'll use a simple example to illustrate.
 Suppose we have $tree = [[1,2,3],['a','b','c']] and
 $permutationList = [2,1]. The elements at level two of the
 tree have these position indexes:

  element    position index
     1            [0,0]
     2            [0,1]
     3            [0,2]
    'a'           [1,0]
    'b'           [1,1]
    'c'           [1,2]

 Since the length of $permutationList is two, thus Transpose
 will reshape the tree at level two. For each node, Transpose
 will apply the given permutation to its position index.
 Here's the result:

  element    position index
     1            [0,0]
     2            [1,0]
     3            [2,0]
    'a'           [0,1]
    'b'           [1,1]
    'c'           [2,1]

 Transpose then construct a tree by this new element/index
 pair. The result is [[1,'a'],[2,'b'],[3,'c']]. Because
 transposition with permutation [2,1] is common (matrix
 computations), thus it is the default behavior for Transpose
 with just one argument.

 The given tree needs to be a rectangular array only up to
 the level m, where m is the length of the specified
 permutation. For example, suppose we have $tree =
 [[1,2,3],[$anotherTree,'b','c']] and $permutationList =
 [2,1]. It all works just as before, except that the element
 'a' is substituted by $anotherTree. For example,
 Transpose([[ 1,2,3],[ ['m','n'] ,'b','c']], [2,1]) returns
 [[1,['m','n']],[2,'b'],[3,'c']].

 Longer permutations also works similarly. For example,
 suppose

 $tree = [ [['x1','x2'],['y1','y2'],['z1','z2']], [
 ['a1','a2'] ,['b1','b2'], ['c1','c2']]]; $permutationList =
 [3,1,2];

 Since the length of $permutationList is 3, thus looking at
 level 3 of the tree we have

  element    position index
            before /  after permute by [3,1,2]
    'x1'    [0,0,0]  [0,0,0]
    'x2'    [0,0,1]  [1,0,0]
    'y1'    [0,1,0]  [0,0,1]
    'y2'    [0,1,1]  [1,0,1]
    'z1'    [0,2,0]  [0,0,2]
    'z2'    [0,2,1]  [1,0,2]
    'a1'    [1,0,0]  [0,1,0]
    'a2'    [1,0,1]  [1,1,0]
    'b1'    [1,1,0]  [0,1,1]
    'b2'    [1,1,1]  [1,1,1]
    'c1'    [1,2,0]  [0,1,2]
    'c2'    [1,2,1]  [1,1,2]

 Therefore, the result is
 [[['x1','y1','z1'],['a1','b1','c1']],[['x2','y2','z2'],['a2'
 ,'b2','c2']]].

 There are some implied restrictions on the input to
 Transpose: 1. The second argument must be a permutation of a
 range of m numbers that starts with one. 2. The tree must be
 a rectangular array up to level m. That is,
 Length(Dimensions($tree)) >= m.

 A property of Transpose: If $tree is a rectangular array,
 then the following is always true.
 Permute(Dimensions($tree), $permutationList) ==
 Dimensions(Transpose($tree, $permutationList))

 If $tree is a rectangular array up to level m only, then the
 left and right hand side agrees up to the first m numbers.

 Example:

  my $tree =
   [
    [ ['x1','x2'], ['y1','y2'], ['z1','z2']],
    [ ['a1','a2'], ['b1','b2'], ['c1','c2']]
   ];

  Transpose( $tree, [1, 2, 3]);
  # returns 
[[['x1','x2'],['y1','y2'],['z1','z2']],[['a1','a2'],['b1','b2'],['c1','c2']]
]

  Transpose( $tree, [1, 3, 2]);
  # returns 
[[['x1','y1','z1'],['x2','y2','z2']],[['a1','b1','c1'],['a2','b2','c2']]]

  Transpose( $tree, [2, 1, 3]);
  # returns 
[[['x1','x2'],['a1','a2']],[['y1','y2'],['b1','b2']],[['z1','z2'],['c1','c2'
]]]

  Transpose( $tree, [2, 3, 1]);
  # returns 
[[['x1','a1'],['x2','a2']],[['y1','b1'],['y2','b2']],[['z1','c1'],['z2','c2'
]]]

  Transpose( $tree, [3, 1, 2]);
  # returns 
[[['x1','y1','z1'],['a1','b1','c1']],[['x2','y2','z2'],['a2','b2','c2']]]

  Transpose( $tree, [3, 2, 1]);
  # returns 
[[['x1','a1'],['y1','b1'],['z1','c1']],[['x2','a2'],['y2','b2'],['z2','c2']]
]

  Transpose( $tree, [2, 1]);
  # returns 
[[['x1','x2'],['a1','a2']],[['y1','y2'],['b1','b2']],[['z1','z2'],['c1','c2'
]]]

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

code downloadable at

 http://xahlee.org/PerlMathematica_dir/perlMathematica.html

In functional languages, such generalized function as above are a dime a
dozen, and people don't wet their pants over it.

 Xah
 xah@xahlee.org
 http://xahlee.org/PageTwo_dir/more.html
 "The three principle virtues of Perl programers: mundaneness, sloppiness,
and fatuousness."



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

Date: Tue, 16 May 2000 03:48:35 GMT
From: andy@nowhere.com (Andy)
Subject: Re: What's this line which Perl added to AUTOEXEC.BAT?
Message-Id: <slrn8i1h8n.c0k.andy@charon.virtualvoid.net>


The basic problem is that the line should be 

SET PATH=%PATH%;C:\Perl\bin

In the original post the path had been replaced, so win.com would not
be found by the system and the computer would not boot fully.  Of
course, there will be an error message that indicates that this is the
problem and it would've helped things if that had been included in the
original post. 

Most PC users do not know what environment variables are.  They
should, but they don't.

On 15 May 2000 10:54:48 -0700, Sue Spence <sue@pennine.com> wrote:
>In article <19b13c48.15fccc27@usw-ex0101-007.remarq.com>, bjanko says...
>>
>>After installing Perl from activestate.com on my Windows 98
>>platform, the following line was written into my AUTOEXEC.BAT:
>>
>>SET PATH=C:\Perl\bin\
>>
>>This seemed to make my computer unbootable.
>
>That is not just unlikely, I think it to be impossible.  BTW, the above is not
>what ActiveState Perl put in my autoexec.bat, so I suspect you have not reported
>your situation very accurately.  Accuracy (and precision) are very helpful
>things when you are trying to get help from thousands of semi-random strangers.
>
>>Does anyone know
>>the purpose of the line? 
>
>Most PC users know - and a few minutes with a search engine on the web would
>tell you, too.  This is a perl group, not a PC group, so I won't go that far
>off-topic.  I'll tell you one thing, however...I've got ActiveState Perl on a
>Win98 system and works just fine.  It was A-OK right out of the box.  I believe
>that there are a lot of other happy AS Perl users out there, so much as I hate
>to tell you this - there is something else wrong with your PC.  Did anything
>unusual happen when you installed the package?  Did you change anything else at
>the time?
>
>> What it does do?  Do I need it?
>
>You don't *need* it, but it makes life a lot more convenient.
>


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

Date: 16 May 2000 01:08:14 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: zen and the art of trolling [OT]
Message-Id: <8fq71u$lgf$1@newsflash.concordia.ca>

In article <3920917C.D2338697@stomp.stomp.tokyo>,
Godzilla! <godzilla@stomp.stomp.tokyo> wrote:

>My email address, my site addresses and my full
>name have been provided by me, many times over
>the past, oh, four to five months, openly and
>freely, by myself. These claims of "discovery"
>are nothing more than bogus lies. 

I think you posted a similar URL a long time back, I remember that
strange Celine Dion / Les Miserables logo. No argument. However, 
your use of different pseudonyms and accounts (one is usually 
enough, if you are concerned about privacy) suggests you are trying
to deter attempts to track you or killfile your postings.

BTW, I found your attempts at locking out Linux users pretty amusing. 
Like most of the stuff you post on this newsgroup, it is both broken
in implementation and conceptually wrong. When I saw that, I 
started figuring you weren't trolling with regards to your code -- 
you actually use the sort of code you post here. 


>On May 12th our family was left with no choice,
>even after issuing warnings, left no choice but
>to report several serious crimes to Superintendent 
>Ron Dicks, Officer In Charge of Burnaby Detachment
>of The Royal Canadian Mounted Police, after one of 
>you was caught and confessed to crimes committed
>against our family with a clearly stated intent 
>to benefit this newsgroup, to benefit each person
>participating here. This is ludricrous.

You have just about zero credibility in my books, so I will take
"caught and confessed" with a grain of salt. Anyway, I have 
addressed your conspiracy theory of c.l.p.misc in previous posts. 


-- 
Neil Kandalgaonkar
neil@brevity.org


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

Date: Mon, 15 May 2000 18:32:49 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: zen and the art of trolling [OT]
Message-Id: <3920A541.A9F97464@stomp.stomp.tokyo>

Neil Kandalgaonkar wrote:
 
> In article <3920917C.D2338697@stomp.stomp.tokyo>,
> Godzilla! <godzilla@stomp.stomp.tokyo> wrote:

(snip)

I will say this one last time.

"I find no benefit in spreading hatred...."


Godzilla!


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

Date: Tue, 16 May 2000 02:16:42 GMT
From: Elaine Ashton <elaine@chaos.wustl.edu>
Subject: Re: zen and the art of trolling [OT]
Message-Id: <B54627C6.3EDA%elaine@chaos.wustl.edu>

in article 3920917C.D2338697@stomp.stomp.tokyo, Godzilla! at
godzilla@stomp.stomp.tokyo quoth:
> However, making a decision to commit crimes
> is a freewill choice, with consequences.

Look, I haven't been following this grand story much but is it really
essential to post this here? Especially if there is litigation pending?

> I don't bluff.

Perhaps not, but aren't there more appropriate venues for this?

e.



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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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

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

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


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


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