[10966] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4566 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 6 19:07:20 1999

Date: Wed, 6 Jan 99 16:00:27 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 6 Jan 1999     Volume: 8 Number: 4566

Today's topics:
    Re: Adding a path to the @INC variable <jims@broadcom.com>
    Re: Can't find my way with a map <d-edwards@nospam.uchicago.edu>
    Re: Checking for a Charictor in a Variable (brian d foy)
    Re: Checking for a Charictor in a Variable (Larry Rosler)
        couldn't spawn process error <simsi@hotmail.com.nospam>
        Databases Help <nic_azzuri@compuserve.com>
    Re: Does 'require' run the script automatically? (Alister)
    Re: Dynamic gifs on the fly mark_thomas@my-dejanews.com
    Re: Embedding PERL in C & also C in PERL (Edwin Litterst)
        HELP - Is it possible to read mail from an Exchange Ser qvanegeren@frxsoft.com
        Help reading/rewriting file jdennis@alldata.net
        how do you pass a query string while debugging in dos? (jm)
    Re: how do you pass a query string while debugging in d <rhw@lucent.com>
    Re: how do you pass a query string while debugging in d <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: If Larry Wall's listening out there.... <dennis.kowalski@daytonoh.ncr.com>
    Re: If Larry Wall's listening out there.... (Peter Scott)
        Looking for module to calculate shipping rates (Jete Software Inc.)
    Re: Nasty regexp .... help! <zack44@altavista.net>
    Re: Nasty regexp .... help! (brian d foy)
    Re: Nasty regexp .... I'm stumped. ptimmins@netserv.unmc.edu
        Need CGI database philipbrown@my-dejanews.com
        Need hints on how to use MakeMaker <dwc3q@mamba.cs.virginia.edu>
    Re: OK I give up (After a WEEK!)  - FIXED! (Marc Austin)
        Perl and LDAP <mab@hrb.com>
        Perl Criticism topmind@technologist.com
    Re: Perl Criticism dturley@pobox.com
    Re: Perl Criticism <jeromeo@atrieva.com>
    Re: Short way to do this with a regexp?? Delete certain (Tad McClellan)
    Re: Short way to do this with a regexp?? Delete certain (Charles Wilt)
    Re: Short way to do this with a regexp??....Thanks to A (Charles Wilt)
        What happened to mox.perl.com lordkai2@hotmail.com
    Re: Adding a path to the @INC variable (Andrew M. Langmead)
        Cant modify my files dragnovich@my-dejanews.com
    Re: CGI offline mode: enter name=value pairs on standar (brian d foy)
    Re: Checking for a Charictor in a Variable (brian d foy)
    Re: comp/comp3 numbers in Perl or maybe C (Randall Bart)
    Re: Dynamic gifs on the fly (brian d foy)
    Re: Embedding PERL in C & also C in PERL <iup.strickler@swissonline.ch>
        filename from a filehandle <jcieslak@inez.gsfc.nasa.gov>
    Re: filename from a filehandle (Martien Verbruggen)
    Re: fork under Win32 -- Activestate!? (Johannes Poehlmann)
        Help - cookies; check if a browser is set to accept coo <dales@enhanced-performance.com>
    Re: Help - cookies; check if a browser is set to accept (Martien Verbruggen)
    Re: Help - cookies; ignore <dales@enhanced-performance.com>
        how to get B57600, etc, with POSIX.pm <bcboy@cisco.com>
        Iternation of a loop, and why the hell doesn't this wor (Jim Matzdorff)
    Re: Iternation of a loop, and why the hell doesn't this (Martien Verbruggen)
    Re: Iternation of a loop, and why the hell doesn't this <arnej@fc.hp.com>
    Re: JOB-CA Application Engineers <chatmaster@c-zone.net>
    Re: looking for perl programmer (Craig Berry)
        mod_perl/images problem frogsmock@my-dejanews.com
    Re: Nasty regexp .... help! <zack44@altavista.net>
    Re: Need CGI database jdennis@alldata.net
    Re: Need hints on how to use MakeMaker (Randy Kobes)
    Re: noop (Craig Berry)
        OO Perl Persistence Problem <user@cisco.com>
        ORACLE DBD compile error <pmein@johnco.cc.ks.us>
    Re: Perl Criticism (Martien Verbruggen)
    Re: Perl Criticism (David Formosa (aka ? the Platypus))
    Re: psswrd protect (Ethan H. Poole)
        recursive directory copy perl module <anandan_balaji@mentorg.com>
        recursive directory copy perl module <anandan_balaji@mentorg.com>
        recursive directory copy perl module <anandan_balaji@mentorg.com>
        recursive directory copy perl module <anandan_balaji@mentorg.com>
    Re: recursive directory copy perl module (Martien Verbruggen)
    Re: Writing Perl with Notepad <shameluss plug> <iup.strickler@swissonline.ch>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 06 Jan 1999 12:42:11 -0800
From: Jim Searle <jims@broadcom.com>
Subject: Re: Adding a path to the @INC variable
Message-Id: <s7sodo3zh8.fsf@flogger.broadcom.com>

Tom Christiansen <tchrist@mox.perl.com> writes:

>  [courtesy cc of this posting sent to cited author via email]
> 
> In comp.lang.perl.misc, 
>     Daniel Grisinger <dgris@moiraine.dimensional.com> writes:
> :> BEGIN {
> :>       push(@INC,"/some/path/some/where");
> :> }
> :> 
> :  use lib '/some/path/some/where';
> :is almost exactly equivalent to the begin block you posted above.

I'd perfer to use lib, but I can't seem to get this to work.

BEGIN {
  $MyDir = "/path/to/some/dir";
  use lib ($MyDir . "/goo");
}

It just end's up with '/goo' added to the path.

But this does work:

BEGIN {
  $MyDir = "/path/to/some/dir";
  unshift(@INC, $MyDir . "/goo");
}

I assume it's a package problem but I've tried many different ways of
declaring and using the variable and I can't seem to get it to work.

Thanks,
jim


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

Date: Wed, 6 Jan 1999 19:50:51 GMT
From: Darrin Edwards <d-edwards@nospam.uchicago.edu>
Subject: Re: Can't find my way with a map
Message-Id: <tgemp818pw.fsf@noise.bsd.uchicago.edu>

Jerry Pank <jerryp.usenet@connected.demon.co.uk> writes:

