[15614] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3027 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri May 12 11:08:45 2000

Date: Fri, 12 May 2000 08: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: <958143909-v9-i3027@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 12 May 2000     Volume: 9 Number: 3027

Today's topics:
    Re: a stupid question. <iltzu@sci.invalid>
        ActivePerl 522 and Win32-ASP <aahz@gol.com>
        ActivePerl and DBD::MySQL <dhopkins@itribe.net>
        Connection Error <wsmith2@nc.rr.com>
    Re: Connection Error (Rafael Garcia-Suarez)
    Re: home PC talking to webserver <jraff@home.com>
        how to get non-blocking sockets in Windows <fulko@wecan.com>
    Re: I need help installing Perl <waldo700NOwaSPAM@aol.com.invalid>
        Is this new language possible in perl? pohanl@my-deja.com
    Re: page access dependant on $ENV{HTTP_REFERER} (Randal L. Schwartz)
    Re: Passing parameters <jraff@home.com>
        PerlIS and IIS5 on Windows 2000 <Roland@psychenet.co.uk>
    Re: php, embPerl, mod_perl, help. (Andy Wardley)
    Re: Polly a stupid question <flavell@mail.cern.ch>
    Re: Polly a stupid question <thepoet1@arcormail.de>
        Randomised function <mike_moose@yahoo.com>
        Seattle Perl Talks by Damian Conway <spug@halcyon.com>
        split the big file <samay1NOsaSPAM@hotmail.com.invalid>
        unresolved external in XSUB energon@my-deja.com
    Re: VBscript to Perl Conversion <dewitt@jlab.org>
        Web Form page, help <amcguigan@pinesoft.co.uk>
    Re: What is $| ? <andkaha@my-deja.com>
    Re: What is $| ? <blah@nospam.com>
    Re: What is $| ? <aahz@gol.com>
    Re: What is $| ? <makau@multimania.com>
    Re: Windows or Unix, Perl or C <thepoet1@arcormail.de>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 12 May 2000 13:09:00 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: a stupid question.
Message-Id: <958136179.27520@itz.pp.sci.fi>

In article <8ff5gt$d2j$1@uranium.btinternet.com>, Andy Chantrill wrote:
>The only stupid question is the one not asked.  :o)

Allow me to politely disagree.  There are also those stupid questions
that get asked over and over and over and over again, and then when
you're certain everyone all the way to the deepest jungles of Congo
must've heard the answer, some ignorant moron pops out from under a
rock, runs up to you and asks the same bloody question one more time.

Although perhaps you are right, in a way.  Those questions are not
really stupid.  The people asking them are.

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: Fri, 12 May 2000 13:19:58 GMT
From: "Chris Williams" <aahz@gol.com>
Subject: ActivePerl 522 and Win32-ASP
Message-Id: <2yTS4.1409$uL2.108777@nnrp.gol.com>

Due to having Windows 2000, I am unable to use ActivePerl 613 (it doesn't
allow PerlScript) and have to use 522.  However, it seems that the Win32-ASP
module is dependent on 613...or at least any ASP I try to make which
includes the words "use Win32-ASP" causes the page to fail loading.

Is my assumption, that this is because I am using an older version of
ActivePerl, correct?

Is there any way to fix this, regardless of the cause?



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

Date: Fri, 12 May 2000 09:24:25 -0400
From: "Derrick Hopkins" <dhopkins@itribe.net>
Subject: ActivePerl and DBD::MySQL
Message-Id: <sho1okdokcp171@corp.supernews.com>

I was surprised to find that in ActivePerl (613) for windows, the MySQL DBD
no
longer works The older version (522) had a very nice MySQL driver but it
doesnt work with (613). Does anyone know if an update for DBD::MySql is on
its way or if one has already been released?

D

--
Derrick Hopkins[]dhopkins@itribe.net
Enjoy Your Job - Make Lots of Money - Work Within the Law -
Pick Any 2






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

Date: Fri, 12 May 2000 14:37:38 GMT
From: "nc.rr.com" <wsmith2@nc.rr.com>
Subject: Connection Error
Message-Id: <SGUS4.940$f3.12764@typhoon.southeast.rr.com>

