[13866] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1276 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 4 09:05:26 1999

Date: Thu, 4 Nov 1999 06:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <941724310-v9-i1276@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 4 Nov 1999     Volume: 9 Number: 1276

Today's topics:
        ANSWER: Perl's equiv of VB := for COM calls (Kragen Sitaker)
    Re: Book suggestions (Scott McMahan)
    Re: comparing text with words (Bart Lateur)
    Re: duplicates in an array (Ken Bandes)
    Re: duplicates in an array (Abigail)
    Re: Flock functionality (Bart Lateur)
        How can I connect a net unit? <jiglesia@tra.gva.es>
    Re: Lost in Splitting....... <wyzelli@yahoo.com>
    Re: making a variable length string <sjs@yorku.ca>
    Re: Perl and commonsense part 2 ajmayo@my-deja.com
    Re: proposed "??" operator causing ambiguous syntax (Abigail)
    Re: proposed "??" operator causing ambiguous syntax (Abigail)
    Re: replace " " with &nbsp; (Lack Mr G M)
    Re: Running perl on NT <jdijkmei@dds.nl>
        using Digest-MD5-2.09 on free website <fschan@hotpop.com>
    Re: Web Site Development (PROs ONLY PLEASE) (Michel Dalle)
    Re: Web Site Development (PROs ONLY PLEASE) <latsharj@my-deja.com>
    Re: Year 2000 date problem <wyzelli@yahoo.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Thu, 04 Nov 1999 14:01:52 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: ANSWER: Perl's equiv of VB := for COM calls
Message-Id: <klgU3.26986$23.1447705@typ11.nn.bcandid.com>

Someone asked yesterday about how to do named COM parameters from Perl.

From Scott McMahan's book:
	It is possible to use named parameters to Automation method calls in
	Perl, as you would in Visual Basic using the `:= operator'.  The 
	`Win32::OLE' module says: ``Named parameters can be specified in a
	reference to a hash as the last parameter to a method call.''

So you can do $xx->method({name1 => val1, name2 => val2, name3 => val3});

-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Tue Nov 02 1999
6 days until the Internet stock bubble bursts on Monday, 1999-11-08.
<URL:http://www.pobox.com/~kragen/bubble.html>


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

Date: Thu, 04 Nov 1999 13:43:48 GMT
From: scott@aravis.softbase.com (Scott McMahan)
Subject: Re: Book suggestions
Message-Id: <o4gU3.2242$7m.105398@newshog.newsread.com>

Joel Berger (joel_berger@manulife.com) wrote:
> Suggestions for a good book for a newbie?

If you ask, I'll obviously recommend my own ;)

If it's too advanced for you, I have a detailed bibliograpy.

Scott

http://autoperl.skwc.com Automating Windows With Perl



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

Date: Thu, 04 Nov 1999 11:51:49 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: comparing text with words
Message-Id: <382269f3.2149160@news.skynet.be>

Larry Rosler wrote:

>In the other direction, how about Perl having two different functions, 
>each named 'select'?

And neither is doing what people comming from (Visual) Basic would
expect...

-- 
	Bart.


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

Date: Thu, 04 Nov 1999 11:51:25 GMT
From: kbandes@home.com (Ken Bandes)
Subject: Re: duplicates in an array
Message-Id: <8E7443141kbandeshomecom@192.168.123.1>

sumengen@iplab.ece.ucsb.edu (Baris Sumengen) wrote in 
<7vrn88$5cc@yuggoth.ucsb.edu>:
>Do you know an easy way to remove duplicates from an array.(If multiple
>entries are identicle just keep one copy of it).

This is a FAQ.  For lots of good answers, try
perldoc -q unique

Ken Bandes


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

Date: 4 Nov 1999 06:47:59 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: duplicates in an array
Message-Id: <slrn8230av.dk.abigail@alexandra.delanet.com>

Baris Sumengen (sumengen@iplab.ece.ucsb.edu) wrote on MMCCLVI September
MCMXCIII in <URL:news:7vrn88$5cc@yuggoth.ucsb.edu>:
** Hi,
** Do you know an easy way to remove duplicates from an array.(If multiple
** entries are identicle just keep one copy of it).



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

    use strict;

    my @i = map {($_) x (2 + rand 2)} 'a' .. 'z';

    foreach my $j (reverse 1 .. $#i) {
        my $t = int rand (1 + $j);
        @i [$t, $j] = @i [$j, $t]; } {
        my @s = sort @i;
        my $q;
        my $i;
        for ($i = 1; $i <= $#s; $i ++) {
            if ($s [$i] eq $s [$i - 1]) {$q = $s [$i]} }
            last unless defined $q;
            my $z = 0;
            my @r = ();
            for ($i = 0; $i <= $#i; $i ++) {
            push @r => $i [$i] if $i [$i] ne $q || $z ++;
        }
        @i = @r;
        redo;
    }

    print "@i\n";


    __END__
    n g o q r p j u b w d v z s m x l f c a e y i k h t