> 
> I want to use map to remove leading/trailing quotes that may exist in a
> tab delimited file:
> 
> Something along the lines of:
> 
>         @data = map { s/^"|"$//g; } split /\t/, $line;
> 
> What do I need to change so @data is the result of the s/// rather than
> the number of matches?

My first thought here was "capturing parens!", often the answer
when one is trying to get stuff "out" of a pattern match.
Fortunately my brain caught up with my mouth in time, 'cause
that's obviously not right here.  You want each element of
@data to be a whole field from the split, i.e. you want each
iteration of map to _return_ the whole string (in this case $_)
that s/// was operating on:

     @data = map { s/^"|"$//g; $_ } split /\t/, $line;

Cheers,
Darrin


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

Date: Wed, 06 Jan 1999 15:54:41 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Checking for a Charictor in a Variable
Message-Id: <comdog-ya02408000R0601991554410001@news.panix.com>

In article <76vkj1$opn$1@plug.news.pipex.net>, "Artoo" <r2-d2@REMOVEbigfoot.com> posted:

> How can you check to see if a character exists with-in a variable.  ie: I
> need to check there is an @ sign anywhere in the variable inorder to
> process.

tr/@//

m/\@/

index($_, '@') > 0

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: Wed, 6 Jan 1999 13:33:04 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Checking for a Charictor in a Variable
Message-Id: <MPG.10fd76689c92ddb59898f8@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <comdog-ya02408000R0601991554410001@news.panix.com> on Wed, 
06 Jan 1999 15:54:41 -0500, brian d foy <comdog@computerdog.com> says...
> In article <76vkj1$opn$1@plug.news.pipex.net>, "Artoo" <r2-d2@REMOVEbigfoot.com> posted:
> 
> > How can you check to see if a character exists with-in a variable.  ie: I
> > need to check there is an @ sign anywhere in the variable inorder to
> > process.
> 
> tr/@//
> 
> m/\@/
> 
> index($_, '@') > 0

To be semantically equivalent to the other two ways, this should be

  index($_, '@') >= 0

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


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

Date: Wed, 06 Jan 1999 21:18:55 GMT
From: "Simmo" <simsi@hotmail.com.nospam>
Subject: couldn't spawn process error
Message-Id: <01be39ba$39b64760$79c348c2@is>

Hi,

I hope this is the right place for this...sorry if it's more Unix than Perl
but am not sure as non-Perl scripts appear to run fine and i dont claim to
be a sys-op ;(.

Has anyone seen this error running Perl 5 on FreeBSD latest version:

   couldn't spawn child process: /home/xxx/www/cgi-bin/client/logon.pl

The error crops up occassionally but after repeated reloads clears itself.

Any help gratefully received.

Ian





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

Date: Wed, 6 Jan 1999 20:34:31 -0000
From: "MarcoPolo" <nic_azzuri@compuserve.com>
Subject: Databases Help
Message-Id: <eHZmPebO#GA.131@nih2naac.prod2.compuserve.com>

Im new to perl and want to learn how to get perl to enter details into a
database (access)
is this possible? and how is it done?, and are there any ways it can be done
without CGI?




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

Date: Wed, 06 Jan 1999 18:57:12 GMT
From: comp.lang.perl.misc--usenet@minotaur (Alister)
Subject: Re: Does 'require' run the script automatically?
Message-Id: <36965fa3.8329760@158.152.254.76>

Rich Grise <off-duty@entheosengineering.com> wrote:

>main.cgi:
> require "/my/real/subdirectory/mysub.cgi";
> &printit("other &stuff");

I would call filenames that are 'require'd  .pl, rather than .cgi -
leave that for programs that really are executable, instead of
includes.

Alister


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

Date: Wed, 06 Jan 1999 19:19:45 GMT
From: mark_thomas@my-dejanews.com
Subject: Re: Dynamic gifs on the fly
Message-Id: <770d0e$qd$1@nnrp1.dejanews.com>

In article <36938BCE.6D5741FC@yahoo.com>,
  Leonord Wertzberger <chaimwerz@yahoo.com> wrote:
> Hi thanks for your reply!
> Can you please direct me to the question topic where this was discussed - I
am still very new to
> perl. Also what does DejaNews mean and where can I find it?

Search usenet archives, http://www.dejanews.com

In addition to Image::Magick, you may wish to look up gd.pm

--
Mark Thomas, who just entered his third
printf"%x",34*join('',unpack('C*',"*^'"));

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 06 Jan 1999 19:16:54 GMT
From: el@fiz-karlsruhe.de (Edwin Litterst)
Subject: Re: Embedding PERL in C & also C in PERL
Message-Id: <3693b635.14212252@news>

>Embedding PERL in C and vice-versa seem interesting. Can anyone suggest
>where I can find some introduction to it - some sort of a book......

The man pages are the best source for this.

BTW, does anyone have experience with perl calling c, where the c
module is calling perl again?
I always had problems because it seemed that there was only one perl
interpreter used and data was mixed.

Eddie



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

Date: Wed, 06 Jan 1999 19:37:25 GMT
From: qvanegeren@frxsoft.com
Subject: HELP - Is it possible to read mail from an Exchange Server using PERL?
Message-Id: <770e1l$1sq$1@nnrp1.dejanews.com>

I had posted a message before about reading e-mail on a win32 platform and
was directed to use NET::POP3, which I did, but the MIS department says they
don't have a POP3 server running.  They are instead running Exchange Server.

I can't get the NET::POP3 to work with the Exchange Server.  Are there any
other suggestions as to what I can do through PERL to read incoming mail
that comes through an Exchange Server?

Thanks in advance for any suggestions you may have.

Quenten

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 06 Jan 1999 21:31:42 GMT
From: jdennis@alldata.net
Subject: Help reading/rewriting file
Message-Id: <770knv$886$1@nnrp1.dejanews.com>

Sorry for the newbie nature of this post, but I am a relative newbie when it
comes to perl.

I have a file that consists of multiple line HTML records, for lack of a
better term.  Each "record" starts with an <H3> tag on the first line.	I
need to take this file, read it in, remove the html tags, and write it out to
a flat file, where each field is separated by a pipe sign and each record is
now on one line.

I can read the file fine, and rewrite it to another file.  Where I am having
trouble is the syntax to strip out the html, and then how to write the multi
line record to a single line record.

Any help appreciated.

Jamie

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 06 Jan 1999 19:47:39 GMT
From: fatshit@hotmail.com (jm)
Subject: how do you pass a query string while debugging in dos?
Message-Id: <3694bdc0.4045612@news.atl.bellsouth.net>

how do you pass a query string while debugging in dos?

please email to mailto:jminder@bellsouth.net


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

Date: Wed, 06 Jan 1999 15:06:49 -0600
From: Bob Walters <rhw@lucent.com>
To: jm <fatshit@hotmail.com>
Subject: Re: how do you pass a query string while debugging in dos?
Message-Id: <3693D069.2BD2716B@lucent.com>

I'm having a similar problem in Unix.
>From a browser:
         http://........../program.cgi?value
will pass "value" to program.cgi.  Running the program directly from
UNIX with a space
        program.cgi value
will also pass the value but I'm failing to find how to use the "system"
command to pass the value.
>From within another perl script running:
       system "program.cgi", "value";
will execute program.cgi but "value" doesn't get passed to it.

Can anyone help?  I haven't found this in any literature thus far.
===================================================================

jm wrote:

> how do you pass a query string while debugging in dos?
>
> please email to mailto:jminder@bellsouth.net



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

Date: 06 Jan 1999 22:56:34 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: how do you pass a query string while debugging in dos?
Message-Id: <83n23wuktp.fsf@vcpc.univie.ac.at>

Re: how do you pass a query string while
debugging in dos?, Bob <rhw@lucent.com> said:

Bob> I'm having a similar problem in Unix.  From a
Bob> browser: http://........../program.cgi?value
Bob> will pass "value" to program.cgi.  Running the
Bob> program directly from UNIX with a space

The CGI.pm module does this for you.

Bob> program.cgi value will also pass the value but
Bob> I'm failing to find how to use the "system"
Bob> command to pass the value.  From within another
Bob> perl script running: system "program.cgi",
Bob> "value"; will execute program.cgi but "value"
Bob> doesn't get passed to it.

Yes, it does get passed, but as command line
parameters, but that isn't how CGI works.  Again,
the CGI.pm module is your friend.

    perldoc CGI

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Wed, 06 Jan 1999 14:09:50 -0500
From: Dennis Kowalski <dennis.kowalski@daytonoh.ncr.com>
Subject: Re: If Larry Wall's listening out there....
Message-Id: <3693B4FE.32CD@daytonoh.ncr.com>

> 
> I use edit.com in my WINDOWS95/NT environment.
> It gives the line numbers.

O, Well, I just got zonked by two emails about the size of my reply.

Sorry, my mistake.

Somehow I missed the parts of the original message after the 1st
question that I attempted to answer with the 2 lines show above..

Mea Cupa, Mea Cupa, Mea Maxima Cupa


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

Date: 6 Jan 1999 19:45:04 GMT
From: psl@euclid.jpl.nasa.gov (Peter Scott)
Subject: Re: If Larry Wall's listening out there....
Message-Id: <770eg0$g3u@netline.jpl.nasa.gov>

In article <76urmk$ncd$1@news.akl.netlink.net.nz>,
        "Andrew Mayo" <andrew@geac.co.nz> writes:

> Has anyone out
> there had experience in maintaining large (>10,000 line) Perl programs or
> program suites, and if so, what techniques would you recommend to maximise
> maintainability, other than the obvious recourse of commenting every line,
> which is currently what I am doing?.

I have created several large Perl suites, including one comprising,
lessee... 8291 LOC, although no-one should confuse LOC with power.

Techniques?  Object-oriented.  Document - especially POD.  Plus
design documents and other docs separate from the code.  I have done
similar-sized projects in C and find Perl slightly better for 
maintainability (C has no built-in documentation language, although
there are some third party ones out there), just that the LOC shrinks 
due to the power of Perl.

> 2. No macro pre-processor (AFAIK) which would let me add a bit of
> syntactic sugar; most experienced C programmers find #define and
> #typedef are invaluable for rendering sense out of chaos.

-P as suggested, or check out the Filter::* modules.  But I've never
used them; there are standard ways in Perl of defining constants that
work fine.  C++ taught us that using #define for macros was inferior
to _inline_, so I presume you're not referring to that capability :-)
And since there is no strong typing you don't need typedef :-)

I wrote tons of C before coming to Perl, and of course I had to use
the preprocessor liberally, who wouldn't?  But I have never missed it
in Perl.

-- 
This is news.  This is your      |  Peter Scott, NASA/JPL/Caltech
brain on news.  Any questions?   |  (psl@euclid.jpl.nasa.gov)

Disclaimer:  These comments are the personal opinions of the author, and 
have not been adopted, authorized, ratified, or approved by JPL.


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

Date: 6 Jan 1999 16:00:08 -0500
From: jete@dgs.dgsys.com (Jete Software Inc.)
Subject: Looking for module to calculate shipping rates
Message-Id: <770iso$55l@dgs.dgsys.com>

this is for an online shopping cart application. I was just wondering
how other people and companies do the shipping rate calculations. Does
any company offer a commericial service or is there simply a perl module
in CPAN (I looked but couldn't find anything there).

This would be a general solution which would accept the following input
variables: carrier (UPS, Fedex, ...), type (2nd day ground, 3rd day, ...),
weight, origin zip and dest zip and output the cost. While I can code 
this myself, I would think that there must be a better solution (also I 
am worried about the shipping rates quickly going out-of-date).

How are others solving this problem??

Thanks!!

-- Norman



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

Date: Wed, 06 Jan 1999 14:20:18 -0500
From: Zack <zack44@altavista.net>
Subject: Re: Nasty regexp .... help!
Message-Id: <3693B772.7605360A@altavista.net>

Thanks for the code snippet. (And apologies for posting that question 5 times ..... netscape kept giving me an error when I sent it)

That *would* work, but now for the tougher part, which I forgot to mention in the original: support for wildcards.

ie:  a search on "int??net" should match both internet and intranet
     a search on auto* should match "autos, automotive, etc"
     a search on *motiv* should match "automotive, motive, motivate"

This is where the regexp comes in (I think).  In the posted code example, can you put wildcards in with the "exists" ???

Z-


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

Date: Wed, 06 Jan 1999 15:45:17 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Nasty regexp .... help!
Message-Id: <comdog-ya02408000R0601991545170001@news.panix.com>

In article <3693B772.7605360A@altavista.net>, Zack <zack44@altavista.net> posted:

> ie:  a search on "int??net" should match both internet and intranet

are you sure?

   #!/usr/bin/perl
   
   $\ = "\n";
   foreach( qw(internet intranet innet innuit) )
      {
      print if /int??net/
      }

output is

    innet

it's that tricky non-greedy quantifier on the ?, which matches 0 or
1 times normally, but zero times in the non-greedy context. perhaps
you meant

   /int..net/

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: Wed, 06 Jan 1999 19:19:21 GMT
From: ptimmins@netserv.unmc.edu
Subject: Re: Nasty regexp .... I'm stumped.
Message-Id: <770cvn$q4$1@nnrp1.dejanews.com>

In article <36938EF5.B300CC1C@altavista.net>,
  Zack <zack44@altavista.net> wrote:

> I don't know if it's possible to do this in a single expression, but here's
what I've been beating my head against the wall trying to do:
>
> Scan a text string with the following rules:
>
> 1. Some words are "required"
> 2. Other words are "optional"
> 3. Others are to be "screened"
[snip other specs]

Here's a starter:

@req = qw(req1 req2);
@opt = qw(opt1 opt2 opt3);
@screen = qw(screen1 screen2);
$line = 0;

while (<DATA>) {
    $n_req = 0; $n_opt= 0; $n_screen = 0;
    foreach $req (@req) {
        while (/\b$req\b/g) {$n_req++;}
    }
    foreach $opt (@opt) {
        while (/\b$opt\b/g) {$n_opt++;}
    }
    foreach $scrn (@screen) {
        while (/\b$scrn\b/g) {$n_screen++;}
    }
    print "Line:$line  n_req:$n_req  n_opt:$n_opt  n_scrn:$n_screen\n";
    $line++;
}

__DATA__
one screen: screen2 and two optionals: opt3 and another opt3 here
blah blah req1 blah req2 opt3 screen1 blah req2 req1 blah

will print:

Line:0  n_req:0  n_opt:2  n_scrn:1
Line:1  n_req:4  n_opt:1  n_scrn:1

Good luck!

Patrick Timmins
$monger{Omaha}[0]

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 06 Jan 1999 20:21:01 GMT
From: philipbrown@my-dejanews.com
Subject: Need CGI database
Message-Id: <770gjb$4ar$1@nnrp1.dejanews.com>

    Does anyone know where I can download a database which
will allow people to upload their names, addresses, phone
numbers, etc to a web site and also allow them to view
the names, addresses, etc of other people who also uploaded
this information?  It can use CGI for the server side.

                                                   Philip

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 6 Jan 1999 16:18:18 -0500
From: David Coppit <dwc3q@mamba.cs.virginia.edu>
Subject: Need hints on how to use MakeMaker
Message-Id: <Pine.GSO.4.05.9901061613050.21635-100000@mamba.cs.virginia.edu>


I'm pretty sure I want to use MakeMaker for this:
- I want to distribute a script which uses some of my own modules, as well
as several other non-standard Perl ones.
- I want to make sure all the modules are installed correctly. (URI in
particular, since URI-URL isn't supported by my code and causes
"strange" errors for the users.)
- I suppose I ought to do a manifest, and a test or two. :)

MakeMaker seems aimed at modules, not scripts. Can I follow the "short"
version of the instructions in the documentation? Is this the way to go to
do what I want, or is it overkill? An alternative I thought of was to
write a small script that simply loads the modules and checks their
VERSION numbers.

Thanks a lot,
David

_________________________________________________________________________
David Coppit - Graduate Student        coppit@cs.virginia.edu
The University of Virginia             http://www.cs.virginia.edu/~dwc3q
                "For I am a Bear of Very Little Brain,
             and long words Bother me" - Winnie the Pooh



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

Date: Wed, 06 Jan 1999 11:54:10 -0800
From: placeit@easyad.com (Marc Austin)
Subject: Re: OK I give up (After a WEEK!)  - FIXED!
Message-Id: <placeit-0601991154100001@blv-lx100-ip1.nwnexus.net>

Thanks everybody for your help...

It's working!


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

Date: Wed, 06 Jan 1999 16:31:32 -0500
From: Mike Bryan <mab@hrb.com>
Subject: Perl and LDAP
Message-Id: <3693D634.7FFF3FDD@hrb.com>

Hello,

Excuse my ignorance since I know very little about Perl.
That said, my question concerns Perl and LDAP.  Basically, we a Netscape
LDAP server that we need to authenticate username and passwords against
before a user is allowed onto a select group of web pages (a very simple
user validiation).
Is this possible in Perl (i.e. Do I need to learn Perl)?
Does anybody have any suggestions to where I might look to find scripts
that may already do something similiar?  (I have already looked at a lot
of LDAP sites such as Netscape and U. of Mich).

Thank you,

Mike



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

Date: Wed, 06 Jan 1999 18:46:26 GMT
From: topmind@technologist.com
Subject: Perl Criticism
Message-Id: <770b22$uq6$1@nnrp1.dejanews.com>

Subject: Perl Criticism

Perl gets a lot of credit for its powerful features. However, there are also
some major annoyances about it that prevent more widespread and formal
acceptance. Some say that "fixing" these would dilute its power, but I do not
fully agree with this. I have put together an evaluation of different language
features that I think could be used to build a "safer Perl":

http://www.geocities.com/SiliconValley/Lab/6888/langopts.htm

A summary of Perl's bigger problem areas are:

- Unnecessary deviations from the "function rule".

- Parameter and variable scope handling

- "Leaky" assignment statements

- Inter- and intra- statement communication problems (including excessive use
of "command piping")

I invite you to look at my criticisms and comment on them, or even pound them
into the ground if you are having a bad hair day :-)

-tmind-

[P.S. screw those arrogant, lazy mind-police known as 'moderators']

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 06 Jan 1999 19:41:36 GMT
From: dturley@pobox.com
Subject: Re: Perl Criticism
Message-Id: <770e9f$21f$1@nnrp1.dejanews.com>

In article <770b22$uq6$1@nnrp1.dejanews.com>,
  topmind@technologist.com wrote:
> Subject: Perl Criticism

>
> [P.S. screw those arrogant, lazy mind-police known as 'moderators']

Of course, everyone is entitled to an opinion. But one has to wonder why you
are so unsure of yours that you go immediately into the defensive with
disparaging remarks.

(Esp. since this isn't even amoderated group.)
____________________________________
David Turley
dturley@pobox.com
http://www.binary.net/dturley/

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 06 Jan 1999 12:12:02 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <3693C392.1AFF4631@atrieva.com>

I'm not going to spend a lot of time telling you you don't know what you
are talking about, as I am sure there will be legions willing to do so. 
I'll start at the top.

Says You:
Much of Perl, for example, resembles UNIX scripting languages because
that is what the author was familiar with. UNIX systems have utilities
that allow extensive commands to be issued on the command line. Since
there is only one command line, UNIX programmers have a tradition of
trying to fit as much on one line as possible.

Says Me:
I have four different shells open on my desktop right now, along with
several X-processes and other GUI like things.  Which one represents the
"one" command line?  What this paragraph tells me is that you have
little or no experience with *nix like systems.  I'll bet beer your
experience is almost exclusively WinTel.

Says You:
This tends to make UNIX-derived languages, such as Perl, a bit cryptic.
(Don't get me wrong, Perl is quite powerful, but it needs to get away
from its command-line roots.) 

Says Me:
And how, pray tell, do you get away from a command line?  I believe
MacPerl has a "drag and drop" functionality.  

Your attempts at differentiating "scripting" languages, as opposed to
"real" languages is false.  There is no such dichotomy.


topmind@technologist.com wrote:
> - Unnecessary deviations from the "function rule".

What particular operators would you have rewritten into functions?  

> - Parameter and variable scope handling

What part of the strict pragma does not satisfy your needs?  my() and
local() are well documented.
 
> - "Leaky" assignment statements

I consider any language that does not return a value from an assignment
broken.  If it's the rvalue, that's a Good Thing.
 
> - Inter- and intra- statement communication problems (including excessive use
> of "command piping")

Here you are absolutely and completely wrong, especially in light of
your misunderstanding of the way in which perl scopes variables.

Given your example: 
somefunc(x);
another_op();

belies the fact that you have no idea how subroutines operate in perl. 
How perl handles parameters is well defined and documented.

In short, perl has almost none of the problems you imply.  I'll bet
another beer that your biggest misunderstanding stems from having not
RTFM enough.

-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com


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

Date: Wed, 6 Jan 1999 13:43:05 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Short way to do this with a regexp?? Delete certain chars from string.
Message-Id: <9ce077.b84.ln@magna.metronet.com>

Charles Wilt (charles.0272@worldnet.no.spam.att.net) wrote:
: I need to replace the following characters with a space if the appear in 
: a string:
:  \ / : * ? " < > |


      $a_string =~ tr#\\/:*?"<>|# #;


: The string will be used as a filename.  


   Putting spaces into a filename may make it troublesome to use
   the filenames. Consider using a hyphen or underscore instead.

   I think you may be missing some characters from your list.

   Consider replacing _all_ punctuation (except underscore) chars and
   space chars with an underscore:


      $a_string =~ s/\W/_/g;


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


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

Date: 6 Jan 1999 21:30:33 GMT
From: charles.0272@worldnet.no.spam.att.net (Charles Wilt)
Subject: Re: Short way to do this with a regexp?? Delete certain chars from string.
Message-Id: <MPG.10fda3c626f5109e9896b4@netnews.worldnet.att.net>

In article <MPG.10fd41b1e398d07198997c@nntp.hpl.hp.com>, lr@hpl.hp.com 
says...
> [Posted to comp.lang.perl.misc and copy mailed.]
> 
> Someone else showed you how to do it with a regex, as requested in your 
> Subject (using a character class).  But by far the faster way to deal 
> with single characters without context is to use the 'tr' operator (look 
> in perlop instead of perlre):
> 
> tr#\\/:*?"<>|# #;
> 
> where # is an arbitrary delimiter, just as for a regex.
>  
> 
Thanks,

someone e-mailed me with the tr solution.  I had looked at this op but 
didn't realize I could specify a set like that.

-- 
Charles Wilt
Miami Luken, Inc.
e-mail: charles.0272@worldnet.no.spam.att.net
--->remove the no.spam.


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

Date: 6 Jan 1999 21:35:44 GMT
From: charles.0272@worldnet.no.spam.att.net (Charles Wilt)
Subject: Re: Short way to do this with a regexp??....Thanks to All
Message-Id: <MPG.10fda4fc2df2f58b9896b5@netnews.worldnet.att.net>

Thanks to all who replied,

I'm using the tr solution.  But will look at the others mentetioned to 
learn more.

-- 
Charles Wilt
Miami Luken, Inc.
e-mail: charles.0272@worldnet.no.spam.att.net
--->remove the no.spam.


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

Date: Wed, 06 Jan 1999 20:42:23 GMT
From: lordkai2@hotmail.com
Subject: What happened to mox.perl.com
Message-Id: <770hrf$5f1$1@nnrp1.dejanews.com>

Been trying to access http://mox.perl.com but keep getting site not
found.....
I noticed the website's author Tom Christiansen had posted here
several times and so I thought I'd leave the question her for him.....
I've
been to site numerous times in the past and would be greatly disappointed if
it went away..... ::(
-- Chris J. Whitcomb
"you know..... Smoke Test.....
turn it on and if it doesn't smoke then its fixed!"

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 6 Jan 1999 22:39:27 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Adding a path to the @INC variable
Message-Id: <F55tLr.56H@world.std.com>

Jim Searle <jims@broadcom.com> writes:

>I'd perfer to use lib, but I can't seem to get this to work.

>BEGIN {
>  $MyDir = "/path/to/some/dir";
>  use lib ($MyDir . "/goo");
>}

Since "use" has an implied BEGIN{} block, your code is equivilent to:


BEGIN {
  $MyDir = '/path/to/some/dir';
  BEGIN {
    unshift @INC, $MyDir;
    # plus the other stuff that the lib pragma does
  }
}

So as soon as perl finishes parsing the "use lib" line, it executes
it, then it procedes to finish compiling the rest of the BEGIN block
and executes the assignment to $MyDir.

The solution would be to only put the assignment to $MyDir in the
BEGIN block and the "use lib" following it:


BEGIN {
  $MyDir = '/path/to/some/dir';
}

use lib "$MyDir/goo";

It gets a bit messier if you need $MyDir to be in scope only between
the assignment and the lib pragma.

{
  my $MyDir;
  BEGIN {
    $MyDir = '/path/to/some/dir';
  }
  use lib "$MyDir/goo";
}

-- 
Andrew Langmead


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

Date: Wed, 06 Jan 1999 23:38:41 GMT
From: dragnovich@my-dejanews.com
Subject: Cant modify my files
Message-Id: <770s61$f2t$1@nnrp1.dejanews.com>

Hello folk, I make some Perl programs under Perl for win 95
And I have a Free Bsd server. All myu scripts works fine
Now im putting a NT server and the scripts woks good but.

I cant make that a perl script running under NT modify any file

Lets say that I have a file with nothing on it, the commands:
open(FILE,">some.txt");
   print FILE "Hello";
close(FILE);

Must produce a file with the word hello on it, but when I run it
it keeps the file with nothing!

If i try just add the info using open(FILE,">>some.txt"); it dont
works too.

Why is happening this???

Thanks
--
------------------------
Juan Carlos Lopez

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 06 Jan 1999 17:21:24 -0500
From: comdog@smithrenaud.com (brian d foy)
Subject: Re: CGI offline mode: enter name=value pairs on standard input
Message-Id: <comdog-ya02408000R0601991721240001@news.panix.com>

In article <36937783.B9353E9E@dik.maschinenbau.tu-darmstadt.de>, Uwe Kohl <kohl@dik.maschinenbau.tu-darmstadt.de> posted:

> I get the error message: "offline mode: enter name=value pairs on
> standard input"

that's not an error message.  CGI.pm in prompting you for input. this
doesn't happen during the "online" mode.

> With Cntrl D input the script goes on, but I want to call it from HTML.

that's what you do to end the input in offline mode.  (is it ^D even
for NT?)

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: Wed, 06 Jan 1999 17:17:24 -0500
From: comdog@smithrenaud.com (brian d foy)
Subject: Re: Checking for a Charictor in a Variable
Message-Id: <comdog-ya02408000R0601991717240001@news.panix.com>

In article <MPG.10fd76689c92ddb59898f8@nntp.hpl.hp.com>, lr@hpl.hp.com (Larry Rosler) posted:

> In article <comdog-ya02408000R0601991554410001@news.panix.com> on Wed, 
> 06 Jan 1999 15:54:41 -0500, brian d foy <comdog@computerdog.com> says...

> > index($_, '@') > 0
> 
> To be semantically equivalent to the other two ways, this should be
> 
>   index($_, '@') >= 0

i think i meant

   index($_, '@') > -1

but that's what i get for trying to post and rush out to lunch
at the same time :)

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: 6 Jan 1999 23:00:57 GMT
From: Barticus@att.spam.net (Randall Bart)
Subject: Re: comp/comp3 numbers in Perl or maybe C
Message-Id: <3693e06a.17256006@netnews>

'Twas Wed, 6 Jan 1999 11:57:38 -0600, when "William M. Klein"
<wmklein@nospam.netcom.com> illuminated comp.lang.cobol thusly:

>Please notice the original reference to "DB2" which makes the assumption
>that the "mainframe" is an "IBM mainframe" fairly safe.

Probable, but not guaranteed.  Having read every employment ad containing
the word "Unisys" posted to the internet in the past month, I know there
are some people who say "DB2" meaning DMS II.  One ad also asked for
"Com's CICS" on a "Mainframe Series A".

-- 
R B |\  Randall Bart
a a |/  mailto:Barticus@usa.spam.net      mailto:Barticus@att.spam.net
n r |\  1-310-542-6013      Please reply without spam       I Love You
d t ||\ Greatest Unisys A Series Programmer Available is Now Available
a    |/                 http://members.aol.com/PanicYr00/RBResume.html
l    |\ The Year 2000 Bugs:           http://members.aol.com/PanicYr00
l    |/ MS^7=6/28/107   http://members.aol.com/PanicYr00/Sequence.html


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

Date: Wed, 06 Jan 1999 17:18:09 -0500
From: comdog@smithrenaud.com (brian d foy)
Subject: Re: Dynamic gifs on the fly
Message-Id: <comdog-ya02408000R0601991718090001@news.panix.com>

In article <36938BCE.6D5741FC@yahoo.com>, Leonord Wertzberger <chaimwerz@yahoo.com> posted:

> Hi thanks for your reply!
> Can you please direct me to the question topic where this was discussed - I am still very new to
> perl. Also what does DejaNews mean and where can I find it?

<URL:http://www.dejanews.com>

-- 
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>


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

Date: Wed, 06 Jan 1999 23:06:51 +0100
From: Peter Strickler <iup.strickler@swissonline.ch>
Subject: Re: Embedding PERL in C & also C in PERL
Message-Id: <3693DE7B.83C92795@swissonline.ch>

The problem seems to get really bad when you have more complex C include
files which themselves again have #include statements... (See man perlxstut
towards the end)
Is there anybody with experience on what you can do in such a case?

I'd be greatly interested!

Regards,

Peter

Edwin Litterst wrote:

> >Embedding PERL in C and vice-versa seem interesting. Can anyone suggest
> >where I can find some introduction to it - some sort of a book......
>
> The man pages are the best source for this.
>
> BTW, does anyone have experience with perl calling c, where the c
> module is calling perl again?
> I always had problems because it seemed that there was only one perl
> interpreter used and data was mixed.
>
> Eddie



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

Date: Wed, 06 Jan 1999 17:30:21 -0500
From: Jeff Cieslak <jcieslak@inez.gsfc.nasa.gov>
Subject: filename from a filehandle
Message-Id: <3693E3FD.5771FE15@inez.gsfc.nasa.gov>

Is there an easy way to get the filename that is associated with some (currently
open) filehandle? I can get the device and inode numbers from the 'stat'
function, but I suppose I'm not brainy enough to figure out how (or if) that can
be mapped back to an actual filename.

I have a child process that uses a filehandle opened by the parent, so there's
no "easy" way for me to do this. Is there any way at all?

TIA

-jeff


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

Date: Wed, 06 Jan 1999 23:00:24 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: filename from a filehandle
Message-Id: <cWRk2.98$5P1.3093@nsw.nnrp.telstra.net>

In article <3693E3FD.5771FE15@inez.gsfc.nasa.gov>,
	Jeff Cieslak <jcieslak@inez.gsfc.nasa.gov> writes:

> Is there an easy way to get the filename that is associated with
> some (currently open) filehandle? I can get the device and inode
> numbers from the 'stat'

No. There is no way at all. In fact, an open file does not have to
have a file name at all anymore. It is perfectly legal to open a file
for writing, unlink the file name, and then use the open file handle.
Of course, when your program exits, or you close the file, the OS
will have no reference to that file's inode anymore, and will
clean it up.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | The gene pool could use a little
Commercial Dynamics Pty. Ltd.       | chlorine.
NSW, Australia                      | 


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

Date: 05 Jan 1999 00:00:00 +0000
From: j.poehlmann@link-n.cl.sub.de (Johannes Poehlmann)
Subject: Re: fork under Win32 -- Activestate!?
Message-Id: <78GV$-5oUkB@link-n-j.poehlmann.link-n.cl.sub.de>

richardb (Richard Bateman)  wrote re:fork under Win32 -- Activestate!?:

> I seem to have run into a brick wall as far
> as spawning child processes to process the requests.

> Does anybody know a way to work
> around the missing "fork" function in WindowsNT?

NT uses a different concept of Child processes.
The call is named Win32::Process::Create or so.
Processes under Windows are expensive i.e. need
a lot of resources. They do in effect a fork() - exec()
in one call and so are incompatible with the concept
of fork().

If you use them, your script will never work on a UNIX box.

You could use a port called cgywin or so, wich tries to
support as much UNIX behaviour on UNIX as possible. Maybe
the are able to do a fork.






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

Date: Wed, 06 Jan 1999 14:35:13 -0800
From: Dale Sutcliffe <dales@enhanced-performance.com>
Subject: Help - cookies; check if a browser is set to accept cookies
Message-Id: <3693E521.31BC7B2E@enhanced-performance.com>

How do I check if a browser is set to accept cookies?



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

Date: Wed, 06 Jan 1999 23:03:15 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Help - cookies; check if a browser is set to accept cookies
Message-Id: <TYRk2.100$5P1.3093@nsw.nnrp.telstra.net>

[removed alt.perl from Newsgroups line. I wish the news admins would
get it into their head that perl does not belong in the alt hierarchy,
and jointly decide to shoot the person who first put it there]

In article <3693E521.31BC7B2E@enhanced-performance.com>,
	Dale Sutcliffe <dales@enhanced-performance.com> writes:
> How do I check if a browser is set to accept cookies?

You go to a newsgroup that talks about web browsers (which is what I
suspect you are talking about) and you ask there. This group talks
about perl and about the future of growing citrus trees in northern
Africa.

Try one of the comp.infosystems.www.* groups.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Unix is user friendly. It's just
Commercial Dynamics Pty. Ltd.       | selective about its friends.
NSW, Australia                      | 


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

Date: Wed, 06 Jan 1999 15:08:11 -0800
From: Dale Sutcliffe <dales@enhanced-performance.com>
Subject: Re: Help - cookies; ignore
Message-Id: <3693ECDB.E5CBF4F4@enhanced-performance.com>

Nevermind.

Dale Sutcliffe wrote:

> How do I check if a browser is set to accept cookies?



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

Date: Wed, 06 Jan 1999 14:44:09 -0800
From: Brian Craft <bcboy@cisco.com>
Subject: how to get B57600, etc, with POSIX.pm
Message-Id: <3693E739.E4BA39E6@cisco.com>

Can someone tell me how to make use of the baud rate extensions in
termbits.ph? (B57600, CBAUDEX, etc). POSIX.pm doesn't export them (????)
& I haven't found another way of getting to them (short of cut-and-paste
into my script). Trying to "require" the file, etc, generates dozens of
errors.

