[10870] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4471 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Dec 21 10:07:22 1998

Date: Mon, 21 Dec 98 07:00:26 -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           Mon, 21 Dec 1998     Volume: 8 Number: 4471

Today's topics:
        check mail with perl <webmaster@gigagames.de>
    Re: check mail with perl <Allan@due.net>
        CONTRACT PERL PROGRAMMER <adam@fci.net>
        Forking sendmail processes Please Help! (JT)
        How to use NNTPClient to fetch Headers of a Newsgroup ? <philip.class@popcorn-studio.ch>
    Re: Mac, Perl, uploading, help! haakon.alstadheim@sds.no
    Re: MAPLE V  Win32::OLE; <matthew.sergeant@eml.ericsson.se>
    Re: MAPLE V Win32::OLE; mattias_holmlund@my-dejanews.com
        NDBM question <kamran@norsar.no>
    Re: NDBM question (Mark-Jason Dominus)
    Re: Nested sorting (Micha3 Rutka)
        PERL security problem <james.r.nesmith@lmco.com>
    Re: PERL security problem (Mark-Jason Dominus)
    Re: regular expressions <Derek.Chaloner@securepay.co.uk>
        replace single quote to double quote with an example targetmailinfo@yahoo.com
    Re: replace single quote to double quote with an exampl (Sam Holden)
        replace the single quote to " at perl cgi programe targetmailinfo@yahoo.com
    Re: replace the single quote to " at perl cgi programe (Matthew Bafford)
    Re: Running Perl for Win32 -- Beginner Question <due@murray.fordham.edu>
    Re: Running Perl for Win32 -- Beginner Question <due@murray.fordham.edu>
    Re: Running Perl for Win32 -- Beginner Question (Stephen C. Smith)
        security <dillenk@spector.be>
    Re: site_perl Migration paul@miraclefish.com
    Re: sort it ? (Micha3 Rutka)
        Sql parsing (Kjetil Svendsberget)
    Re: Stumped Perl Newbie - read all the FAQ's <due@murray.fordham.edu>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 21 Dec 1998 14:38:37 +0100
From: "Patrick Schnorbus" <webmaster@gigagames.de>
Subject: check mail with perl
Message-Id: <9dsf2.1784$t85.14440@news1.cityweb.de>

Hi,

how can i get mail from a POP3 account with Perl?

greetings
Patrick




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

Date: Mon, 21 Dec 1998 09:05:25 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: check mail with perl
Message-Id: <75lkd2$5bv$1@camel25.mindspring.com>

Patrick Schnorbus wrote in message
<9dsf2.1784$t85.14440@news1.cityweb.de>...
>Hi,
>how can i get mail from a POP3 account with Perl?


Modules are your friends, check out POP3Client.

Well, since I happen to have this file open at the moment, here you go:

#!/usr/local/bin/perl -w
use strict;
use Mail::POP3Client;

my $pop = new Mail::POP3Client("account", "password", "pop3.domain.tdl");
for (my $i = 1; $i <= $pop->Count; $i++) {
    print "$i)  ";
    foreach ($pop->Head($i)) {
             /^(From|Subject|To|Return-Path): / and print $_, "\n";
    }
    print "\n";

}

The above just gets the header info.  As an example, to get the first mail
message:

print join "\n",$pop->HeadAndBody(1);

Of course, TIMTOWTDI.

HTH

AmD




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

Date: Mon, 21 Dec 1998 01:43:01 -0800
From: adam <adam@fci.net>
Subject: CONTRACT PERL PROGRAMMER
Message-Id: <367E1825.45AFFF9C@fci.net>

CONTRACT PERL PROGRAMMER

A Commercial Internet Service Provider providing Internet E-Commerce
Websites for companies around the country is accepting applications for
the position of CONTRACT PERL PROGRAMMER. Applicants must be
self-motivated, talented and have at least 3 years experience in
computer programming.