-- 
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
         / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / 
         % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
         BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'


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


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

Date: Thu, 04 Nov 1999 11:51:16 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Flock functionality
Message-Id: <38236fdb.3661245@news.skynet.be>

E. Preble wrote:

>I have a general question about the flock command. When one
>script opens a file, and flocks it, what actually happens
>when another script tries to get at the file?  Does it wait
>for the file to be unflocked, or does it simply fail?

It could be either. It depends on whether you added the LOCK_NB
(non-block) flag to the flock flags. If it is there, the flock() will
simply fail if it can't lock, but if it wasn't present, it will wait,
AND lock.

>Is there a way to control this behavior and protect against
>the second script failing by having it retry the file after
>a wait period, or is this a bad idea (could lead to infinite
>looping)?

It could. You may limit the flock wait time by looping only a limited
amount of time, or by using alarm() on a blocking flock, I should think.

>Suggestions on "good programming techniques" and "flames for
>stupidity" will be read with enthusiasm.

I suggest you do a "man flock" on your Unix system. Here's an extract:

     Requesting a lock on an object that is already locked normally
     causes the caller to be blocked until the lock may be acquired.
     If LOCK_NB is included in operation, then this will not happen;
     instead the call will fail and the error EWOULDBLOCK will be
     returned.

and:

     The flock() call fails if:

     [EWOULDBLOCK]  The file is locked and the LOCK_NB option was
                    specified.
     [EBADF]        The argument fd is an invalid descriptor.
     [EINVAL]       The argument fd refers to an object other than a
                    file.
     [EOPNOTSUPP]   The argument fd refers to an object that does not
                    support file locking.

-- 
	Bart.


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

Date: Thu, 4 Nov 1999 12:55:15 +0100
From: "Jesús Iglesias" <jiglesia@tra.gva.es>
Subject: How can I connect a net unit?
Message-Id: <7vrs40$9dv$1@pepico.gva.es>

I have a NT server and I wanna do a Perl Script to connect a net unit in a
W95 PC (and keep it connected in next sessions). I imagine it's a simple
instruction, but I can't find the specific answer in the Web .

I'd also be very grateful if anyone could send me any Web Site with
networking subjects in Perl.

Thanks.




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

Date: Thu, 4 Nov 1999 22:37:48 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Lost in Splitting.......
Message-Id: <EyfU3.11$Go3.1190@vic.nntp.telstra.net>