b.c.



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

Date: 6 Jan 1999 14:22:11 -0800
From: syran@best.com (Jim Matzdorff)
Subject: Iternation of a loop, and why the hell doesn't this work?
Message-Id: <770nmj$66a$1@shell18.ba.best.com>

Ok, first question -- does PERL keep a value for the number of times it
has been iterated in a foreach loop (simliar to the $. for files)?  I
can't seem to find any mention of it...
Mostly, I mean:

foreach (@array)
{
	print (iteration of this loop)
}

And second, the way I understand using indirect (i don't know that's the
proper word) reference to variables is that the following should work:

$wash="hi";
$wash_array[0]="wash";
print "$wash\n";
print "$wash_array[0]\n";
print "$$wash_array[0]\n";

perl -w thatfile.pl
hi
wash
hi

But.... I get...
hi
wash
Use of uninitialized value at thatfile.pl line 5.

HOWEVER... setting "$wash_array[0]" to just "$wash_value" (ie, take away
the array) it works just fine.

So... can you not use the form of variable addressing in arrays?

Thanks (THANKS!) in advance,
--jim


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

Date: Wed, 06 Jan 1999 22:58:16 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Iternation of a loop, and why the hell doesn't this work?
Message-Id: <cURk2.97$5P1.3093@nsw.nnrp.telstra.net>