Programming experience in C/Unix, CGI scripting, SHELL, AWK, SED and
PERL. Duties will include documentation, programming, and debugging.
Flexible hours. Part-Time.

Please send a resume and samples of programming work to:

FCI.NET
1462 W. 8th Ave.
Eugene, OR 97402
FAX: 345-1257
OR
EMAIL         jobs@fci.net

   Experience/Skills:
 * CGI scripting (Perl/C)
 * Software Debugging
 * BSDi UNIX, Linux, FreeBSD or Sun operating systems
 * system backups/maintenance scripts
 * ability to troubleshoot and solve problems creatively
 * self-motivated with a positive attitude
 * Reliable at completing projects in a timely manner

     Not Required, But Helpful:
 * UNIX system administration
    * UNIX security
    * database programming/SQL

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

Adam Fishman                    EMail:  adam@fci.net
Fishbone Communications, Inc    URL:    http://www.fci.net
1462 W. 8th Avenue              Voice:  (541) 345-4322
Eugene, OR 97402                FAX:    (541) 345-1257

Providing Reliable Internet Connectivity and Electronic Commerce
Services
Home of NetStores, NetStorefront Services dedicated to Online Business
-------------------------------------------------------------------------





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

Date: Mon, 21 Dec 1998 13:35:33 GMT
From: jett1not@homedot.com (JT)
Subject: Forking sendmail processes Please Help!
Message-Id: <367e4abf.46592619@news>

I have a fork problem:

I'm running a mailing list script which is fairly straight forward,
the problem is that the script has no process management and uses all
available processes on the server until it finally crashes. I'm
running this on  BSDI 3.1 running Apache and Perl v.5.004_04

I've tried to fork using the method outlined in the Camel book,
however, I now have duplicates going out to my list. Our list is
weekly, and now approaching 3000 memebers. We've lost subscribers in
the past because of duplicates being received, as many are WebTV users
and have limited mailbox quotas.

The sub begins by establishing the fork and then an " if - else ",
which runs one of two other subs depending on the list I'm mailing to.
Should I establish the fork in the nested subs for each list instead?
I am able to fork now, but as I've said I cannot seem to avoid the
duplicate output and I'm wondering if this is due to forking before
the conditional statement. 

I'm not entirely fluent at Perl yet, so my explanation and terms may
not be very concise. I can post or link to the actual code if it would
help to clarify my problem. I had posted a snippet last week but
received no reply whatsoever.

I would really appreciate any feedback I can get on this. I know I'm
very close to a solution, but I can find no similar example code on
the web or usenet, to learn from.

TIA,
-JT

Remove the "not" and delete the "dot" to reply
jett1not@homedot.com


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

Date: Mon, 21 Dec 1998 15:42:22 +0100
From: "Philip Class" <philip.class@popcorn-studio.ch>
Subject: How to use NNTPClient to fetch Headers of a Newsgroup ?
Message-Id: <75lmin$3rk$1@bw107zhb.bluewin.ch>

I've got the following problem:
I need a Perl Program that lists all headers from a specific newsgroup
(maybe starting from a date).
I'm an amateur to Perl and simply don't manage to write this Code right.
Could someone please help to complete my Script-Code listed below ?
Thanks a lot !

Philip

use News::NNTPClient;
$newsgroup='alt.html';
$newsserver='news.bluewin.ch';
$newsport='119';
$debugmode='2';

$Content = new News::NNTPClient($newsserver,$newsport,$debugmode);
$Content->group($newsgroup);






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

Date: 21 Dec 1998 15:27:01 +0100
From: haakon.alstadheim@sds.no
Subject: Re: Mac, Perl, uploading, help!
Message-Id: <u4sqp7eq2.fsf@sds.no>

maxilious@earthlink.net (Kent) writes:

> Everytime I try to ulpoad a perl script with FETCH to my server the people
> at the isp say it is corrupted.
> 
> Now when I upload my html to my regular dirs I have no problems with fetch
> (set to raw data). I edit in BBedit light, should I be saving in a specific
> format?