Matt King <mattking@techie.com> wrote in message
news:7vrort$71c$1@news.uk.ibm.com...
> I have a question that will sound  real basic for you pro's. I'm trying to
> read in a files contence and display it in a table. First off the script
> needs to creat the table 'headder' based on the first line of the plain
text
> file. The first line looks like this:
>  ITEM 1/1   ITEM 2/2           DESCRIPTION
> This is not tab delmitated and the file has some 60000 lines in it so
> changing the format would be just to much work. I'm trying to read in and
> split the above like this:
> ...
>   foreach $line(@LINES) {
>   ($item1,$item2,$item3) = ($line =~  m{
>                  \s*
>                 (\S*(\s*)\S*)\s*
>                 (\S*(\s*)\S*)\s*
>                 (.*)\s*}x);
> ...
>
> Then I print the output to make sure I got what I want with this (for now,
> later in a table format):
> print "($item1)($item2)($item3)\n";
>
> The output looks like this:
> (ITEM 1/1)()( ITEM)
>
> What is wrong with this split? I have been trying different 'formats', but
I
> can't find the one that will give me the output that looks like this,
which
> is the one I need:
> (ITEM 1/1)(ITEM 2/2)(DESCRIPTION)
>
> Can someone please point out where my eror is and what I need to change to
> make this work. Note there there is a space in the first two items and and
> the third item needs all remaining items even if there is a space.
>
> Thanks for your help.
> Matt
>

From previous experience you may be better off using 'substr' than split.

That will allow you to break apart the string based on character position
(ie everything from 0 -8 becomes var1, 10 to 17 becomes var2 and the
everything from 18 to end of string becomes var3).

Check the documentation on substr function.

Wyzelli




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

Date: 01 Nov 1999 23:13:37 -0500
From: Steven Smolinski <sjs@yorku.ca>
Subject: Re: making a variable length string
Message-Id: <m3vh7lwmx9.fsf@hank.yorku.ca>

syran@best.com (Jim Matzdorff) writes:

> I have a string that can be any length, but the entire string must be
> composed (initially) of 0's.  Thereafter, I need to prepend this string
> with 1-5 '1'es, depending on yet another variable, padding the end with 
> 0's.  Err, perhaps an example is a better illustration

It's not particularly pretty, but it works.  Robustness left as an 
excercise to someone who knows the requirements better:

---------------8<-------------------------
#!/usr/bin/perl -w
use strict;

die "need 2 args!\n" unless $#ARGV == 1;

# two args must be: 0: number of 0's to put on the right of the string
#                   1: number between 0 and 5 of 1's to put on the left

print '1' x $ARGV[1], '0' x ( $ARGV[0] - $ARGV[1] + 5 ), "\n";
---------------8<-------------------------

Please feel free to cut it up, so long as I see the criticism.

Steve


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

Date: Thu, 04 Nov 1999 13:31:43 GMT
From: ajmayo@my-deja.com
Subject: Re: Perl and commonsense part 2
Message-Id: <7vs1s0$mmk$1@nnrp1.deja.com>

In article <7vphkm$tap$1@nnrp1.deja.com>,
  ajmayo@my-deja.com wrote:
[a bunch of stuff which elicited some interesting replies]

I have read through all the replies to my two posts. The second post,
which I probably should have appended to the original thread -
apologies - attracted the most direct comments, but I can summarise a
good deal of the responses like this

QUOTE

You are a 'cut and paste' programmer. You should take the time to learn
perl properly before shooting your mouth off.

UNQUOTE

Some other contributors were kinder. They acknowledged that, yes, perl
debug messages are somewhat less helpful than they should be,
particularly when using mod_perl, which relies on runtime evaluation of
code. And they indulged in a fascinating discussion on the karma of
lists, which somehow reminded me of philosophers pondering the true
meaning of life.

But no-one seemed to catch the point of what I was trying to say, which
of course is my fault. I *wasn't* saying (or at least, I didn't intend
to say)

"darn perl! I try some half-witted extrapolation on my limited
knowledge and because it doesn't do what I expected, I'm gonna flame
it".

No, that is not what I am saying at all. What I should have said (in
part) was

"my colleagues and I find that what we would regard, rightly or
wrongly, as common-sense extrapolations - i.e this worked, so to do
*this*, I do this similar thing - seem to fail more often in perl than
they do in other languages we use, such as VB,C, Javascript".

Now a lot of contributors here would say - guys, you're just too low on
the bellcurve to grok perl. Why would you expect it to work?. Perl is a
*real* language, the others are just toys.

To understand what I was really trying to accomplish in posting these
comments, I need to step back from perl as a language and explain the
business problem. There is always a business problem. Computers were
invented, not so alpha geek programmers could perfect the most
efficient string comparison algorithms, but to solve real-world
problems.

In this case the real-world problem is this. Everyone wants business
applications that are browser-hosted. This is seen as "a Good Thing" in
senior management circles. Since these folks hold the pursestrings, a
discussion of whether in fact this is a technically superior idea is
moot. The customer is always right and companies don't get rich telling
the customer they are wrong.

So if we are developing browser-hosted applications, we need a client-
side scripting language and a server-side scripting language. Since we
don't want to limit ourselves to Windows NT - I won't get into issues
of whether NT is 'better' than Unix etc - it's not relevant. We just
don't want to build single-platform solutions. So, as I said, if we
want to run on both Netscape and IE browsers, and IIS and Apache
clients, we need to choose suitable languages. Perl and Javascript are
the obvious choices. If we don't want to install extra client-side
software, we'll have to use Javascript on the client. But, however
desirable it may be to use a single language - believe me, the
economies of scale are substantial - the fact is that server-side
Javascript is pretty new, especially in the Open Source community. So
the infrastructure like database access and so on is still being
created.

Why not Java, I hear you say. But Java source must be compiled to JVM p-
code prior to execution. The speed at which this can be done is
currently less than optimal. Since the nature of server-side scripting
is that a good deal of script is generated 'on the fly', performance is
an issue. And Java is quite strongly typed, which is not ideal for
scripting, where data tends to be unknown in format until the moment it
is parsed. Database access, too, is still a little immature.