In article <770nmj$66a$1@shell18.ba.best.com>,
	syran@best.com (Jim Matzdorff) writes:
> Ok, first question -- does PERL keep a value for the number of times it
> has been iterated in a foreach loop (simliar to the $. for files)?  I

Not that I know of, but you can easily do that yourself:

my $i = 0;
> foreach (@array)
> {
	$i++;
> 	print (iteration of this loop)
> }

> And second, the way I understand using indirect (i don't know that's the
> proper word) reference to variables is that the following should work:
> 
> $wash="hi";
> $wash_array[0]="wash";
> print "$wash\n";
> print "$wash_array[0]\n";
> print "$$wash_array[0]\n";

First of all, this won't work under use strict, but that's beside the issue.

Try:

print "${$wash_array[0]}\n";

The perlref documentation talks about this (as symbolic references).

# perldoc perlref

> HOWEVER... setting "$wash_array[0]" to just "$wash_value" (ie, take away
> the array) it works just fine.

Of course.

> So... can you not use the form of variable addressing in arrays?

yes you can. You just need to make sure perl sees the right thing as
the symbolic reference. I would not advocate the widespread use of
this though. It quickly leads to unmaintainable code. Using a hash, or
hard references most of the time gets rid of the need for symbolic
references all together.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | You can't have everything, where would
Commercial Dynamics Pty. Ltd.       | you put it?
NSW, Australia                      | 


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