When I do a DBI->CONNECT  I get CONNECT.al not found. Is this an install
problem? Could some one please help.

Regards,
Wane




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

Date: Fri, 12 May 2000 14:45:25 GMT
From: garcia_suarez@hotmail.com (Rafael Garcia-Suarez)
Subject: Re: Connection Error
Message-Id: <slrn8ho6de.ss5.garcia_suarez@r-garcia.kazibao.net>

nc.rr.com wrote in comp.lang.perl.misc:
>When I do a DBI->CONNECT  I get CONNECT.al not found. Is this an install
>problem? Could some one please help.

No, this is a spelling problem. Method names are usually spelled
in lower case, as in "DBI->connect".

-- 
Rafael Garcia-Suarez


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

Date: Fri, 12 May 2000 14:15:30 GMT
From: "jraff" <jraff@home.com>
Subject: Re: home PC talking to webserver
Message-Id: <6mUS4.65131$R4.330919@news1.rdc1.nj.home.com>

Seemingly all you would have to do is create a web access client using LWP
and send the form "qmform"
with the appropriate fields: address, message, CharCount, counter and
submit.
----------------------------------------------------------------------------
--------------
"mopi" <totally@bogus.com> wrote in message
news:8n3nhs0cjs55ua3pr3airujfc0d0mqpnfj@4ax.com...
> Excuse subject I'm not certain how to ask question.
>
> Do you know of a something I can install on my home PC that will
> automatically talk to online webserver and fill in details I specify.
>
> I want to use email client to mail my mailserver/linux gateway and
> have that PC type in details (username/password and more) on an online
> webserver [ www.quios.com to be specific ] end result will be email to
> mobile phone sms message.
>
> tia
> Paul
>
>




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

Date: Fri, 12 May 2000 10:16:20 -0400
From: Fulko Hew <fulko@wecan.com>
Subject: how to get non-blocking sockets in Windows
Message-Id: <391C1234.41C6@wecan.com>

I need to get some Perl code moved from Unix to Windows.
Basically its a derivative of an example from the Perl Cookbook
on page 631.

The problem is to put a socket into non-blocking mode.
The example uses:

  $flags = fcntl($socket, F_GETFL, 0);
  fcntl($socket, F_SETFL, $flags | O_NONBLOCK);

But ActiveState perl says it doesn't support F_GETFL (or F_SETFL).

How would I do the equivalent in Windows?

TIA
Fulko

-----------------------------------------------------------------------
Fulko Hew,                           Voice:  905-333-6000  x 6010
Senior Engineering Designer,         Direct: 905-333-6010
Northrop Grumman-Canada, Ltd.        Fax:    905-333-6050
777 Walkers Line,                    Home:   fulko%fkhew@wecan.com
Burlington, Ontario, Canada, L7N 2G1 Work:   fulko@wecan.com


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

Date: Fri, 12 May 2000 07:54:32 -0700
From: bjanko <waldo700NOwaSPAM@aol.com.invalid>
Subject: Re: I need help installing Perl
Message-Id: <055d2200.4b1513fb@usw-ex0104-033.remarq.com>

Thanks for the help.  I went to activestate.com and was able to
install the program.  However, it wrote the following line into
my AUTOEXEC.BAT:

SET PATH=C:\Perl\bin\

With this line in the code my computer won't reboot.  What am I
doing wrong?  What's the solution?

Thanks.

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Fri, 12 May 2000 14:44:54 GMT
From: pohanl@my-deja.com
Subject: Is this new language possible in perl?
Message-Id: <8fh5d2$1b5$1@nnrp1.deja.com>

Ok, here are some ideas for the new language...


