[10974] in Perl-Users-Digest
Perl-Users Digest, Issue: 4574 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 7 18:07:16 1999
Date: Thu, 7 Jan 99 15:00:23 -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 Thu, 7 Jan 1999 Volume: 8 Number: 4574
Today's topics:
Re: ActivePerl & IIS4.0 Permissions <jwarner@tivoli.com>
ANNOUNCE: HTTPi/0.4 package <cdkaiser@concentric.net>
ANNOUNCE: Proc::ProcessTable 0.07 (Daniel J Urist)
Announcing Daily Update 5.0 -- integrate dynamic data f <dwc3q@mamba.cs.virginia.edu>
Re: Automated site indexing (and more) with perl?! <gellyfish@btinternet.com>
Building Dynamic Web Pages airplanes@altavista.net
Re: CFV: what's with all the job posts? <gellyfish@btinternet.com>
Re: Checking for a Charictor in a Variable (Craig Berry)
Re: Checking for a Charictor in a Variable (Craig Berry)
Re: Deleting a line in a HTML File <gellyfish@btinternet.com>
Re: filename from a filehandle <kprice@cardinal.co.nz>
geting arguments <euhost@euhost.com>
Re: geting arguments (K. Krueger)
Global variables and use strict question nospam@here.com
Re: hardcoding an additional, nonstandard element for @ <gellyfish@btinternet.com>
Re: Help - cookies; check if a browser is set to accept (Stephen Clouse)
Re: Help - cookies; check if a browser is set to accept (brian d foy)
Re: Help - cookies; check if a browser is set to accept <dgris@moiraine.dimensional.com>
Re: Help - cookies; check if a browser is set to accept (Bart Lateur)
Re: HELP - Is it possible to read mail from an Exchange <gellyfish@btinternet.com>
Re: If Larry Wall's listening out there.... (Martien Verbruggen)
Re: Newbie With Malformed Header! <pha97wg@sheffield.ac.uk>
NT User Admin Script lchuck@home.com
NT/ActivePerl/File::Copy/Network Drive/AT command = uns jneedles@ucg.com
Re: NT/ActivePerl/File::Copy/Network Drive/AT command = <kprice@cardinal.co.nz>
Re: Passing hashes to a sub <jwarner@tivoli.com>
Re: Password Encryption (Martin Vorlaender)
Re: Password Encryption (Martien Verbruggen)
Re: Perl Criticism bthak@my-dejanews.com
Re: Perl Criticism topmind@technologist.com
Re: Perl Criticism <dgris@moiraine.dimensional.com>
Re: Perl Criticism (Martien Verbruggen)
Re: Perl script error problem (Clay Irving)
ping script in perl ....where can I get one? <maso@int.tele.dk>
Re: Randal's code [was Re: How do I delete tmp files ba (Larry Rosler)
Re: Randal's code [was Re: How do I delete tmp files ba <uri@ibnets.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 07 Jan 1999 14:42:15 -0600
From: John Warner <jwarner@tivoli.com>
Subject: Re: ActivePerl & IIS4.0 Permissions
Message-Id: <36951C27.7BE00A65@tivoli.com>
You are actually encountering a non-Perl problem. The problem is with the
permissions controlled by ISM or NTFS. You need to make sure that your
cgi-bin directory has read and execute (including scripts) privileges.
John Warner
Ritche Macalaguim wrote:
> I have ActivePerl Build 509 running on NT4 IIS4. Everyone on the web is
> being prompted for a username and password whenever a CGI script is
> accessed. How do I remove this permissions prompt so that scripts will
> execute for everyone?
>
> Please help...
> Ritche
> ritche@san.rr.com
------------------------------
Date: 7 Jan 1999 19:41:37 GMT
From: Cameron Kaiser <cdkaiser@concentric.net>
Subject: ANNOUNCE: HTTPi/0.4 package
Message-Id: <7732lh$6do$1@play.inetarena.com>
HTTPi/0.4 is an extensible, miniaturized HTTP/0.9, /1.0 and /1.1-compliant
webserver written 100% in Perl and running in under 6K with no additional
modules (doesn't require Socket.pm, Net.pm, LWP, or any networking support
other than what it has built-in). In fact, all you need is the Perl 5
executable and inetd, xinetd, or equivalent -- nothing else is required.
HTTPi is intended for systems with a need for a small, low-impact server
(it runs through inetd and doesn't spawn daemons), or for people who want
to roll their own web-applications from a bare bone algorithm. With its
small size, invocation time is minimal and execution time is extremely fast.
Supports:
* executable applications (similar to nph-cgi)
* HTTP/1.1 persistent connections
* CERN logging
Fixed in this version:
* CERN date format bug
* logging format bug
Added to this version:
* restriction matrix IP/useragent-based security
* multiple logging formats
* support for xinetd
* smart(er) configure script suite
See HTTPi in action, get documentation and download the current version and
past releases from
http://stockholm.ptloma.edu/httpi/
The current version will be uploaded to CPAN shortly.
--
Cameron Kaiser * cdkaiser.cris@com * powered by eight bits * operating on faith
-- supporting the Commodore 64/128: http://www.armory.com/~spectre/cwi/ --
head moderator comp.binaries.cbm * cbm special forces unit $ea31 (tincsf)
personal page http://calvin.ptloma.edu/~spectre/ * "when in doubt, take a pawn"
------------------------------
Date: 7 Jan 1999 19:40:58 GMT
From: durist@world.std.com (Daniel J Urist)
Subject: ANNOUNCE: Proc::ProcessTable 0.07
Message-Id: <7732ka$6df$1@play.inetarena.com>
I have just uploaded Proc::ProcessTable 0.07 to CPAN.
Proc::ProcessTable is a perl module to provide a consistent
object-oriented interface to the process table on different Unices.
Thanks to the efforts of Slaven Rezic, FreeBSD is now supported, in
addition to Linux, Solaris, AIX and HPUX.
--
Dan Urist
durist@world.std.com
------------------------------
Date: 7 Jan 1999 19:42:42 GMT
From: David Coppit <dwc3q@mamba.cs.virginia.edu>
Subject: Announcing Daily Update 5.0 -- integrate dynamic data from the internet
Message-Id: <7732ni$6gr$1@play.inetarena.com>
Daily Update 5.0 grabs dynamic information from the internet
and integrates it into your webpage. You specify special HTML tags in a
template file, which then get replaced by the acquired data. It's also
easy to extend the script to handle new data sources.
Features include timeouts to handle dead servers without hanging the
script, user-defined update times, modular and extensible design, and
compatibility with cgi-wrap.
To see example output, go to http://www.cs.virginia.edu/~dwc3q/daily.html
Available (soon) on CPAN at:
http://www.perl.com/CPAN/authors/id/D/DC/DCOPPIT/
Documentation and most recent version is at
http://www.cs.virginia.edu/~dwc3q/code/DailyUpdate/index.html
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: 7 Jan 1999 22:35:50 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Automated site indexing (and more) with perl?!
Message-Id: <773cs6$k7$1@gellyfish.btinternet.com>
On Wed, 06 Jan 1999 11:14:31 GMT luebbert@sfs-dortmund.de wrote:
> Hi world!
>
> I am quite a Perl newbie ( to warn you ;-))..
>
> I am looking for a perl script that automates the
> development and use of a surface for our intranet file system.
>
> The script should scan our intranet file system (novell) and create
> index-files from all the directories. The user should be able to insert
> descriptions for the index files via WWW (write through CGI into the
> index-files)..
>
> And the script should realize if somebody deleted or added a file to a
> directory.
>
> Does anyone understand me? ;-)) Does anyone know such a script or even some
> fragments that would do the job?
>
I have a script that does part of what you want that is available at:
<URL:http://www.btinternet.com/~gellyfish/resources/>
It will simply traverse a path and create an index file but could be
modified fairly easily to produce an index in each directory - Infact if
I get a minute I might fix it to do that.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Thu, 07 Jan 1999 18:44:11 GMT
From: airplanes@altavista.net
Subject: Building Dynamic Web Pages
Message-Id: <772v9q$8qi$1@nnrp1.dejanews.com>
Hello!
Could anyone help me find a script to create dynamic web pages. I need a set
of vari's to be extracted from a database like access. Could someone please
help me, I'm new to this kind of thing.
Simply, I need to have a script to create pages automaticly from an imput into
a database.
Thanks
David
hovercraft@altavista.net
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 7 Jan 1999 20:55:48 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: CFV: what's with all the job posts?
Message-Id: <77370k$ib$1@gellyfish.btinternet.com>
On 07 Jan 1999 00:02:14 -0500 Uri Guttman wrote:
>
> c.l.p.misc seems to have had a recent bombardment of perl job
> postings. they are generally considered OT and semi-spam. what are your
> thoughts on c.l.p.jobs?
>
Generally it is considered that the winter months are a quieter time for
recruitment - but it *does* seem that there has been a marked increase in
these postings of late. Largely these things are of no interest to me
being that they are mostly in North America - however it is interesting
to see what kinds of things are being done with Perl I suppose.
I could see that c.l.p.jobs *could* become awash with miscellaneous
irrelevant positions that just might have something to do with Perl -
after all any programming post could have *something* to do with Perl
(one just sneaks it in to any task after all.) However the group could
still have some virtue - it might keep those posts away from this group
and might encourage more.
I never look at the jobs.* groups so I havent any comparison as to how
this could turn out but on balance I think its probably a good thing.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 7 Jan 1999 21:10:40 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Checking for a Charictor in a Variable
Message-Id: <7737sg$dvo$2@marina.cinenet.net>
Artoo (r2-d2@REMOVEbigfoot.com) wrote:
: How can you make it check for several characters?
print "Has a, b, c, or @\n" if $var =~ tr/abc@//;
--
| 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: 7 Jan 1999 21:04:25 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Checking for a Charictor in a Variable
Message-Id: <7737gp$dvo$1@marina.cinenet.net>
Artoo (r2-d2@REMOVEbigfoot.com) wrote:
: 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.
One way:
if ($variable =~ /\@/) {
...
--
| 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: 7 Jan 1999 22:12:41 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Deleting a line in a HTML File
Message-Id: <773bgp$ju$1@gellyfish.btinternet.com>
On Wed, 06 Jan 1999 15:54:32 +0000 Yoann Le Corvic wrote:
> Hello
>
> I created a small system that generate an index of file dynamically
> using perl. When a user from the Internet send a request, it's stored,
> and a new line is added in the index. But now, I have another problem. I
> need to remove this line dyna,ically when someone from support reply to
> it.
>
> I can I remove dynamically a table line from a HTML Document ???
>
Generally the answer to HTML manipulation questions is to use HTML::Parser
or somesuch - however I get the impression that infact that the design
of the application could do with a little thought.
For myself I would store the index in some database and generate your
index page dynamically with some CGI program then it is relatively
simple to add new data and either remove or mark as closed some record.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Fri, 08 Jan 1999 09:54:38 +1300
From: Kelvin Price <kprice@cardinal.co.nz>
Subject: Re: filename from a filehandle
Message-Id: <36951F0E.2FF2C634@cardinal.co.nz>
John Stanley wrote:
>
> In article <369415E4.9F02B8CF@cardinal.co.nz>,
> Kelvin Price <kprice@cardinal.co.nz> wrote:
> >As a system administrator I would consider that a VERY BAD practice. If
> >your code goes nuts and fills the unlinked file with garbage, it is
> >really difficult to work out what's eating up all the disk space.
>
> As a system administrator, I find that it solves certain problems very
> well. For example, when processing images I need to create a temporary
> file in a certain format if the original input is not already in the
> right format. I don't want to have to keep track of whether this file
> has been created, and I don't want to have to worry about cleaning it
> up later. That's a hole which can result in a temp directory filled
> with temporary files.
>
> So,
>
> if( need to convert )
> convert original to temp file
> open temp file
> unlink temp file
> else
> open original file
>
> read data
> process
> exit
>
> All code that works with the temp file is located in one place. I don't
> worry about accidentally deleting the original file if I mess up a flag
> that tells me I shouldn't delete the input file. Clean, simple.
>
> The file goes away when the program exits. There is no disk space to
> worry about dissappearing.
That certainly is a useful trick. If your program behaves and exits
cleanly then, yes, disappearing disk space is not a problem. My concern
is with programs that don't behave, don't exit and just keep growing the
'invivsible' file(s) to the point where free disk becomes dangerously
low or non-existent.
As always, there is not usually a problem when things behave as
intended, but there frequently is a problem when they don't.
------------------------------
Date: Thu, 07 Jan 1999 22:28:34 +0100
From: Matevz Sernc <euhost@euhost.com>
Subject: geting arguments
Message-Id: <36952702.1F555771@euhost.com>
Hello
I want that some user click on following link:
http://www.domain.xyz/cgi-bin/here.cgi?user=mk10
--
How can i get the part after the "?" in a variable in here.cgi ??
I then want to do an user-dependent output to the browser.
But how to get the "mk10" in a variable ??
Can anyone help me ? (maybe someone has an simple cgi, i can see at)
Regards
Matevz Sernc
------------------------------
Date: 7 Jan 1999 13:48:13 -0800
From: kirbyk@best.com (K. Krueger)
Subject: Re: geting arguments
Message-Id: <773a2t$5ip$1@shell2.ba.best.com>
In article <36952702.1F555771@euhost.com>,
Matevz Sernc <euhost@euhost.com> wrote:
>Hello
>
>I want that some user click on following link:
>http://www.domain.xyz/cgi-bin/here.cgi?user=mk10
>
>--
>How can i get the part after the "?" in a variable in here.cgi ??
>
This is, of course, something that's done a lot. What you want is
the CGI module. Read the documentation on this (perldoc cgi), and
in particular look at the param function. The CGI module also
has a lot of useful code for generating web pages and forms on the
fly, which are likely useful to most web projects.
If you don't have the CGI module installed, you can get it from
the CPAN (www.cpan.org) easily enough.
--
Kirby Krueger O- kirbyk@best.com
<*> "Most .sigs this small can't open their own jump gate."
------------------------------
Date: Thu, 07 Jan 1999 21:08:28 GMT
From: nospam@here.com
Subject: Global variables and use strict question
Message-Id: <36952119.20722055@mars.dsu.edu>
With Perl for Win32 form www.activestate.com build 508 it recommends
using "use strict". This then causes perl to complain about any
global variables that you don't refer to as $main::variablename. My
question is, what is the best way to handle this? Below is a little
bit of my code. For some of my global vars I'm using "use vars" to
"declare" them (is that right?), but with the rest of them, I make
them local to my program with the "my" keyword. Both of these work,
but which is better, or should I be using fully qualified references
to all of my global variables instead?
Thanks,
JIM
#********Includes**********
use strict;
use Getopt::Std;
#********Constants*********
#********Global Variables*********
#These vars are used in getopts.pl
use vars qw ($opt_d $opt_g $opt_x $opt_f);
my $Domain;
my $DomainController;
my $UserNameFile;
my $ExcludeGroup;
my $Group;
------------------------------
Date: 7 Jan 1999 21:48:24 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: hardcoding an additional, nonstandard element for @INC at build time
Message-Id: <773a38$jo$1@gellyfish.btinternet.com>
In comp.lang.perl.misc Matthew O. Persico <mpersico@erols.com> wrote:
> Sorry to re-post, but the thread 'Re: Adding a path to the @INC
> variable' steered away from my request.
>
> In short, I do not want any programatic, env-based solution to the
> problem. I do not want to have to put use lib statements in evcery
> script, nor do I want to use PERL5LIB.
>
> I want to know if there is a way to MODIFY THE PERL CODE via a
> configuration option when building the perl distribution to add a dir to
> @INC.
You can edit config.sh to add your path(s) to sitelib or sitelibexp as
colon delimited list then edit Configure -S to propagate this change to
the other files - then continue the make. When making modules later
you might need to do:
perl Makefile.PL -PREFIX=/blah/blah
anyhow if you want to put your module in a non-staandard place.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Thu, 07 Jan 1999 20:05:56 GMT
From: see.sig@for.address (Stephen Clouse)
Subject: Re: Help - cookies; check if a browser is set to accept cookies
Message-Id: <36950a6b.5509924@news.kc.net>
On 07 Jan 1999 11:34:20 -0700 in message
<<m3iuejaq4z.fsf@moiraine.dimensional.com> comp.lang.perl.misc>, Daniel
Grisinger <dgris@moiraine.dimensional.com> wrote:
>Dale Sutcliffe <dales@enhanced-performance.com> writes:
>
>> Actually, I was talking about perl. Thank you very much.
>
>Cookies and browsers have absolutely nothing to do with perl.
>Thank you very much.
Ah, but they do, if he's asking if his Perl CGI program can tell whether a
browser can accept cookies or not.
use English::Good;
Yeesh.
Anyway, I don't think it's possible. Cookies are transmitted in the HTTP
header, and browsers that don't recognize the header field simply ignore it.
The server does not get notified. The only way to tell is to attempt to set a
cookie and see if you get one back on the user's next access to your script.
That is the only way to tell. Even if the user's browser supports them, they
may have them turned off or their company may have a program higher up on the
line filtering them out. There is no reliable way except to test the user's
browser at runtime.
Because of all those reasons, don't depend on the user having cookies to access
your CGI program. But if you truly must use them, have a page that clearly
outlines what they're used for, to satisfy all these paranoid low-IQ people who
believe cookies are a subversive hacker tool.
If their browser does support cookies, you will get it back in
$ENV{'HTTP_COOKIE'} the next time they access your program (after you set the
cookie, of course). For the authoritative technical document (and how to decode
the environment string), see:
http://home.netscape.com/newsref/std/cookie_spec.html
And odds are there is a Perl module to handle this sort of thing, but I couldn't
find it.
--
Stephen Clouse -- steve at acme-labs dot com (Anti-Spam enabled)
Acme Labs -- Resident Megalomaniac (http://www.acme-labs.com)
------------------------------
Date: Thu, 07 Jan 1999 15:46:21 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Help - cookies; check if a browser is set to accept cookies
Message-Id: <comdog-ya02408000R0701991546210001@news.panix.com>
[follow-ups set. take note]
In article <36950a6b.5509924@news.kc.net>, see.sig@for.address (Stephen Clouse) posted:
> On 07 Jan 1999 11:34:20 -0700 in message
> <<m3iuejaq4z.fsf@moiraine.dimensional.com> comp.lang.perl.misc>, Daniel
> Grisinger <dgris@moiraine.dimensional.com> wrote:
>
> >Dale Sutcliffe <dales@enhanced-performance.com> writes:
> >
> >> Actually, I was talking about perl. Thank you very much.
> >
> >Cookies and browsers have absolutely nothing to do with perl.
> >Thank you very much.
>
> Ah, but they do, if he's asking if his Perl CGI program can tell whether a
> browser can accept cookies or not.
if that problem is about Perl, then so are
* my helium simulation won't form a bose-einstein condensate.
i'm using PERL.
* i can't generate twelve tone music on my synthesizer with
PERL. what do i do?
* why does chlorine always have 17 protons when i use
Chemistry::Elements in pearl?
and i'd like you to answer them for me.
there is a perfectly good place to ask CGI questions -
it's comp.infosystems.www.authoring.cgi. 'perl' isn't in that
group name because CGI doesn't care in which language you implement
your system. the browser doesn't know which language you are using.
the network doesn't know which language you are using. the server might
not even know which language you are using. so what does it matter
which language you use? it doesn't, which is precisely the point.
if there is a way to get information from the browser, it is
language independent, and thus, not a language question.
> to satisfy all these paranoid low-IQ people who
> believe cookies are a subversive hacker tool.
well, they can be. there's the fundamental three-dot problem in
cookies that make them insecure. see the BUGTRAQ archives for
more details.
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
------------------------------
Date: 07 Jan 1999 13:43:21 -0700
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Help - cookies; check if a browser is set to accept cookies
Message-Id: <m367aibyqe.fsf@moiraine.dimensional.com>
see.sig@for.address (Stephen Clouse) writes:
> On 07 Jan 1999 11:34:20 -0700 in message
> <<m3iuejaq4z.fsf@moiraine.dimensional.com> comp.lang.perl.misc>, Daniel
> Grisinger <dgris@moiraine.dimensional.com> wrote:
> >Cookies and browsers have absolutely nothing to do with perl.
> >Thank you very much.
>
> Ah, but they do, if he's asking if his Perl CGI program can tell whether a
> browser can accept cookies or not.
No, they don't. Not by any possible stretch of the imagination. No
matter what substances you are smoking. Unless, of course, you also
believe that x86 assembler has something to do with email because one
could write a mail client in it.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Thu, 07 Jan 1999 21:41:22 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Help - cookies; check if a browser is set to accept cookies
Message-Id: <369729cb.1422887@news.skynet.be>
Dale Sutcliffe wrote:
>How do I check if a browser is set to accept cookies?
In order to reduce the noise on this newsgrup ( ;-), here's a solution.
Set a cookie.
Next time the user calls a CGI in the same directory, you'll see a
cookie, if it worked. Otherwise, you won't.
Bart.
------------------------------
Date: 7 Jan 1999 22:29:55 -0000
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: HELP - Is it possible to read mail from an Exchange Server using PERL?
Message-Id: <773ch3$k4$1@gellyfish.btinternet.com>
On Wed, 06 Jan 1999 19:37:25 GMT qvanegeren@frxsoft.com wrote:
> 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.
>
You might be able to use Win32::OLE and MAPI to do this kind of thing but
I seem to recall a suggestion that MAPI was horribly broken in respect of
working with non-MS applications. Alternatively there are available POP3
extensions for Exchange but here we digress from Perl to something that
properly should be discussed in a newsgroup concerned with E-Mail issues.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Thu, 07 Jan 1999 22:25:16 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: If Larry Wall's listening out there....
Message-Id: <gval2.56$FY1.1974@nsw.nnrp.telstra.net>
In article <772kb4$go3$1@brokaw.wa.com>,
elf@halcyon.com (Elf Sternberg) writes:
> In article <76urmk$ncd$1@news.akl.netlink.net.nz>
> "Andrew Mayo" <andrew@geac.co.nz> writes:
>>A further, related issue is that arguments appear to be passed by
>>reference,
>
> Um, no. Arguments are pass-by-value unless wery serious care
> is taken to do otherwise.
Most of what you say is correct, AFAIK, but this isn't. You can test
it by simply doing something like:
# perl -le 'sub inc {$_[0]++}; $x = 2; inc($x); print $x'
3
You make copies yourself, unless you _want_ to manipulate the
original, in which case you should probably create a (lexically) local
reference. That is why perl subs almost always start with
my ($v1, $v2) = @_;
or
my $a = shift;
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Begin at the beginning and go on till
Commercial Dynamics Pty. Ltd. | you come to the end; then stop.
NSW, Australia |
------------------------------
Date: Thu, 07 Jan 1999 10:11:05 +0000
From: Will Green <pha97wg@sheffield.ac.uk>
To: sorenso@online.no
Subject: Re: Newbie With Malformed Header!
Message-Id: <36948839.B54CA552@sheffield.ac.uk>
Xistein Sxrensen wrote:
>
> Will Green wrote:
> > When I run PERL at the command line, it says the syntax of my code is
> > fine, however when I run it via the web server I get errors about a
> > malformed header, even with really simple code:
>
> You have to tell the server which mime-type is coming. This is done by
> printing "Content-type: <type>" first i every cgi-script.
>
> > #!/usr/bin/perl
>
> Insert here:
> print "Content-type: text/html\n\n";
>
> > print 'Hello world.';
>
> \sorenso\
> --
> Xistein Sxrensen - <sorenso@online.no>
> <url:http://home.sol.no/home/sorenso/>
> "That's my five cents..."
--
Will Green - The Bits General Editor, Supporting C++Builder
Try out our new C++Builder forum, includes real-time chat!
Point your browser at http://www.cbuilder.dthomas.co.uk
------------------------------
Date: Thu, 07 Jan 1999 20:23:08 GMT
From: lchuck@home.com
Subject: NT User Admin Script
Message-Id: <773539$ebg$1@nnrp1.dejanews.com>
Hello to all. I am an intern in a large company and I am desperately trying
to fight my way up the corporate ladder. What I am attempting to do is to
find or write a script in Perl that can create, copy, and manipulate users in
our Windows NT domain. It would need to be able to accept input, in the form
of a name, and then find out it that name already exists and if it does, put
a number after the user name in order to make it unique. Can anyone tell me
if something like this exists or at least tell me which modules to use. If
it does not exist, I will write/develop it, as I learn Perl, and then post it
for anyone to use if they wish. Thanks a bunch.
LuckyChuck
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 7 Jan 1999 10:08:53 -0800
From: jneedles@ucg.com
Subject: NT/ActivePerl/File::Copy/Network Drive/AT command = unsuccessful
Message-Id: <772t7l$n3s@edrn.newsguy.com>
I have written a script that is supposed to copy files to a network drive at
regularly scheduled intervals using the NT AT command to execute the script
every hour. I am using File::Copy to copy the files.
Problem:
Script works fine when I run it manually from the console. However when I
schedule it to run under NT all of a sudden the copy command is returning errors
and will not copy files to the network drive, which happens to be a directory on
our web machine. I have tried both UNC and drive letters in the paths. Both
work when I run the script manually. Both do NOT work when the AT function
executes them.
I have also tried the Arcana Scheduler application because it has the ability to
run the script as a somebody rather than as the system. Still no success.
How can I get the network copy to work?
Thanks in advance
Jim
------------------------------
Date: Fri, 08 Jan 1999 11:13:12 +1300
From: Kelvin Price <kprice@cardinal.co.nz>
Subject: Re: NT/ActivePerl/File::Copy/Network Drive/AT command = unsuccessful
Message-Id: <36953178.4DA217E1@cardinal.co.nz>
jneedles@ucg.com wrote:
>
> I have written a script that is supposed to copy files to a network drive at
> regularly scheduled intervals using the NT AT command to execute the script
> every hour. I am using File::Copy to copy the files.
>
> Problem:
> Script works fine when I run it manually from the console. However when I
> schedule it to run under NT all of a sudden the copy command is returning errors
> and will not copy files to the network drive, which happens to be a directory on
> our web machine. I have tried both UNC and drive letters in the paths. Both
> work when I run the script manually. Both do NOT work when the AT function
> executes them.
>
> I have also tried the Arcana Scheduler application because it has the ability to
> run the script as a somebody rather than as the system. Still no success.
>
> How can I get the network copy to work?
>
> Thanks in advance
>
> Jim
Jobs run from AT run under the SYSTEM account who probably doesn't have
permission to do what you want.
One suggestion would be to have your perl script run as a service (use
SRVANY from the NT resource kit) and configure that service to run with
a user account that has all the access required. It should be easy to
alter your perl script to loop continuously with a 60 minute sleep
between copies.
HTH Kelvin
------------------------------
Date: Thu, 07 Jan 1999 14:38:21 -0600
From: John Warner <jwarner@tivoli.com>
Subject: Re: Passing hashes to a sub
Message-Id: <36951B3D.418AFBF4@tivoli.com>
Thanks! The array trick did what I needed. I actually was pretty close
with the hacking I had tried...but then again close only counts in
horseshoes, handgrenades, and nuclear bombs.
John Warner
Matthew Bafford wrote:
> In article <3694F6F4.2000E415@tivoli.com>, jwarner@tivoli.com pounded in
> the following:
> [snip asking how to pass hashes]
>
> There are two common ways:
>
> 1) Pass by reference:
>
> sub mysub1 {
> my $hashref = shift;
>
> # use $hashref like:
> # keys %{$hashref}
> # ${$hashref}{'key1'}
> # @{$hashref}{'key1','key2'}
> }
>
> 2) Take advantage of the fact hashes can be flattened into arrays and
> reexpanded:
>
> sub mysub2 {
> # Get other args off the stack (@_)
>
> my %hash = @_;
> }
>
> You then call them like this:
>
> my %hash;
> #init hash
>
> mysub1(\%hash);
> mysub2( %hash);
>
> => Thanks in advance,
>
> HTH!
>
> => John Warner
>
> --Matthew
------------------------------
Date: Thu, 07 Jan 1999 21:44:39 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Password Encryption
Message-Id: <36951cb7.524144494f47414741@radiogaga.harz.de>
Artoo (r2-d2@REMOVEbigfoot.com) wrote:
: Mike wrote in message <3693686D.24757D41@counter.w-dt.com>...
: >Use perls crypt function. It can't be decrypted, you just crypt both with
: >the same salt and then compare them.
:
: Does the crypt function only work on UNIX, or is there an NT version? (If
: so where can I get it)
http://www.pdv-systeme.de/users/martinv/Crypt.pm
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
VMS is today what | work: mv@pdv-systeme.de
Microsoft wants | http://www.pdv-systeme.de/users/martinv/
Windows NT 8.0 to be! | home: martin@radiogaga.harz.de
------------------------------
Date: Thu, 07 Jan 1999 22:19:48 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Password Encryption
Message-Id: <8qal2.55$FY1.1974@nsw.nnrp.telstra.net>
In article <3693B557.FD97742@cthulhu.demon.nl>,
Erik van Roode <newsposter@cthulhu.demon.nl> writes:
> The point of the crypt function is that encrypting is fast, and decrypting
> takes an awful lot of time. Given enough time (years/centuries/millenia),
> anything can be decrypted.
Not true. hashing algorithms map a large space into a small one. There
is only one way, because you lose information going in that direction.
You can't create information from nothing. And the crypt(2) function
normally uses some hashing algorithm. Decrypting doesn't take a lot of
time, it is just impossible.
Maybe you are talking about 'guessing' the password. Yes, that is
possible, and will take a lot of time, but it is not decrypting.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au |
Commercial Dynamics Pty. Ltd. | 'I hate gramaticle errors!' 'Me to!'
NSW, Australia |
------------------------------
Date: Thu, 07 Jan 1999 20:18:06 GMT
From: bthak@my-dejanews.com
Subject: Re: Perl Criticism
Message-Id: <7734pr$dv4$1@nnrp1.dejanews.com>
In article <369400CD.F5EEFEF4@atrieva.com>,
Jerome O'Neil <jeromeo@atrieva.com> wrote:
> TRG Software wrote:
>
> > By reading your "Story", it's obvious that you have no idea what you're
> > talking about. You want to tell me all the "flaws" in Macromolecular
> > Crystallography that you know about too?
>
> It's too damn hard to spell!
Hard to spell ??? Heck it's hard to say it :)
BT.
Best one liner i can come up with.....
perl -e 'print "Not Yet A Perl Hacker\n";' :)
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 07 Jan 1999 21:43:24 GMT
From: topmind@technologist.com
Subject: Re: Perl Criticism
Message-Id: <7739pr$imi$1@nnrp1.dejanews.com>
In article <3693FC58.948EC9CF@c-zone.net>,
chatmaster@c-zone.net wrote:
> topmind@technologist.com wrote:
> >
> > 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:
>
> <SNIP blah blah blah...>
>
> By reading your "Story", it's obvious that you have no idea what you're
> talking about. You want to tell me all the "flaws" in Macromolecular
> Crystallography that you know about too? Oh wait, that's right, you
> probably don't, but I'm sure you'll point a few things out as well. :-)
> I have a feeling you're trying to impress people by trying to "rebel"
> against something you don't know much about, which has the completely
> opposite result when the people you spew such foolishness to, know
> better.
> You made no points, and it seems you only intended to start a long flame
> thread in this NG.
I made no points??????? I have an 80k webpage and it has no points?
What the fudge are you talking about?
The motivation of the list is to get a decent programming language
that does not have the syntactic abusability of Perl.
My intention is to make a better world, not start flame wars.
> --
> Regards,
> Tim Greer - chatmaster@c-zone.net ....
-tmind-
http://www.geocities.com/SiliconValley/Lab/6888/
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 07 Jan 1999 15:15:57 -0700
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: Perl Criticism
Message-Id: <m3sodmafvm.fsf@moiraine.dimensional.com>
topmind@technologist.com writes:
> Scripting languages are a subset of programming languages. C, C++,
> Pascal, and Java are NOT scripting languages, for example.
Your distinction between scripting and programming languages is
completely artificial and bespeaks a lack of precision in your mental
processes. Please provide some examples of characteristics of
programming languages that Java, C, C++, and Pascal provide but are
not a part of perl or python. Alternatively, you can provide
characteristics of perl or python that cannot be found in Java, C,
C++, or Pascal.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Thu, 07 Jan 1999 22:32:55 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Perl Criticism
Message-Id: <rCal2.61$FY1.1974@nsw.nnrp.telstra.net>
In article <7739gu$ial$1@nnrp1.dejanews.com>,
topmind@technologist.com writes:
> In article <2HRk2.93$5P1.3093@nsw.nnrp.telstra.net>,
> mgjv@comdyn.com.au (Martien Verbruggen) wrote:
>> 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.
>>
>
> I came here to learn about any such alleged inaccuracies. You did not supply
> specifics or details. Your criticism of my article is far worse
> than my criticism of Perl because at least I attempted to give
> specifics.
This discussion about which language is better, and why, has been
here, and on many other language groups so often, that I, and with me
probably many others, are sick of discussing it. We already know
perl's strengths and weaknesses. it's been hashed out in many posts
here. It's been hashed out in other places.
If you had phrased some of your stuff as questions, rather than bold
statements, I might have reacted differently. As it stands, your
article contains many, many inaccuracies, but pretends to be accurate.
And no, I will not go over the single points. Others have done that in
this thread, the documentation of perl will explain it to you, and I
already wasted too much of my time reading it in the first place.
Martien
PS. I take back the 'blatant lies' from my first post. As was pointed
out to me, a person needs to know that they're wrong when telling a
lie, and deliberately still do it. I don't believe that that was the
case or the intention.
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Think of the average person. Half of
Commercial Dynamics Pty. Ltd. | the people out there are dumber.
NSW, Australia |
------------------------------
Date: 7 Jan 1999 16:51:26 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Perl script error problem
Message-Id: <773a8u$7ti@panix.com>
In <369492e1.4206862@news.freeserve.net> John@melon17.freeserve.co.uk (John ) writes:
>As a newbie i wondered if someone
>could tell me why i get the following error:
>Premature end to script?
Run your script with a -w parameter -- Like:
#!/usr/local/bin/perl -w
--
Clay Irving
clay@panix.com
------------------------------
Date: Thu, 7 Jan 1999 20:58:53 +0100
From: "Mads" <maso@int.tele.dk>
Subject: ping script in perl ....where can I get one?
Message-Id: <7733mb$3m5a$2@news-inn.inet.tele.dk>
I've searched and searched, but I can't find a script that can 'ping'. Are
there any of you who knows where I can find a ping script (preferably in
perl)?
Thanks for your help.
/Mads
------------------------------
Date: Thu, 7 Jan 1999 12:36:21 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Randal's code [was Re: How do I delete tmp files based on age?]
Message-Id: <MPG.10febaa3b61a84649898fb@nntp.hpl.hp.com>
In article <m1iueivpae.fsf@halfdome.holdit.com> on 07 Jan 1999 11:47:05
-0800, Randal L. Schwartz <merlyn@stonehenge.com> says...
> >>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:
> Larry> Wouldn't the following be more perspicuous (and perhaps trivially
> Larry> faster):
>
> Larry> unlink grep -A "$dirname/$_" > $hold_time, readdir DIR;
...
> If you don't see from the example, readdir returns FOO, -A is testing
> "that_dir/FOO" (correct), but now you're trying to unlink "FOO" again
> (wrong).
Ouch. Right. Got-myself. Thanks.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 07 Jan 1999 16:28:30 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: Randal's code [was Re: How do I delete tmp files based on age?]
Message-Id: <39lnjercw1.fsf@ibnets.com>
>>>>> "RLS" == Randal L Schwartz <merlyn@stonehenge.com> writes:
>>>>> "Larry" == Larry Rosler <lr@hpl.hp.com> writes:
Larry> Wouldn't the following be more perspicuous (and perhaps trivially
Larry> faster):
Larry> unlink grep -A "$dirname/$_" > $hold_time, readdir DIR;
RLS> Faster in that it'd be deleting files in the current directory instead
RLS> of in $dirname? <grin> No, you just changed functionality there, and
RLS> you broke it.
then it can be fixed with a map before unlink, which may still be
faster since only the files to be unlinked will be passed to map instead
of all the files in dir. but it does 2 interpolations which may lose the
speed gain.
unlink map "$dirname/$_", grep -A "$dirname/$_" > $hold_time, readdir DIR;
or you could just cd there and drop the whole dirname part!
maybe we need something like this (based on the directory stacks of shells):
use pushdir ;
{
pushdir $dirname ;
unlink grep -A > $hold_time, readdir DIR;
}
automatic popd occurs on block exit so we are back to where we were!
uri
--
Uri Guttman Hacking Perl for Ironbridge Networks
uri@sysarch.com uri@ironbridgenetworks.com
------------------------------
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 4574
**************************************