So this leaves perl as the other server-side programming language. It
sure has all the attributes, on paper. Wide platform support, all the
infrastructure like database access, object-oriented, packages, fairly
fast and reasonably efficient.

Now, when it comes to these two languages, my practical experience has
been this. Javascript, for all its sins, is fairly orthogonal. What I
called 'common-sense extrapolation' works well for Javascript. Some of
you may say this is because the language is so simple (I am not sure I
fully agree with this, as it seems to have surprising depth and
flexibility).

I have not been so successful with perl. The examples I gave may seem
ludicrous to the hardened perl expert. But I think they are perfectly
reasonable extrapolations. I say this because other folks I know have
stumbled in the same ways. Maybe we are all just 'too low in the
bellcurve'.

Someone said 'maybe Javascript is your first language'. In fact, its
probably my tenth. I started developing 24 years ago, so I am a wizened
old man in computer terms. COBOL and FORTRAN, even assembler, are tools
of my trade. I have written 50,000 line C programs and even larger VB
systems. Right now on a daily basis I work in several languages, and I
have to understand HTML, the document object model in IE and Netscape,
how to manage IIS and Apache, and Sybase, Oracle and SQL Server. As a
systems architect I have to go for breadth and *then* come back for
depth.

So I am not ashamed, at times, to be a 'cut and paste programmer' as
someone snidely remarked. I have to produce a solution. If Boyer and
Moore solved the string comparison problem optimally, and Lempel, Ziv
and Welch can come up with an efficient compression algorithm, why
shouldn't I cut and paste their solution?. Its not that I am not
interested in clean and efficient algorithms. Its just that, when
you're working under Internet time, the life of a piece of code, or
even a whole product, can be very ephemeral.

Much has been made of perl's ability to solve 'quick and dirty'
problems. It sure does a good job of this, particularly in the text
processing domain. But trying to create more structured code, with
complex data structures and solid error handling, has proven to be a
bit more elusive. I am quite sure it can be done. You folks are living
proof. But I am growing concerned at the training and support
commitments perl seems to require. Remember, the alpha geeks blaze the
trail. Then lesser mortals come behind them. They must maintain and
modify the code. They don't necessarily know syntax from semantics. I
know this sounds awful. I know you're itching to say

This kind of attitude - this kind of unskilled labour - results in
crappy software. Just look at (insert company here).

I don't deny it. But the problem is, folks, that there aren't enough
alpha geeks to go around. They can't (yet) be bred to meet
requirements. Being a top-notch developer is something you're just born
with, I think. Its like having musical talent. Either you got it, or
you ain't. So the insatiable demand for developers has to be met,
sometimes, with people who can't leap over tall buildings in a single
bound. They sometimes need a bit of a runup, or perhaps the building
better not be too tall.

How do I explain to these folks that assignments in perl are subtle;
that perl sometimes returns things in scalar context and sometimes in
list context - and what the rules are (yes, I know this is explained,
sort of, in the online help). That the peculiar tilde ~ operator (is it
an operator, exactly?) binds a match operation to the lhs (now, let me
remember, was it =~ or ~=)?. That debugging will be a bit painful
because you won't get the context - just a line number and an error
message. That you can't take a reference to a list (why not, by the
way?). And so on.

Subtle and clever languages have always been around, of course. LISP,
Prolog and Smalltalk spring to mind. But its the simple, unsubtle and
unclever languages that have been most popular. COBOL, BASIC and C, for
example. This, I think, is because so many of us just aren't subtle and
clever enough.

I remember getting into C++ via Microsoft's excellent tutorial. Around
page 40 or so, they start getting into building a simple string class.
The discussion goes a bit like this. "you might think this
implementation is complete. But there is a subtle problem..... having
changed this, you might think this implementation is complete. But
there is a subtle problem ....." and so on, until, several iterations
later the 'simple' string class bristles with checks for all the subtle
problems. The thing is, programming is difficult enough without subtle
problems.

Now, I am not the sort of witless fool who tries, fails and then
squawks loudly to everyone that the sky is falling. (I may well be
another sort of witless fool, but this is beside the point).