The evolution of languages started first with load/store primative
operations for the CPU.  This led to assembly which was basically a
labeling system for the actual numbers the cpu understands.  When you
have labels, people created an abstract macro layer above that so that
it produced multiple assembly labels to be compiled into machine code.
This is basically what Basic and Fortran, and Colbol did.  But as the
languages became longer and longer, people started inventing ways to
package some of the often used routines, and created the concept of a
method (java), function (c), procedure (pascal), subroutine (basic and
perl).  They are basically a way store often used instructions for the
cpu into nice place (label it), and call it anytime you want.  But
since these functions usually need information passed into it to work,
pass by reference and pass by value became the norm, and was
incorporated into the language.  Usually
when a function is called, the calling function stores the passed
values on a stack (a separate place in memory).  The called function
then take these values from the stack and diddles with them.  When it
is done, it return usually one value (either a reference or value) by
placing it back on the stack, and the caller then takes it off of the
stack.  To make it consistent, and less error prone, some languages
invented the concept of a prototype, which basically says, this
function can only take in 4 passed parameters of type integer, and
return type char, etc etc.  Up to this point you have C and pascal.

Then someone comes along and says, hey, why not package multiple
functions
and data into a structure.  And that is how classes got started (which
lead to object oriented languages like C++ and java).  Now when you are
calling a function, instead of eat food, you say "tom, eat food" you
have to tell which structure/class to do it.  Of course tom would have
to know how to eat and what food to eat.  That is why Tom needs
a function inside called eat, and you need to pass him food as a
parameter.

Well this is fine, but each time you turn on the computer, the classes
dissapear (well at least the data stored inside of them).  So people
invented
components that sort of made classes a little smarter.  Components are
basically classes that (usually, not all) contains serialization, and
function query.  Serialization means it can be stored to harddrive and
back and keep its data intact.  function query (my own term) means you
can
ask a component what functions/methods it supports.  Some people group
the functions into ports and some group them into interfaces.  These
are basically another layer above the functions that you use to
actually execute a function inside a component.  COM, Corba, and
JavaBeans are like these.  (I did some things on Ports, like smart
ports, which automatically does introspection(check parameter types) and
automatically
link methods between components if they match).  I actually created a
new component architecture before (well contributed to it), but it
wasn't truly a new language (you still had to program in java to create
the component pieces to play with).

Well, Perl is something new to me.  It has some old vestiges of
assembly type language structures.  For example, a called function
manually pops stuff off of the stack (well indirectly), as opposed to
being defined in variables identified in the function definition.
It can also return multiple values (interesting).

Well, if you look at most cells in your body, you notice that they have
a cell wall, and inside contains the DNA and other goodies. Things are
passed to the cell through the cell wall.  This is very similar to
passing variables to a component through an
interface/function.

This new language would have components with no constraints on values
passed to it.
as for the values, instead of being dedicated to a method in a
component/class/function, it would be placed on a bloodstream/"bus".
cells/components would grab it when they have appropriate functions
that can use it.

and of course there is the concept of dynamic operators.  operators are
basically built-up from other components.




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


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

Date: 12 May 2000 06:13:57 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: page access dependant on $ENV{HTTP_REFERER}
Message-Id: <m13dnn6hd6.fsf@halfdome.holdit.com>

>>>>> "Bill" == Bill  <bill@billcampbell.com> writes:

Bill> Below is the code I use in FILE-B. How would I change it so that instead of
Bill> relying on the passed variable from FILE-A, it would be dependant on
Bill> $ENV{HTTP_REFERER} being FILE-A ?

Don't.  No.  Just say no.  I've spoken on this subject probably a half
dozen times in the past six months, so you apparently haven't done
your basic research (a simple trip to reference.com or deja.com)
either.

The "Referer" header is trivially faked, dropped, and often wrong.
It's useful as a hint or an item for logging, but *never* as a portion
of a security policy.

Don't use it.

Don't go there.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Fri, 12 May 2000 13:57:57 GMT
From: "jraff" <jraff@home.com>
Subject: Re: Passing parameters
Message-Id: <F5US4.65129$R4.330935@news1.rdc1.nj.home.com>