Perl on UNIX needs unix line-ending conventions, which BBEDIT should
be able to give you. Far better however is to save in Native Mac text
format, and then tell Internet Config/Internet Setup on your Mac that
your scripts are of Mime-type Text/plain. That could either be done by
using the extension (.pl or .cgi or whatever) , the file type (type
'TEXT') or maybe even the creator-code ('R*ch' for BBedit if I
remember correctly). Then you can test your script locally with
MacPerl, (whch requires Mac line-endings) and let Fetch select
the upload mode automatically.

Another thing about binary mode: If you don't tell Fetch
otherwise, it will encode attributes and resources (like fonts)
into the file. You only want to send the DATA fork, nothing else.
This is done most conveniently by telling Fetch to send only the
data fork for text files, and then sending the scripts as text.

> 
> Please e-mail if you can?
Sorry, my gnus-setup doesen't do mail.


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

Date: Mon, 21 Dec 1998 13:05:05 +0000
From: Matt Sergeant <matthew.sergeant@eml.ericsson.se>
Subject: Re: MAPLE V  Win32::OLE;
Message-Id: <367E4781.B457479C@eml.ericsson.se>

Guido Steiner wrote:
> 
> Now I'm battling in the office to find a way to apply the same structure
> but with MAPLE V.  The documentation of MAPLE V declares that MAPLE
> includes the OLE standard.
> I already tried several combinations of names like :
> $obj=  Win32::OLE ->new('MAPLE.Application' ) || die "CreateObject :
> $!";
> or
> $obj=  Win32::OLE ->new('WMAPLE.Application' ) || die "CreateObject :
> $!";
> and so on.....
> but up to now without success.

There's a tool available from MS called OLEVIEW, it's free for download
off their FTP server, but I can't recall where - you'll have to find it.
Run that, and look for your application. All the details are within
there as to methods and properties available to you.

-- 
<Matt email="matt@teamamiga.org" />

| Fastnet Software Ltd              |   Perl in Active Server Pages   |
| Perl Consultancy, Web Development |   Database Design   |    XML    |
| http://come.to/fastnet            |    Information Consolidation    |


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

Date: Mon, 21 Dec 1998 09:29:08 GMT
From: mattias_holmlund@my-dejanews.com
Subject: Re: MAPLE V Win32::OLE;
Message-Id: <75l4d3$nt6$1@nnrp1.dejanews.com>

I'm not an expert at OLE Internals, but since noone else have answered I'll
give you my best shot:

Try looking in the registry with regedit. Under the key HKEY_CLASSES_ROOT a
lot of keys that look like OLE applications are listed. For example I found
Word.Application there. If that doesn't work, try looking through the
registry for Matlab.Application which ought to be in there somewhere and then
look for Maple in that neighborhood...

/Mattias

mattias dot holmlund at usa dot net

In article <367A6F96.999548A2@zhwin.ch>,
  Guido Steiner <str@zhwin.ch> wrote:
> I'm looking for a possible way to start the MAPLE V Application with the
> help of a Perl script.
> Please find below a short test sequence, which starts the MATLAB command
> window.
>
> use Win32::OLE;
> $obj=  Win32::OLE ->new('Matlab.Application' ) || die "CreateObject :
> $!";
> $obj ->MaximizeCommandWindow;
> $obj->Execute("surfl(peaks)");
> $obj->Execute("shading interp");
> $obj->Execute("colormap(gray)");
> $_=<>;
>
> Now I'm battling in the office to find a way to apply the same structure
> but with MAPLE V.  The documentation of MAPLE V declares that MAPLE
> includes the OLE standard.
> I already tried several combinations of names like :
> $obj=  Win32::OLE ->new('MAPLE.Application' ) || die "CreateObject :
> $!";
> or
> $obj=  Win32::OLE ->new('WMAPLE.Application' ) || die "CreateObject :
> $!";
> and so on.....
> but up to now without success.
>
> Maybe somebody can give me a hint, how I should proceed.
>
> Any answers will be highly appreciated
> Many thanks
>
> Guido
>
>

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


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