Date: Wed, 06 Jan 1999 16:26:21 -0700
From: Arne Jamtgaard <arnej@fc.hp.com>
Subject: Re: Iternation of a loop, and why the hell doesn't this work?
Message-Id: <3693F11D.2C02@fc.hp.com>

Jim Matzdorff wrote:

> And second, the way I understand using indirect (i don't know 
> that's the proper word) reference to variables is that the 
> following should work:

> $wash="hi";
> $wash_array[0]="wash";
> print "$wash\n";
> print "$wash_array[0]\n";
> print "$$wash_array[0]\n";

> perl -w thatfile.pl
> hi
> wash
> hi

> But.... I get...
> hi
> wash
> Use of uninitialized value at thatfile.pl line 5.

> So... can you not use the form of variable addressing in arrays?

You can.  It's just that the perl parser is having a little trouble 
figuring out the name of your array, so you have to give it a little 
help.

It sees you trying to print the value of $[0] (I think), since 
$wash_array has no value.

Try:

print "${$wash_array[0]}\n";

By adding the curly braces, you tell the parser to eval 
"$wash_array[0]" first, then use that value for the 
indirection.

I tried this with perl5 and it worked just fine.

Arne


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

Date: Wed, 06 Jan 1999 16:04:22 -0800
From: TRG Software <chatmaster@c-zone.net>
Subject: Re: JOB-CA Application Engineers
Message-Id: <3693FA06.B8B44E51@c-zone.net>

johnspot@hotmail.com wrote:
> 
> Responsible for paid design and implementation of high profile knowledge
> distribution applications for major customers such as Goldman Sachs,
> Cisco, AT&T, Carlson Travel, and RiteAid.

Yeah, and that's why you're posting to this NG from HotMail. :-)
-- 
Regards,
Tim Greer - chatmaster@c-zone.net
TRG Software and The Link Worm
http://www.linkworm.com
The Chat Base
http://www.chatbase.com
------------------------------------------------------------
* Creator of Paradise Chat, Chat Central & Spiral Chat
* Receiving over 250,000+ hits a day from users Worldwide!!!
* Sales of custom chat server scripts * CGI/Perl scripting
* Script trouble shooting/security * Modify & debug scripts
* Freelance Perl Scripting for any purpose or application


       Copyright ) 1999 TRG Software and The Link Worm.


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