To "see" any field, not just hidden, one must "submit" the form, not click
on a link.
----------------------------------------------------------------------------
--------
"Vladimir Lech" <lech@cu.kiev.ua> wrote in message
news:8fgob7$1sp4$1@whale.gu.net...
> Hello to All,
> Please help me to solve this kind of task.
> There is a script with two subroutines.
> First one prints an html page with links and contains hidden fields.
> When user clicks on link script calls a second subroutine and here is a
> trick.
> A second one does not "see" parameters from hidden fields.
> Where is my fault?
>
> Please, help.
>
> Best regards,
> Lech
>
>




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

Date: Fri, 12 May 2000 14:49:56 +0100
From: "new.myratech.net" <Roland@psychenet.co.uk>
Subject: PerlIS and IIS5 on Windows 2000
Message-Id: <391c0cde.0@news.myratech.net>

Has anyone managed to get PerlIIS up and running with IIS5 on Windows 2000?
We have an NT4 server that relies heavily on the PerlIS.dll for working with
web pages hosted on the server.  We have been trialling IIS5 on Win2K and
can't seem to get it configured to work!

When you try and run a script the server reports that the file cannot be
found.

All the registry entries for scripting have been made and are correct -
duplicated from current install that works.

I am aware that on the Activestate website (we're running the latest version
of Perl from Active State) there is the following bug-report with Win2K:

"PerlScript currently does not function correctly when being run in an ASP
environment under IIS 5. This appears to be an issue in the `MSVCRT.DLL'
that ships with Windows 2000. We are working to resolve the problem for a
future release. "

However, this is referring to Perl script, which I thought was differnet to
IISAPI Perl, which we were trying to run.  Maybe I'm mistaken?

If anyone could help me out on this, either by confirming that PerlIS and
Perscript are the same, or by confirming that they have manged to set it up,
then that would be a big help.

Many thanks in anticipation of your help.

Regards

Roland
Systems Administrator & Developer
Psyche Solutions LTD




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

Date: Fri, 12 May 2000 14:26:46 GMT
From: abw@cre.canon.co.uk (Andy Wardley)
Subject: Re: php, embPerl, mod_perl, help.
Message-Id: <FuGAsM.I62@cre.canon.co.uk>


You might like to take a look at the Template Toolkit and the DBI
plugin.  Here's an example of the kind of thing you can do.

e.g.

   [% USE DBI('dbi:mysql:mydbname') %]

   <table>
   [% FOREACH user = DBI.query('SELECT * FROM users') %]
     <tr>
       <td>[% user.name %]</td>  <td>[% user.email %]</td>
     </tr>
   [% END %]
   </table>

You can use it as a stand-alone CGI script, or within mod_perl.  There's
not a lot of effort involved in setting the latter up, and it'll give
you much better performance.  Everything depends on what you want to 
do, of course, but 100,000 hits a day shouldn't be too much of a problem.  

See:

  http://www.cpan.org/modules/by-module/Template/

A


--
Andy Wardley <abw@kfs.org>   Signature regenerating.  Please remain seated.
     <abw@cre.canon.co.uk>   For a good time: http://www.kfs.org/~abw/


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

Date: Fri, 12 May 2000 15:13:27 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Polly a stupid question
Message-Id: <Pine.GHP.4.21.0005121456180.21334-100000@hpplus01.cern.ch>

On Fri, 12 May 2000, Bart Lateur wrote:

> I had found out that "<BASE HREF="/path/to/dir/"> doesn't work. It's a
> pity, because now I have to hardcode my server name, protocol and
> possibly port number as well, into the document.

No, you don't _have_ to.  The whole point of BASE (if it has any point
at all) is to pretend (for the purposes of resolving relative
references) that the document has a different URI than what it really
has.  If it already _has_ an appropriate URI, then you best not use
BASE at all.

> I hadn't tried the
> relative URL, but it would have been a saviour. Why does it require
> absolute URL's? It ain't practical.

The original questioner was making references to "images/foo.gif" from
a script that was in, say, "/cgi-bin/bar.cgi".  That was wrong,
because the images were really in "/images/foo.gif", not in
/cgi-bin/images/foo.gif (which would anyway be inadvisable, if cgi-bin
had been defined with ScriptAlias as is the usual custom).  My answer
to that problem would be to write the references in an appropriate
way, rather than trying to continue writing them inappropriately and
then fudge them up by setting BASE.

> I can't move my document trees between servers, for instance.

Well, if you are going to move the cgi-bin directory to
/luser/cgi-bin/ and the images to /luser/images/ , then the
appropriate way to write the references might be "../images/foo.gif".

But if you are going to move /cgi-bin and /images to completely
unrelated points in a new document tree, then it stands to reason
that writing relative references between the two is inappropriate.

After all, your script is in control of what it is writing. 

It isn't that I can't see what you're getting at - I _can_ see it, but
BASE is too clumsy a tool for sorting this problem out, IMHO.

[we now return you to your normal Perl programming at this time...]

cheers



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

Date: Fri, 12 May 2000 13:37:57 +0200
From: Christian Winter <thepoet1@arcormail.de>
Subject: Re: Polly a stupid question
Message-Id: <leqgf8.oq.ln@usenet-autoren.de>

Darren <prefer_to_look@newsgroup.com> schrob:
> Imagine a scenario where a form calls a cgi script that will pipe a
> web page back to the browser......how do I stop the browser from using
> the path of the script. The problem being that the data I pass back
> with the script uses images of the path 'images/x.gif' except when
> piped from the cgi script the current dir is /cgi-bin when I actually
> want the current dir to be '/'.

Why not send a simple redirect to the page? Or is it that you modify
the page content? In this case you won't get around changing image
locations also.

> Now I'm just at a loss as to what to do (I understand why this is
> happening just not how best to fix it).

To change the image urls in the document you may have a look at
the Bundle::LWP and HTML::TokeParser.

HTH
Christian


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

Date: Fri, 12 May 2000 15:18:54 +0100
From: Mike Moose <mike_moose@yahoo.com>
Subject: Randomised function
Message-Id: <391C12CE.1161572A@yahoo.com>

Hi, I'm trying to write a perl function which will generate a random
password of 8 character, numbers/characters ... in C there is rand()
which generates a random number synched with the time, is there a
function similar to this in Perl...

Thanks



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

Date: 12 May 2000 14:42:17 GMT
From: Seattle PERL Users Group <spug@halcyon.com>
Subject: Seattle Perl Talks by Damian Conway
Message-Id: <8fh589$nto$1@brokaw.wa.com>
Keywords: Damian Conway SPUG Seattle meetings talks user groups

Dr. Damian Conway, Perl Guru and author of "Object Oriented Perl", will
be visiting the Seattle, WA area in July from his home in Australia.
(Thanks in part to a sponsorship arrangement with NeoInformatics,
(http://www.neoinformatics.com.)  

He'll be giving free talks on the evenings of July 5th and 6th, with
the latter being another presentation of his "Quantum Superpositions
and the First Virtue" talk from the June YAPC.  Due to this being a
holiday period, we are giving plenty of advance notice in the hope
that interested parties will be able to accommodate these meetings in
their schedules.  All are welcome.

For more information on these talks, and other Seattle presentations by
Dr. Conway during this period, see the SPUG (Seattle Perl User's Group)
web page at http://www.halcyon.com/spug, or the Consultix web page at
http://www.consultix-inc.com.

==============================================================
|  Tim Maher, Ph.D.             Tel: (206) 781-UNIX          |
|  SPUG Founder & Leader        Email: spug@halcyon.com      |
|  Seattle Perl Users Group:    http://www.halcyon.com/spug  |
==============================================================


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

Date: Fri, 12 May 2000 06:29:54 -0700
From: Samay <samay1NOsaSPAM@hotmail.com.invalid>
Subject: split the big file
Message-Id: <2089d0c2.02b7e7ed@usw-ex0104-087.remarq.com>

Hi, I have log file with size around 500 MB. I would like to
divide into small files based upon the particular word it
contains.. What are the effective ways?

I am looking for effective ways for code and performance.
My patterns are simple strings.
such as 'japan' or '/america/newyork/'

I did..
open FILE1, ">file1";
open FILE2, ">file2";
 .
open FILE50,">file50";


while(<IN>){
   if(/pattern1/){
      print FILE1;
      next;
   }
   if(/pattern2/){
      print FILE2;
      next

 ..for 50 patterns..
}


This will give me average time.. I am looking for something
better. Memory could be issue, space is not an issue..

Thanks
Samay..


* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



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

Date: Fri, 12 May 2000 14:11:18 GMT
From: energon@my-deja.com
Subject: unresolved external in XSUB
Message-Id: <8fh3dn$v6n$1@nnrp1.deja.com>

Environment: Solaris 2.6 and HP-UX 10.20  with Perl 5.002
---------------------------------------------------------

Hello people!
I'm bulding an XSUB.

I can successfully build and run it under Solaris 2.6

However, I get the following error
/usr/lib/dld.sl: Unresolved symbol: XS_unpack_charPtrPtr (code)  from
 ./mytest.sl
on my HP-UX 10.20 box when I try to run my test.

Any ideas, as to why ?

All help is appreciated.

Thanks,
Milind


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


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

Date: Fri, 12 May 2000 10:25:18 -0400
From: Shane Dewitt <dewitt@jlab.org>
Subject: Re: VBscript to Perl Conversion
Message-Id: <391C144E.486EA567@jlab.org>

Chris Ottinger wrote:
> 
> Since I am very new to perl and slowly learning I was wondering if there was
> anyone who could help me with this minor problem...
> 
> What I am trying to do is retrieve a list of DISTRIBUTION LISTS from an
> Exchange 5.5 server using ADSI or whatever it takes.  My server has many
> containers and some with subcontainers.  I have located this VBscript that
> works...It retrieves all of my distro list throughout the site but I was
> wondering if someone could help me convert it tho PERL...I don't need it in
> HTML format, that was just the example I found....
> 
> If anyone can recommend any good reference material-books websites,
> ect...-for learning PERL with ADSI or ADO I would greatly appreciate the
> referral....

i just ordered "ActivePerl with ASP and ADO"    $25.59 from amazon.com,
i'll let you know if its any good in a couple of days.


> 
> Thanx for any help in advance.
> 
> Chris.
> 
> <HTML>
> <BODY>
> <CENTER><H2>Global Address List</H2><CENTER>
> <TABLE ALIGN=RIGHT>
> <TR>
>  <TD>Mailboxes<TD BGCOLOR=RED>&nbsp &nbsp &nbsp</TD>
> <TR>
>  <TD>Distribution Lists<TD BGCOLOR=GREEN>&nbsp &nbsp &nbsp</TD>
> <TR>
>  <TD>Custom Recipients<TD BGCOLOR=BLUE>&nbsp &nbsp &nbsp</TD>
> <TR>
> </TABLE>
> <%
>    'TO DO : Change the below name to your Exchange server name
>    '
>    ' Note if you want to use NT Challenge Response authentication this
>    ' will need to be the same machine as the ASP is running on
>    strServerName = "MyServer"
>    strUser = Request.ServerVariables("LOGON_USER") 'retrieve the user
>    if strUser = "" then
>      Response.Write "You are using Anonymous authentication you will need to
> change it so the user can be identified"
>      Response.End
>    end if
> 
>    set oConn = CreateObject("ADODB.Connection")
>    set oCommand = CreateObject("ADODB.Command")
>    set oRS = CreateObject("ADODB.Recordset")
> 
>    oConn.Provider = "ADsDSOObject"
>    oConn.Open "Ads Provider"
> 
>    set oCommand.ActiveConnection = oConn  'set the active connection
> 
>  ' Next we will build the LDAP query that will be used to retrieve the
> contents of the GAL.
>  ' We will specify which server we want to run the query against,
>  ' a filter for what types of objects we are looking for, the attributes we
> would like
>  ' returned, and the type of search
>  ' A filter of (objectClass=person) will return mailboxes, distribution
> lists, and custom recipients
> 
>    strQuery= "<LDAP://" & strServername &
> ">;(objectClass=person);cn,telephoneNumber,physicalDeliveryOfficeName,title,
> company,objectClass,uid;subtree"
>    oCommand.CommandText = strQuery
>    oCommand.Properties("Page Size") = 99   'a paged query is used to avoid
> Exchange LDAP server limits
>    set oRS = oCommand.Execute   'Execute the query
> 
> ' Now we will loop through the results of our query
> '   and build a table to display the Global Address List
> 
>    %>
>    <TABLE BORDER=3>
>    <TR>
>    <TH>Display Name<TH>Phone<TH>Office<TH>Title<TH>Company<TH>Alias
>    <%
>    While not oRS.EOF
>    %>
>      <TR>
>     <%
>     ' Get the class of the object and set the appropriate color
>     vObjectClass=oRS.Fields("objectClass")
>     select case  vObjectClass(0)
>       case "organizationalPerson"
>           strColor = "RED"
>       case "groupOfNames"
>           strColor = "GREEN"
>       case "Remote-Address"
>           strColor = "BLUE"
>       case else
>         ' other may include mailbox agents, Public folders, etc.
>           strColor = "BLACK"
>      end select
>      %>
>      <TD><FONT COLOR=<%=strColor%>><%=oRS.Fields("cn")%></FONT>
>      <TD><%=oRS.Fields("telephoneNumber")%>
>      <TD><%=oRS.Fields("physicalDeliveryOfficeName")%>
>      <TD><%=oRS.Fields("title")%>
>      <TD><%=oRS.Fields("company")%>
>      <TD><%=oRS.Fields("uid")%>
> 
>    <%
>    oRS.MoveNext
>    wend
>    %>
>    </TABLE>
> </BODY>
> </HTML>

-- 
Shane Dewitt                      Email: dewitt@jlab.org
TR 53C                            Phone: 757-269-7592


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

Date: Fri, 12 May 2000 15:26:17 +0100
From: Andrew McGuigan <amcguigan@pinesoft.co.uk>
Subject: Web Form page, help
Message-Id: <391C1489.A4D3E20A@pinesoft.co.uk>

Help, help and help

I am to design a website, no problem here so far, one of the pages is a
form page, also no problem here. The form will contain textbox’s for the
client to input their credit card details.

The first thought was to use Active Server Pages (A.S.P) from Microsoft,
but my boss does not want to use this, for some unknown reason. So Peal
CGI Script was a thought, can some one give me of a brief description of
CGI does, and how can I use Peal CGI Script for my form page? Also when
I submit this form, is it possible to send it to an ftp server? And how
do I do it if so. And how can I send it to a server?

Sorry if this is a bit vague, and thanks for any help.

Andrew



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

Date: Fri, 12 May 2000 13:04:33 GMT
From: Andreas Kahari <andkaha@my-deja.com>
Subject: Re: What is $| ?
Message-Id: <8fgvgm$qdv$1@nnrp1.deja.com>

In article <8fguhs$pjq$1@nnrp1.deja.com>,
  Makau Divangamene <makau@multimania.com> wrote:
> Can someone explain me simply what $| is?
> The Camel Book (ed2) gives obfuscating explanations that drive me
crazy.

See the perlvar manual.

"If set to nonzero, forces a flush right away and after every write or
print on the currently selected output channel."

/A

--
# Andreas Kähäri, <URL:http://hello.to/andkaha/>.
# All junk email is reported to the appropriate authorities.


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


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

Date: Fri, 12 May 2000 15:25:18 +0200
From: Marco Natoni <blah@nospam.com>
Subject: Re: What is $| ?
Message-Id: <391C063E.272567CD@nospam.com>

Hi Makau,

Makau Divangamene wrote:
> Can someone explain me simply what $| is?

<cons>
	$ perldoc perlvar

	...

	$OUTPUT_AUTOFLUSH

	$|     If set to nonzero, forces a flush right away and
               after every write or print on the currently
               selected output channel.  Default is 0 (regardless
               of whether the channel is actually buffered by the
               system or not; $| tells you only whether you've
               asked Perl explicitly to flush after each write).
               Note that STDOUT will typically be line buffered
               if output is to the terminal and block buffered
               otherwise.  Setting this variable is useful
               primarily when you are outputting to a pipe, such
               as when you are running a Perl script under rsh
               and want to see the output as it's happening.
               This has no effect on input buffering.  (Mnemonic:
               when you want your pipes to be piping hot.)
</cons>

  Summary:  On buffered file streams, when you write something to the
buffer, this is not immediately re-write to the destination.  Enabling
the autoflush feature (i.e. set $| to non-zero), you can obtain that
result.

<code>
	$|=1;
	print 'I am just doing something... ';

	# doing something...

	print "done.\n";
</code>


	Best regards,
		Marco


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

Date: Fri, 12 May 2000 13:41:09 GMT
From: "Chris Williams" <aahz@gol.com>
Subject: Re: What is $| ?
Message-Id: <VRTS4.1425$uL2.108741@nnrp.gol.com>

In general when a call is made to print some info to some location, it will
be done whenever Perl gets around to doing it.  By setting $| to something
other than "0", it immediately sends the info into the buffer at the end of
your print command.  Since the info in the buffer will be sent to the target
location on the input of new information into the buffer, you can cause
immediate action by following your first command with a print "";.

So pretty much all it does is allow you to manually control the output
stream rather than relying on Perl's automatic system.

"Makau Divangamene" <makau@multimania.com> wrote in message
news:8fguhs$pjq$1@nnrp1.deja.com...
> Can someone explain me simply what $| is?
> The Camel Book (ed2) gives obfuscating explanations that drive me crazy.
>
> Please help!!
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.



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

Date: Fri, 12 May 2000 14:01:13 GMT
From: Makau Divangamene <makau@multimania.com>
Subject: Re: What is $| ?
Message-Id: <8fh2qu$ug5$1@nnrp1.deja.com>


> "If set to nonzero, forces a flush right away and after every write or
> print on the currently selected output channel."

Thanks for trying to help but the above sentence is the very same as the
one that is on the Camel Book. Needless to say that such an explanation
is extremely confusing to me.

Although Larry Wall can be extremely comprehensible (and concise), I
sometimes cannot prevent myself from thinking he sometimes purposedly
obfuscates his explanations *sigh* :¨|

Any illustrated examples of $| would be pretty much appreciated ..

--
Makau


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


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

Date: Fri, 12 May 2000 13:20:08 +0200
From: Christian Winter <thepoet1@arcormail.de>
Subject: Re: Windows or Unix, Perl or C
Message-Id: <8dpgf8.oq.ln@usenet-autoren.de>

hacktic@my-deja.com schrob:
> This is my first big project, but don't know where to start.
> I know C but I'm not familiar with Perl. I heard that Perl is a lot
> easier to work with than C making CGI. Any truth in this?

It certainly is. One of the main advantages there is that you
get tons of scripts and code snippets that have already been
used and tested, and that are nearly platform-independent.
If you use C, you may get a product that is slightly smaller
and faster (if that is an issue), but still often just a 
one-time solution.

> I need to consider some things:
> - add user accounts
> - send confirmation mail
> - track login sessions
> - use commandline image editing tools
> - upload files (mainly images)
> - edit HTML files by user
> - maintain user area qoutas
> - security

You may find modules for that on www.cgi-resources.com, in C as
well as in Perl, so i think best would be to take a day time,
compare them and check which one fit your needs and are more
easily understandable.

> Would this be easiest done on UNIX or on Windows NT?

As I myself have migrated everything I work with from Win to Linux,
I may be a little biased against NT ;-)
Nevertheless I think on *NIX it is clearer what's going on, what
also means errors are easier to track.

A last point to think about:
Linux+Perl cost a little more than nothing and fit together well.
To get the same hand-in-hand feeling on NT, you may invest quite a
bit into NT-Server+IIS+ASP.

> I really would appreciate some advice and pointers on how to get
> started.

As I said above, look at www.cgi-resources.com.
And - much luck with the project, as it certainly won't be trivial.

Regards
Christian


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

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


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