Date: Mon, 21 Dec 1998 11:14:20 +0100
From: Kamran Iranpour <kamran@norsar.no>
Subject: NDBM question
Message-Id: <367E1F7C.443A@norsar.no>

Hei

I am a newbie in perl and not very familiar with DBM either.
I have written a script which ties a hash to a file using
NDBM in perl. The original file consisting of 5 or six columns
and several thousands lines is about 3MB but when using the
DBM the file.pag comes to 130MB. Is that how it should be or
am I doing something wrong ?


Thanks in advance

Kamran


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

Date: 21 Dec 1998 09:53:20 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: NDBM question
Message-Id: <75lnd0$k2b$1@monet.op.net>

In article <367E1F7C.443A@norsar.no>,
Kamran Iranpour  <kamran@norsar.no> wrote:
>I have written a script which ties a hash to a file using
>NDBM in perl. The original file consisting of 5 or six columns
>and several thousands lines is about 3MB but when using the
>DBM the file.pag comes to 130MB. Is that how it should be or
>am I doing something wrong ?

Both.  Two things are going on here.

First, the file size is normal for NDBM.

Second, NDBM creates files that look larger than they are.  If you use
`ls -l'; you see the file's `extent', which says how long it is.
But this is not necessarily the same as how much space it takes up.
Some files, inclduing NDBM files, contain `holes' that make the file
longer but do not consume any disk space.  Use `ls -s' to see the
amount of disk space consumed.

Third, NDBM is probably unsuitable for very large files.  I have had
trouble with it in the past because inserting a record is very slow
for large files, and because for very large files the file extent gets
so big so fast that the operating system could no longer handle it.
I recommend a switch to DB_File.  The DB_File documentation will have
a pointer to the sources.




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

Date: 21 Dec 1998 13:50:37 +0100
From: rutka@lucent.com (Micha3 Rutka)
Subject: Re: Nested sorting
Message-Id: <wsmbtkxirqa.fsf@hzsac328.nl.lucent.com>

moseley@best.com (Bill Moseley) writes:

> In article <MPG.10e7674f3a37185898996e@nntp.hpl.hp.com>, lr@hpl.hp.com says:
> >Non-negative floating-point numbers require some manipulation and 
> >sorting as bit patterns, assuming IEEE-754 standard formatting.  I 
> >haven't figured out yet how to do that for negative floating-point 
> >numbers or, hence, reverse sorting.
> 
> I was just about to ask about this when your message came in!  I don't need
> to worry about it right now, but I am curious how to "stringify" a float
> in a consistant way that would work for sorting.  Seems rather tricky the
> more I think about it.

It is quite simple. I think that the problem araises from poorly
nameing of this technique, i.e. "stringify".
The technique orgin from linearization of ST, and you should use other 
name than "stringify". OK, enough about nameing ;-). Here is how you
can sort floats (non-negative):

@sorted_array_by_floats = map { substr($_,4) }
                          sort
                          map { pack("f",extract_float_from($_)).$_ }
                          @unsorted_array_containing_floats;

Simple, isn't it?

Some people misunderstood this technique and instead of using pack()
they start to use sprintf, however, from the birth of this technique
pack() was used. Even I caught myself in using sprintf, before I
returned my mind to the "roots", which are in my head anyway ;-).

The same technique can be, of course, used to sort negative numbers as
well, but requires one extra step in initial maping, which would slow
down the whole thing (just a little, as the extra step requires one
if-then-else and xor). Therefore I do not recomend this as
the generic solution. I leave this special case as an excercise (if
somebody *really* need it, then e-mail me).

Best wishes,

Michal

-- 
Dr. Ir. Michal Rutka       Lucent Technologies - Huizen, The Netherlands
Senior System Engineer     mailto:rutka@lucent.com


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

Date: Mon, 21 Dec 1998 08:55:54 -0500
From: Jimmy NeSmith <james.r.nesmith@lmco.com>
Subject: PERL security problem
Message-Id: <367E536A.93F6D635@lmco.com>