I *do* read the Perl books. I *do* read the online documentation. I
*do* trawl the newsgroups. But what I can't find is documentation that
is targetted at what makes perl different. My first attempts to learn
perl centred round Larry's original book with, as I recall, the three
wise men travelling across the desert laden with frankincense and
myrrh. Or something like that. It was so insufferably cute that I
couldn't cope with it. Then I tried the O'Reilly reference. It is ok,
as far as it goes. But too much of this stuff assumes you're going to
learn computer programming with perl as your first language. Gather
round, children. Now, when you want the computer to do something more
than once, you use something called a 'loop'... and so on.

Can someone point me at some coherent documentation that brings
together the perl philosophy assuming I am a competent programmer in
other languages (I will make the assumption that I *am*, thanks. They
are still paying me, so I am going to assume my code doesn't stink too
badly).

In particular, documentation absolutely *replete* with examples. Yes,
cut and paste code. Yes, I know.

"go to CPAN. There's a pile of professionally-commented code. Learn
from that".

I would, I really would. But life is just too short. The sun will burn
out. Meanwhile, and this is the crux of the issue, I have little choice
about whether or not to use perl. I pretty much *have* to. This makes
discussions on the orthogonality of perl rather relevant, I think. It
is becoming a very pervasive language. Will it prove to be a good tool
or is it too subtle and clever for its own good, with too many disjoint
features. Occam once said 'never multiply entities unnecessarily'. In
perl, I think the entities are starting to get out of hand. What do you
think?


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


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

Date: 4 Nov 1999 05:51:09 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: proposed "??" operator causing ambiguous syntax
Message-Id: <slrn822t0f.dk.abigail@alexandra.delanet.com>

Tom Phoenix (rootbeer@redcat.com) wrote on MMCCLV September MCMXCIII in
<URL:news:Pine.GSO.4.10.9911031442011.29670-100000@user2.teleport.com>:
__ On Wed, 3 Nov 1999, Bart Lateur wrote:
__ 
__ > 	$x??$pat?-1:1
__ > 
__ > which can be either
__ > 
__ > 	$x ?? ( $pat ? -1 : 1 )
__ > 
__ > or
__ > 
__ > 	$x ? ( ?$pat? - 1 ) : 1
__ 
__ Yes. Still, since you had to search and search to find this one example,
__ there's not much chance that any real-world program will suffer from this
__ ambiguity. Thus, if the _only_ argument against this operator were this
__ weak one, no one should have a problem with it.