Date: 6 Jan 1999 23:13:35 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: looking for perl programmer
Message-Id: <770qmv$nvt$1@marina.cinenet.net>

David H. Adler (dha@panix.com) wrote:
: On 05 Jan 1999 23:20:28 -0500, Uri Guttman <uri@home.sysarch.com> wrote:
: >>>>>> "DG" == Daniel Grisinger <dgris@moiraine.dimensional.com> writes:
: >  DG> Ack!  You're right.  I was thinking 4.5Mb/s for some reason.
: >
: >  DG> I will now write `I will think while I type' 2<<31 times as
: >  DG> punishment.  :-)
: >
: >i hate to burst your hairshirt bubble, but 2<<31 in perl is 0!
: >
: >1030 > perl -le '$i = 2<<31 ; print $i'
: >0
: 
: Sounds to me like the man knows *exactly* what he's saying...

No, because he'd already written it >0 times as part of the commitment.
If he'd promised to write it "at least 2<<31" times, that'd be different.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "The hills were burning, and the wind was raging; and the
       clock struck midnight in the Garden of Allah."


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

Date: Wed, 06 Jan 1999 21:46:19 GMT
From: frogsmock@my-dejanews.com
Subject: mod_perl/images problem
Message-Id: <770lja$8v8$1@nnrp1.dejanews.com>

Folks,

I am having a problem getting images to load in my mod_perl-generated web
pages . . . At first I thought it was Apache, and I had posted this to
comp.infosystems.www.servers.unix:

-------
I am having a problem getting Apache to serve up images (I'm running Apache
1.3.3 on RedHat Linux 5.1 w/ mod_perl installed). When I try to call up a page
in Navigator that includes images, they fail to load. Apache reports the
following in error_log (my image is "lm.gif"):

lm.gif: Unrecognized character \030 at /web/docs/lm.gif line 1.

However, the GIF loads fine in the GIMP, so I don't think the image itself is
the problem.  Any ideas?
-------

I received a reply, "I don't think that's an Apache error. My guess is you
have accidentally configured your server to execute the file."	While this
may be true, I'm afraid I'm still at a loss.  Does anyone recoginize this
problem, or know how I can tweak my setup to load GIFs or JPGs properly?

Thanks!

Jim

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 06 Jan 1999 17:07:40 -0500
From: Zack <zack44@altavista.net>
Subject: Re: Nasty regexp .... help!
Message-Id: <3693DEAC.488B3F0B@altavista.net>

Brian,


> > ie:  a search on "int??net" should match both internet and intranet
> 
> are you sure? perhaps you meant
> 
>    /int..net/
> 

I realize the ? problem on the backend, but I can't expect users to know from filling in a form that "." means match the character.  I figure on substituting ? for . in the program before the search takes place.  

I'm just not sure on the proper syntax for handling all possibilities of user input.

Z-


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

Date: Wed, 06 Jan 1999 22:00:53 GMT
From: jdennis@alldata.net
Subject: Re: Need CGI database
Message-Id: <770mek$9rp$1@nnrp1.dejanews.com>

In article <770gjb$4ar$1@nnrp1.dejanews.com>,
  philipbrown@my-dejanews.com wrote:
>     Does anyone know where I can download a database which
> will allow people to upload their names, addresses, phone
> numbers, etc to a web site and also allow them to view
> the names, addresses, etc of other people who also uploaded
> this information?  It can use CGI for the server side.
>
>                                                    Philip


Philip

Try www.gossamer-threads.com - they have a database named DBMAN which sounds
like it will accomplish your goals.

Jamie


-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 6 Jan 1999 22:31:50 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: Need hints on how to use MakeMaker
Message-Id: <slrn797pkj.br0.randy@theory.uwinnipeg.ca>

On Wed, 6 Jan 1999 16:18:18 -0500, 
	David Coppit <dwc3q@mamba.cs.virginia.edu> wrote:
>
>I'm pretty sure I want to use MakeMaker for this:
>- I want to distribute a script which uses some of my own modules, as well
>as several other non-standard Perl ones.
>- I want to make sure all the modules are installed correctly. (URI in
>particular, since URI-URL isn't supported by my code and causes
>"strange" errors for the users.)
>- I suppose I ought to do a manifest, and a test or two. :)
>
>MakeMaker seems aimed at modules, not scripts. Can I follow the "short"
>version of the instructions in the documentation? Is this the way to go to
>do what I want, or is it overkill? An alternative I thought of was to
>write a small script that simply loads the modules and checks their
>VERSION numbers.

Hi,
   One way to go about it is, for each module, or group of
modules, that you want to distribute, do a
	h2xs -X -n module_name
which creates the necessary skeleton files. Edit the appropriate
ones to include the modules in question. Required modules can be
indicated by including a 
	'PREREQ_PM' => { 'MOD1' => 2, 'MOD5' => 3},
in WriteMakefile() in Makefile.PL, indicating that version 2 or 
higher of MOD1 and version 3 or higher of MOD5 are required. 
Having done all this, 'make dist' will create a distribution to
distribute, which users can install in the 
	'perl Makefile.PL; make; make test; make install'
standard sequence.
   For your script, you can either distribute it with one
of your modules, if that seems natural, or else make a separate
distribution for it by following the same procedure as for
modules. For script installation, in the WriteMakefile() call 
in Makefile.PL, add a line in that says
	'EXE_FILES' => [ 'your_script_name' ],
which will install your script in the standard place. Then
proceed as before - in particular, add in any necessary
PREREQ_PM to include required modules.
   I've written a script at
	http://www.perl.com/CPAN/authors/id/R/RK/RKOBES/sdist
which, like h2xs, will generate the skeleton files for a
distribution, but is tailored for scripts. This script has the 
option to include library files with the distribution, and includes
pod documentation on its use.
-- 
		Best regards,
		Randy Kobes

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


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

Date: 6 Jan 1999 23:20:02 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: noop
Message-Id: <770r32$nvt$2@marina.cinenet.net>

EVILjosh (engineer@noorg.org) wrote:
: Is there any kind of a noop keyword in Perl?

Well, evaluating a side-effect-free expression in void context might
qualify:

  1;  # A no-op for Perl.

Of course, it would help to know what you're actually trying to do -- or
is this just idle curiosity?  NOPs in assembly have important purposes
(loop timing, operand pads, etc.).  In higher-level languages, it's tough
to see the point.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "The hills were burning, and the wind was raging; and the
       clock struck midnight in the Garden of Allah."


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

Date: Wed, 06 Jan 1999 15:20:02 -0800
From: user <user@cisco.com>
Subject: OO Perl Persistence Problem
Message-Id: <3693EFA2.26CC31BD@cisco.com>

Hi All,

I have a problem in retrieving information I stored in 6 Perl Objects.
The objects have a bunch of set and get methods. 

Here's what I am trying to do:
for ($i=0;$i<6;$i++){
	# I instantiate the new object.
	   my $rec = new Record();
	# Invoke method 
	   $rec->setAttribute($data);
	#Store object referance in a Hash
	   $recHash{$i} = $rec;
}

# Retrieving the records
foreach $key (keys %recHash){
	$record = $recHash{$key};
	$val = $record->getAttribute();
}

When I print out the values of recHash I get different memory addresses
but all of them point to the data of the last object - in this case the
sixth one. What am I doing wrong? Can someone point my error?

I am using Perl 5.004 on a solaris box.

Thanks,
Jai.


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

Date: Wed, 6 Jan 1999 17:05:47 -0600 
From: Phil Mein <pmein@johnco.cc.ks.us>
Subject: ORACLE DBD compile error
Message-Id: <F44364C301FCD111906F00805FEAAFAA06F147F8@news.jccc.net>

any ideas on what might be causing this?
AIX v4.3.1
Oracle v8.0.4
Perl v5.x
DBI v1.03
DBD v.59


cc -c -I/oracle/v8040/rdbms/demo -I/oracle/v8040/rdbms/public
-I/oracle/v8040/plsql/public -I/oracle/v8040/network/public
-I/oracle/v8040/rdbms/demo -I/oracle/v8040/rdbms/demo
-I/usr/local/lib/perl5/site_perl/5.005/aix/auto/DBI -D_ALL_SOURCE
-D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192 -I/usr/local/include -O
-DVERSION=\"0.59\"  -DXS_VERSION=\"0.59\"
-I/usr/local/lib/perl5/5.00502/aix/CORE  Oracle.c
"Oracle.xsi", line 54.5: 1506-276 (S) Syntax error: possible missing
':'?
"Oracle.xsi", line 298.9: 1506-045 (S) Undeclared identifier imp.
make: 1254-004 The error code from the last command is 1.

environment:
LANG=C
LC_MESSAGES=en_US
LC__FASTMSG=true
LD_LIBRARY_PATH=/oracle/v8040/lib:/usr/include/Motif1.2
LOCPATH=/usr/lib/nls/loc
LOGIN=root
LOGNAME=root
MAIL=/usr/spool/mail/root
MAILMSG='[YOU HAVE NEW MAIL]'
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/en_US/%N:/usr/lib/nls/ms
g/%L/%N.cat:/usr/lib/nls/msg/en_US/%N.cat
ODMDIR=/etc/objrepos
ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/v8040
ORACLE_SID=PROD
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/etc:/usr/sbin:
/usr/lib:/usr/local/bin:/oracle/v8040/bin:/oracle/v8040/lib
PWD=/public/latest_tar/DBD-Oracle-0.59
SHELL=/bin/ksh
TERM=vt100
TZ=CST6CDT





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

Date: Wed, 06 Jan 1999 22:44:14 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl Criticism
Message-Id: <2HRk2.93$5P1.3093@nsw.nnrp.telstra.net>

In article <770b22$uq6$1@nnrp1.dejanews.com>,
	topmind@technologist.com writes:
> Subject: Perl Criticism
> 
> Perl gets a lot of credit for its powerful features. However, there are also
> some major annoyances about it that prevent more widespread and formal
> acceptance. Some say that "fixing" these would dilute its power, but I do not
> fully agree with this. I have put together an evaluation of different language
> features that I think could be used to build a "safer Perl":
> 
> http://www.geocities.com/SiliconValley/Lab/6888/langopts.htm

You have obviously no real idea about where Perl came from, how it
developed, and most importantly, how it works. I suggest you get some
real acquaintance with it before attempting to write about it.

Some of your statements about Perl are inaccurate, some incorrect, and
some blatant lies.

There is more misinformation and incorrectness in that article,
besides the perl statements, but that's offtopic, and irrelevant.
You also seem to make a distinction between programming languages and
scripting languages where there is none.

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | Inside every anarchy lurks an old boy
Commercial Dynamics Pty. Ltd.       | network - Mitchell Kapor
NSW, Australia                      | 


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

Date: 6 Jan 1999 23:48:09 GMT
From: dformosa@zeta.org.au (David Formosa (aka ? the Platypus))
Subject: Re: Perl Criticism
Message-Id: <slrn797thn.5pg.dformosa@godzilla.zeta.org.au>

In article <770b22$uq6$1@nnrp1.dejanews.com>, topmind@technologist.com wrote:

>Perl gets a lot of credit for its powerful features. However, there are also
>some major annoyances about it that prevent more widespread and formal
>acceptance.

Ok the first stament you make in your peace is clearly wrong.

]Most of the popular scripting languages were built with poor research
]or debate about why one approach is "better" than another. The
]author(s) of the scripting languages simply built upon something they
]were already familiar with.

Perl is based on a greate meany languges, its a polyglot of most of
computer scince.  Indeed perl is the way that it is because Mr Wall
beleaved given the options it was the best was to go.

Indeed your desige critor are very diffrent to perls,  Perl wasn't
created to be easy to learn, it was resoned that given that a languge
is used for a lot longer then the learning period features that are
hard to learn but powerfull where considered more usefull then fatures
that where safe for new users but tight ropes for advanced ones.

Perl is basicly the embodyment of the unix philophy of "Don't stop
people from doing stupid things because you might stop someone from
doing something cleaver."

[...]

>A summary of Perl's bigger problem areas are:
>
>- Unnecessary deviations from the "function rule".

This seems to reflext less some sort of rule and more a fondness for
prefix notation.  I don't think that prefix is neccerly more readable
nor beter then infix (though I will concead that postfix is a real
pia).  Calling this a "rule" is enshiring what is basicly an issue of
taste.

On the issue of Option selectors, my view is this is very close to
perls notorious "$[" verable, which allows you to select if you are
starting your arrays from 0 or 1.  It will drive me nuts if I have to
check every time weather or not the compuler for this code is in line
orented or semicolen oriented mode.

>- Parameter and variable scope handling

Your use of the word "inherentence" is quite odd in this context, most
people would have used global verables or dynamic binding.  Perl
offers lexicaly scoped varablies threw the "my" keyword.

>- "Leaky" assignment statements

In fact everything in perl leeks, indeed assignment stamets can even
be RValuse wich allows us to do things like.

($old = $set) =$new;

>- Inter- and intra- statement communication problems (including excessive use
>of "command piping")
>
>I invite you to look at my criticisms and comment on them, or even pound them
>into the ground if you are having a bad hair day :-)

Your stament "We enough well-chosen string and
parsing functions, the power of Perl can be approached without
sacrificing readability." is not quite correct, the number of
functions neccery is quite large.  Regexps are a way of creating a
parser for such constructs.



-- 
Please excuse my spelling as I suffer from agraphia. See
http://www.zeta.org.au/~dformosa/Spelling.html to find out more.
How to win arguments on usenet http://www.zeta.org.au/~dformosa/usenet.html



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

Date: Wed, 06 Jan 1999 22:37:01 GMT
From: ehpoole@ingress.com (Ethan H. Poole)
Subject: Re: psswrd protect
Message-Id: <hARk2.219$n66.1446@news13.ispnews.com>

In article <76vbtm$2t3$1@nnrp1.dejanews.com>, dave@mag-sol.com says...
>
>In article <01be38eb$62340940$2951d2cc@yoda>,
>  "Tuppers" <ktupper1@maine.rr.com> wrote:
>> I need a script to password protect a directory for my web site. It needs
>> to be fairly reliable but easy to configure.
>
>This question would be better asked in the newsgroup that deals with your
>specific web server as it has nothing to do with Perl.

It would also be appropriate for a CGI newsgroup as there are non-server 
specific methods of password protecting a directory, they just are not as 
efficient as server-based authentication.

-- 
Ethan H. Poole              | Website Design and Hosting,
                            | CGI Programming (Perl & C)..
========Personal=========== | ============================
* ehpoole @ ingress . com * | --Interact2Day, Inc.--
                            | http://www.interact2day.com/



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

Date: Wed, 06 Jan 1999 12:58:53 -0600
From: Anandan Balaji <anandan_balaji@mentorg.com>
Subject: recursive directory copy perl module
Message-Id: <3693B26D.71489239@mentorg.com>

Hi,

I a looking for perl module, which can do recursive directory copy and
should
work in both platforms ( interoperable ), unix and NT.
Pls. provide me the pointer/links to get the same, if already one
exists.

Thanks in advance,
-Balaji




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

Date: Wed, 06 Jan 1999 12:59:13 -0600
From: Anandan Balaji <anandan_balaji@mentorg.com>
Subject: recursive directory copy perl module
Message-Id: <3693B281.EB1DB1B@mentorg.com>

Hi,

I a looking for perl module, which can do recursive directory copy and
should
work in both platforms ( interoperable ), unix and NT.
Pls. provide me the pointer/links to get the same, if already one
exists.

Thanks in advance,
-Balaji




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

Date: Wed, 06 Jan 1999 13:10:01 -0600
From: Anandan Balaji <anandan_balaji@mentorg.com>
Subject: recursive directory copy perl module
Message-Id: <3693B509.D775022D@mentorg.com>

Hi,

I a looking for perl module, which can do recursive directory copy and
should
work in both platforms ( interoperable ), unix and NT.
Pls. provide me the pointer/links to get the same, if already one
exists.

Thanks in advance,
-Balaji




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

Date: Wed, 06 Jan 1999 13:12:20 -0600
From: Anandan Balaji <anandan_balaji@mentorg.com>
Subject: recursive directory copy perl module
Message-Id: <3693B594.BF287C38@mentorg.com>

Hi,

I a looking for perl module, which can do recursive directory copy and
should
work in both platforms ( interoperable ), unix and NT.
Pls. provide me the pointer/links to get the same, if already one
exists.

Thanks in advance,
-Balaji




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

Date: Wed, 06 Jan 1999 22:46:28 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: recursive directory copy perl module
Message-Id: <8JRk2.95$5P1.3093@nsw.nnrp.telstra.net>

In article <3693B509.D775022D@mentorg.com>,
	Anandan Balaji <anandan_balaji@mentorg.com> writes:

> I a looking for perl module, which can do recursive directory copy
> and should work in both platforms ( interoperable ), unix and NT.

There was no need to post this three times.

Use the modules provided with perl

# perldoc File::Find
# perldoc File::Copy

Also look at the functions

# perldoc -f mkdir
# perldoc -f stat
# perldoc perlfunc 
(find the -X test operators)

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I took an IQ test and the results were
Commercial Dynamics Pty. Ltd.       | negative.
NSW, Australia                      | 


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

Date: Wed, 06 Jan 1999 23:11:18 +0100
From: Peter Strickler <iup.strickler@swissonline.ch>
Subject: Re: Writing Perl with Notepad <shameluss plug>
Message-Id: <3693DF86.A8BA7A84@swissonline.ch>

Try Textpad  -> http://www.textpad.com

Works really fine even if you're connected to a Unix box via Samba and edit Unix
files...

P.

jamesht wrote:

> Hello,
>
> UltraEdit is fine, but it's got a couple terrible bugs. Ever notice that the
> scrolling goes haywire when you open a very large file? Also, when you paste a lot
> of text into it.
>
> And the text-coloring is a nice feature, but it goes nuts with large javascripts.
>
> I've also seen it crash due to unexplained non-ascii chars.
>
> These are not really big problems, but they're there.
>
> I've tried emacs, but holy christmas, yes, there's a learning curve! -- one of
> these days...
>
> James



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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

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

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

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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


------------------------------
End of Perl-Users Digest V8 Issue 4566
**************************************

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