I know that due to security problems, using
PERL as a CGI script will not allow the
program to write to files that are not world
writable.  

Therefore, my script is trying to create a file
for writing and then use chmod to make the file
world writable.

I need to be able to create files depending on
what the user types into the cgi script text
box, and then write to them.

Does anyone have any suggestions on how to do
this?

Thanks,

Jimmy


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

Date: 21 Dec 1998 09:41:37 -0500
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: PERL security problem
Message-Id: <75lmn1$jc8$1@monet.op.net>

In article <367E536A.93F6D635@lmco.com>,
Jimmy NeSmith  <james.r.nesmith@lmco.com> wrote:
>I know that due to security problems, using
>PERL as a CGI script will not allow the
>program to write to files that are not world
>writable.  

No, that's wrong.  The problem is that the CGI program is running with
the permissions of the web server, so it can only write to files that
the web server has permission to write.

>Therefore, my script is trying to create a file
>for writing and then use chmod to make the file
>world writable.

So this is pointless.  The program will already own the file that it
creates, and it will probably have permission to write to it already,
without `chmod'.



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

Date: Mon, 21 Dec 1998 11:31:17 -0000
From: "Derek Chaloner" <Derek.Chaloner@securepay.co.uk>
Subject: Re: regular expressions
Message-Id: <367e318d.0@nnrp1.news.uk.psi.net>

My thanks to Jonathan Feinberg for pointing me in the right direction.
Although I had tried the /e modifier on the substitute, I had not realised
that it could  be used more than once, thus enabling double interpolation as
was required.

  $line=~s/$key/$sub{$key}/gee;

Derek

Derek Chaloner wrote in message <367a5849.0@nnrp1.news.uk.psi.net>...
>
>sub doLine
>{
>  my $line = shift;
>  foreach $key (keys(%sub))
>  {
>    print "  substituting <$sub{$key}> for <$key>\n" if
>$line=~s/$key/$sub{$key}/g;
>  }
>  return $line;
>}
>
>This snippet of code is part of a script which reads a file of
substitutions
>to make and enters them into a hash.
>
>The target files are then read and all of the substitutions are made a line
>at a time by this sub-routine.
>
>This works well for normal substitutions (I don't really care if it is not
>the most optimum for speed :-) )  but the replacement strings from the hash
>may contain $1, $2, $& etc and I cannot get the extracted sub-strings into
>the replacement.
>
>I have tried /e option and eval but whatever combination I have tried I
>cannot get it to work.
>
>Derek Chaloner
>Racal-Datacom (SPS)
>
>Work mailto:Derek.Chaloner@racalitsec.com
>Home mailto:derek@chaloner.globalnet.co.uk
>Web  http://www.users.globalnet.co.uk/~chaloner
>
>
>




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

Date: Mon, 21 Dec 1998 12:07:19 GMT
From: targetmailinfo@yahoo.com
Subject: replace single quote to double quote with an example
Message-Id: <75ldlm$uir$1@nnrp1.dejanews.com>

Sorry this is my second post , I have added an example so you will know what
do I want to do.

I have three input fields "$YourAddress" , "$MumAddress" and "$DadAddress" , I
want to replace all these field's input data from single quote ( ' ) to Double
quote( " ) . Is it prosible? Could you give me some example?

Thank You
BigJohn

p.s some of the field's data may like this ( 8 ' 54 O'Rally Rd ),
I want to replace it to ( 8 " 54 O"Rally Rd. )

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


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

Date: 21 Dec 1998 12:33:33 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: replace single quote to double quote with an example
Message-Id: <slrn77sg0t.hh.sholden@pgrad.cs.usyd.edu.au>

On Mon, 21 Dec 1998 12:07:19 GMT, targetmailinfo@yahoo.com
	<targetmailinfo@yahoo.com> wrote:
>Sorry this is my second post , I have added an example so you will know what
>do I want to do.
>
>I have three input fields "$YourAddress" , "$MumAddress" and "$DadAddress" , I
>want to replace all these field's input data from single quote ( ' ) to Double
>quote( " ) . Is it prosible? Could you give me some example?

You could try looking in the documentation that comes with perl it even has
some examples...

A snippet of a relevant section from 'perldoc perlop' :

       y/SEARCHLIST/REPLACEMENTLIST/cdsUC
               Transliterates all occurrences of the characters
               found in the search list with the corresponding
               character in the replacement list.

Obvious values of SEARCHLIST and REPLACEMENT list should do the trick...
for that cdsUC stuff you'll actually have to look up the documentation instead
of being spoon feed... 


-- 
Sam

Can you sum up plan 9 in layman's terms? It does everything Unix does
only less reliably.
	--Ken Thompson


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

Date: Mon, 21 Dec 1998 11:56:20 GMT
From: targetmailinfo@yahoo.com
Subject: replace the single quote to " at perl cgi programe
Message-Id: <75ld13$u4f$1@nnrp1.dejanews.com>

If I have three input fields which is "$YourAddress" , "$DadAddress" and
"$MumAddress" to my perl cgi programe. In these fields I want to replace all
the single quote ( ' ) to ( " ) . How do I do this?? Please give me an
example.

Thanks
BIGjohn

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


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

Date: Mon, 21 Dec 1998 09:48:39 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: replace the single quote to " at perl cgi programe
Message-Id: <MPG.10e816d68ccd47e598976a@news.scescape.net>

[Followups set to comp.lang.perl.misc]
[
    han.comp.lang.perl & perl.porters-gw removed.
    My newsserver says they don't exist. :)
]

In article <75ld13$u4f$1@nnrp1.dejanews.com>, targetmailinfo@yahoo.com 
says...
=> If I have three input fields which is "$YourAddress" , "$DadAddress" and
=> "$MumAddress" to my perl cgi programe. In these fields I want to replace all
=> the single quote ( ' ) to ( " ) . How do I do this?? Please give me an
=> example.

Is there any reason you posted this in comp.lang.perl, and then later 
cross posted it into all of these groups!?

Do you, by any chance, even know what

	perl.porters-gw

is?  You should actually read the group a little before you crosspost (or 
just plain post) into it.

Like someone in clp said, use the tr (or y) operator.

=> Thanks
=> BIGjohn

--Matthew


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

Date: 21 Dec 1998 11:32:58 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: Running Perl for Win32 -- Beginner Question
Message-Id: <75lbla$f7f$0@206.165.165.140>

Stephen C. Smith wrote in message <367d6ca4.3683721@news>...
| I bought a few books yesterday on Perl so I could learn this
|language.  One of them was "Perl for Dummies" (yes, I got the O'Reilly
|books too, so don't give me that look).  In the "Dummies" book was the
|ActivePerl version 5 from ActiveState.  I've gone to AS's Web site and
|updated to the current version for Win32.  (I'm running on Win 95 and
|I've installed DCOM from the Microsoft Web site.)
| When I try to run anything, even just a one-line "print"
|statement, the results appear on screen and then the DOS window
|disappears.  I gather that I have to run Perl in a DOS window; but
|when I try to execute Perl from a prompt in a DOS window I get the
|message "Cannot run in MS-DOS mode."  So I run Perl from the Win 85
|explorer, which opens us a DOS window.  But any lines of code I
|execute with Ctrl-Z, the results just flash on the screen and the DOS
|window closes, so I don't really see the results.
| How do I get the results to stay on the screen, i.e. the DOS
|window doesn't close?  I've tried all sorts of way to tell Win 95 not
|to close the window on exit, but so far none have worked.
| Thanks in advance,
| Stephen


Ok, a multi- pronged answer.  First, it might be a good idea to stick with the
O'Reilly books.  Just my $.02.  Second, I did a longish post a while back
giving step by step instructions for running your first Perl program in
Windoze.  So the second bit of advice is to go to WWW.Dejanews.com and do a
power search.  If you are not using dejanews you are missing a great resource
which will allow you find if questions like yours have been asked before.  In
the power search box enter the two words window and dos, then in the Forum box
enter comp.lang.perl.misc and in the Author box enter *due*.  You will find
the original post and my answer.  My answer there is my third bit of advice.
    Lastly, a simple test to see if perl is installed correctly, bring up a
DOS shell and type:
perl -v
at the prompt.  This should return the version of perl you are running.  If
you receive any other message, then something is wrong with your installation
and your best bet may be to reinstall Perl.

HTH

AmD
[cc as a courtesy]




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

Date: 21 Dec 1998 11:36:25 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: Running Perl for Win32 -- Beginner Question
Message-Id: <75lbrp$fjg$0@206.165.165.140>

John Maas wrote in message <75kagm$rae@newsops.execpc.com>...
|I am in your situation, except the program worked for me. I'm not sure
|what you are doing, but let me suggest a way to test the program.  Write a
|short perl program called my_pgm.pl, and save it to a file. Then go to the
|dos prompt, shift the path to the directory where your program is loaded,
|and then type: perl my_pgm.pl  Worked for me??
|
|Also, I find the ActiveState program complete and impressive and very
|confusing when using the provided documentation. Is that Perl for Dummies
|any good? Also, there is a O'Reilly book called something like Running
|Perl on Windows95. Anybody have an opinion on that book for running the
|ActiveState program?


"Learning Perl on Win32 Systems" (sometimes calle the Gecko book) is another
excellent O'Reilly product.  It is essentially a port of the llama book for us
POB.  If you are working in Windoze, it is the best place to start IMHO.

AmD




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

Date: Mon, 21 Dec 1998 14:08:17 GMT
From: homeplate@halostorm.com (Stephen C. Smith)
Subject: Re: Running Perl for Win32 -- Beginner Question
Message-Id: <367e5743.1761039@news>

	Thanks for the info.  I'll look it up when I have a chance.
	Stephen


On 21 Dec 1998 11:32:58 GMT, "Allan M. Due" <due@murray.fordham.edu>
wrote:

>Ok, a multi- pronged answer.  First, it might be a good idea to stick with the
>O'Reilly books.  Just my $.02.  Second, I did a longish post a while back
>giving step by step instructions for running your first Perl program in
>Windoze.  So the second bit of advice is to go to WWW.Dejanews.com and do a
>power search.  If you are not using dejanews you are missing a great resource
>which will allow you find if questions like yours have been asked before.  In
>the power search box enter the two words window and dos, then in the Forum box
>enter comp.lang.perl.misc and in the Author box enter *due*.  You will find
>the original post and my answer.  My answer there is my third bit of advice.
>    Lastly, a simple test to see if perl is installed correctly, bring up a
>DOS shell and type:
>perl -v
>at the prompt.  This should return the version of perl you are running.  If
>you receive any other message, then something is wrong with your installation
>and your best bet may be to reinstall Perl.
>
>HTH
>
>AmD
>[cc as a courtesy]
>
>


Visit the "Anaheim Angels and Lake Elsinore Storm" Web Site
http://www.halostorm.com


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

Date: Mon, 21 Dec 1998 14:14:17 +0100
From: Kris Dillen <dillenk@spector.be>
Subject: security
Message-Id: <367E49A9.6C80@spector.be>

Hi,


Using Perl on Windows NT :-)
Trying to pull out some reports out of the system.
Have been confronted with some security-issues (e.g. when using AT)
Has anyone a nice link to e webpage with more info ?


Kris Dillen


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

Date: Mon, 21 Dec 1998 12:11:18 GMT
From: paul@miraclefish.com
Subject: Re: site_perl Migration
Message-Id: <75ldt5$ut9$1@nnrp1.dejanews.com>

In article <7549cs$35r$1@gellyfish.btinternet.com>,
  Jonathan Stowe <gellyfish@btinternet.com> wrote:
> On Sun, 13 Dec 1998 11:40:05 -0500 Aravind Subramanian
<aravind@genome.wi.mit.edu> wrote:
> > We are moving several applications that use Perl 5.00502 to a new
> > machine (same OS - solaris). Its easy enough to install Perl on the new
> > machine but the site_perl on the old machine has several CPAN module
> > installations. Can the site_perl simply be copied over into the new
> > machine's Perl lib dir?
> >
>
> I would suggest that you should gether together all of the source for the
> installed modules into one place (in their own subdirectories of course) and
> then create a script that will do the whole build process for each module -
> now this gets a little complicated if there are any dependencies there and
> you may have to be 'root' to do 'make install' but if you merely copy the
> files then you *will* run into a problem sooner or later unless you are
> moving to an identical machine.
>

You could create your own Bundle:: module to configure what you want to
install and then use CPAN::.  man CPAN for details on how to do all of this.

Paul

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


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

Date: 21 Dec 1998 14:03:07 +0100
From: rutka@lucent.com (Micha3 Rutka)
Subject: Re: sort it ?
Message-Id: <wsm67b5ir5g.fsf@hzsac328.nl.lucent.com>

rutka@lucent.com (Micha3 Rutka) writes:
> 
> Alternativly, you can speed up a little bit by using a construction,
> which I invented during problem of sorting IP addresses (look in
> Dejanews for articles from October of this year). Here is the code:
> 
> @vendors = map{ substr($_,9) } 
>            sort 
>            map{ sprintf("%9.2f",(split " ",$_)[$field]).$_ } @vendors;
> 
> Note: I assume that your vendors spend less than 999999.99 ;-).

You can speed up even more if you use the original technique (without a
name yet) rather than 'strigify' version of it:

@vendors = map{ substr($_,4) } 
           sort 
           map{ pack("f",(split " ",$_)[$field]).$_ } @vendors;

No asumption about vendors is required anymore :-).

Regards,

Michal

-- 
Dr. Ir. Michal Rutka       Lucent Technologies - Huizen, The Netherlands
Senior System Engineer     mailto:rutka@lucent.com


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

Date: Mon, 21 Dec 1998 12:43:32 GMT
From: kjetil@balder.no (Kjetil Svendsberget)
Subject: Sql parsing
Message-Id: <367e41d0.6320247@news.eunet.no>

Any good modules for parsing sql?

My problem is that i got an sql-file who i need to parse, looking for
column names. e.g:

select firstname, lastname
from persontable
order by lastname

Here i want firstname and lastname

Ive tried Text::ParseWords, and that works up to the point where the
sql looks like this:

select firstname, othertable lastname, age, "sex"
from persontable, othertable
order by lastname





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

Date: 21 Dec 1998 11:14:51 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: Stumped Perl Newbie - read all the FAQ's
Message-Id: <75lajb$d87$0@206.165.165.140>

Ryan wrote in message <367E0956.28DF@hotmail.com>...
|Roger McIlmoyle wrote:
|> I've been trying to get perl to execute / generate HTML.
|> From the command line it generated a good html file that works.
|> When I call it from the browser (Microsoft's), I get a server 500 errror.


|> I have: #! c:\Perl\5.005\bin\MSWin32-x86-object\perl.exe
|> as the first line, I have put the script where scripts can run on the IIS.
|> I would really appreciate a pointer.
|> #! c:\Perl\5.005\bin\MSWin32-x86-object\perl.exe
|> print "Content-type: text/html\n\n";
|Are you using Windows then? I can only assume so. If so, the #! line
|shoudn't need the path. Or from my experience, it never has! (however,
|you can stil use the switches., i.e., -w -T, etc.).
|

Just for additional clarification.  If he is using Apache then the #! line
*must* point to the correct directory (yes, even in Windoze).  Not a
requirement of perl but of Apache, which leads to your final point that the
correct resolution to his problem will probably be found in another NG.

AmD





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

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

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