In an earlier discussion, shortly after Larry W. suggested ??, I raised
the question `what about programs that might break?'. Larry basically
said that the amount of programs that would break was sufficiently small
he didn't care.


He never indicated whether he was in favour of, or against introduction
of the ?? operator.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=Math::BigInt->new(qq]$^F$^W783$[$%9889$^F47]
 .qq]$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W]
 .qq]98$^F76777$=56]);$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V
%$^U;$^V/=$^U}while$^V!=$^W'


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


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

Date: 4 Nov 1999 05:53:51 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: proposed "??" operator causing ambiguous syntax
Message-Id: <slrn822t5g.dk.abigail@alexandra.delanet.com>

that's my address' Newton (nospam.newton@gmx.li) wrote on MMCCLVI
September MCMXCIII in <URL:news:382133ce.253127203@news.nikoma.de>:
## On Wed, 3 Nov 1999 14:49:59 -0800, Tom Phoenix <rootbeer@redcat.com>
## wrote:
## 
## >Having said that, I see that we don't complain that these are potentially
## >ambiguous if whitespace is removed:
## >
## >    $fred =~ $barney;
## >
## >    $fred = ~ $barney;
## 
## Or pathological stuff like
## 
##     $a - -+5
## 
##     $a-- + 5


That is not quite the same as what Bart said. $a - -+5 has a well
defined meaning. So has $a-- + 5. Niether is going to change.

$x??$pat?-1:1 has now a well defined meaning. If ?? would be introduced,
$x??$pat?-1:1 still has a well defined meaning - but it will mean something
different.



Abigail
-- 
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'


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


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

Date: Thu, 04 Nov 1999 12:40:40 GMT
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: replace " " with &nbsp;
Message-Id: <1999Nov4.124040@ukwit01>

In article <7vqsed$6am$1@fir.prod.itd.earthlink.net>, "Blair Heuer" <ab@cd.com> writes:
|> 
|> But I have no clue how to tell it to change all " " to "&nbsp;" until there
|> is not a " " then stop and go to the next.
|> Basically if i had the line (without quotes) "   Hello World!" I would want
|> the code to change it to "&nbsp;&nbsp;&nbsp;Hello World!"

   $line =~ s/^( *)/'&nbsp;' x length($1)/e;

-- 
--------- Gordon Lack --------------- gml4410@ggr.co.uk  ------------
This message *may* reflect my personal opinion.  It is *not* intended
to reflect those of my employer, or anyone else.



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

Date: Thu, 4 Nov 1999 12:42:31 +0100
From: "jeroen dijkmeijer" <jdijkmei@dds.nl>
Subject: Re: Running perl on NT
Message-Id: <7vrqp0$aoc$1@news.worldonline.nl>

I think you need to make sure that your script is placed in a directory to
which the server grants execute rights.
I'm using apache on NT and in my config I've made cgi-bin my scriptAlias
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the
client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "e:/apache/cgi-bin/"


Tim Curry heeft geschreven in bericht ...
>I am running a very simple perl script on an NT machine. I have installed
>perl and changed my permissions of the perl file. When I execute my form,
>the perl script is called. The perl script executes ok in a DOS shell, but
>when internet explorer executes it it simply writes the perl script to the
>window.
>
>Thanks for your help.
>
>




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

Date: Thu, 04 Nov 1999 19:20:31 +0800
From: chan <fschan@hotpop.com>
Subject: using Digest-MD5-2.09 on free website
Message-Id: <38216BFF.BB4E00E9@hotpop.com>

Hi


I woild like to use Digest-MD5-2.09 on a freewebsite, hypermart, how do
i do that? i don't have shell access, only ftp. I have tried to create a
Digest dir and place the MD5.pm there, and also include " use lib
'/usr/local/apache/cgi-bin/perl/Digest'; ", still don't work!!

it complain about : Can't locate object method "new" via package
"Digest::MD5" at ./md5.pl line 7.

Here is my code:

#!/usr/bin/perl

use CGI;
use lib '/usr/local/apache/cgi-bin/perl/Digest';
use Digest::MD5;

$md5 = Digest::MD5->new;   #error at this line!!!!!!!!!!!!!!!
$q = new CGI;

Pls help

Fook Sheng



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

Date: Thu, 04 Nov 1999 12:18:56 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Web Site Development (PROs ONLY PLEASE)
Message-Id: <7vrttg$bho$1@news.mch.sbs.de>

In article <7vqqfo$sb8$1@nnrp1.deja.com>, graduate@mail.com wrote:
<snip>
>Go look at the site and tell me if you can do the same or better.

Would this be 'better' ?

#!/usr/local/bin/perl -w
print <<EOM;
Content-type: text/html

<HTML>
<HEAD>
        <TITLE>Under Construction</TITLE>
</HEAD>
<BODY>
        <H1>
                This site is still <A HREF="mailto:graduate\@mail.com">
                under construction</A>
        </H1>
</BODY>
</HTML>
EOM

Oops, I forgot about the rest of your requirements. This only
includes Perl and HTML (and even the HTML part is probably
off-topic...)

Well, that's how it goes in this newsgroup, I guess :-)

!HAND,

Michel.


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

Date: Thu, 04 Nov 1999 13:52:45 GMT
From: Dick Latshaw <latsharj@my-deja.com>
Subject: Re: Web Site Development (PROs ONLY PLEASE)
Message-Id: <7vs33b$nk8$1@nnrp1.deja.com>

In article <7vqqfo$sb8$1@nnrp1.deja.com>,
  graduate@mail.com wrote:
> We are looking for Web developers who are experienced with
> ... ASP, Visial basic and script ...

Umm.. Looks like something for TomC.
--
Regards,
Dick (Running for cover before the explosion)


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


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

Date: Thu, 4 Nov 1999 22:43:59 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Year 2000 date problem
Message-Id: <rEfU3.12$Go3.1152@vic.nntp.telstra.net>

ofuuzo <ofuuzo@ub.uit.no> wrote in message
news:38201382.DC3CC7A6@ub.uit.no...
> Hi,
> ........
> @months = ('Jan','Feb','Mar','Apr','May','Jun',
>    'Jul','Aug','Sept','Oct','Nov','Dec');
> @days = ('Sun','Mon','Tue','Wed','Thur','Fri','Sat');
> ($sec,$min,$hour,$mday,$mon,$year,$wday) =
> (localtime(time))[0,1,2,3,4,5,6];
> if ($year > "96") {
>  $yd = "19$year";
> }
> else {
>  $yd = "20$year";
>
> }
> $date = " $days[$wday] $mday. $months[$mon]  $yd ";
> .........

You can expect an increasing number of these over the next few months!  My
advice is to take holidays now.. for about 16 weeks.

:^)

Wyzelli




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

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


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