[12506] in Perl-Users-Digest
Perl-Users Digest, Issue: 6106 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 23 09:07:40 1999
Date: Wed, 23 Jun 99 06:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 23 Jun 1999 Volume: 8 Number: 6106
Today's topics:
Re: 2 simple (not to me tho) questions (Bart Lateur)
Re: 2 simple (not to me tho) questions <uri@sysarch.com>
Re: Apache + Perl <fty@utk.edu>
Re: can you split a word into letters? (Michael Stillwell)
Re: CGI Error ? <martin@adoma.se>
Credit Card Validator ? <webmaster@NOSPAMweb-design.org.uk>
Re: Database Manipulation <fty@utk.edu>
dynaloader francesc_guasch@my-deja.com
Re: Help - PERL - DBI install <rereidy@uswest.net>
Help Excel functions to Perl Code <simsiSPAM_ME_NOT@hotmail.com>
Re: how to connect oracle 8 thru perl on NT <rhrh@hotmail.com>
Re: How to start perl server with inetd.. (?) <alex@sea.wa.com>
inheriting Class Data <gernot@cat.at>
Re: inheriting Class Data <tchrist@mox.perl.com>
Re: Newbie- foreach $var (keys %fields) - Outputs in wr <martin@adoma.se>
Re: Newbie- foreach $var (keys %fields) - Outputs in wr <dave@dave.org.uk>
Re: Newbie- foreach $var (keys %fields) - Outputs in wr <khan@arcom.com.au>
NT - Server Up time mirak63@yahoo.com
Re: Perl tutorial <khan@arcom.com.au>
Re: Perl und MS Exchange (M. Berlage)
Re: Problem with DB_File (Anno Siegel)
Re: Summing an array <uri@sysarch.com>
system exec jmtth@my-deja.com
Testing Perl scripts on Win 95/98/NT; and CGI too! <thestarman@NOSPAM.com>
Transparent proxy ? <dr_avalanche1959@yahoo.com>
Variable not imported (Arnaud Limbourg)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 23 Jun 1999 10:11:58 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <3770a74e.2463660@news.skynet.be>
Olivier Dehon [8026867] wrote:
>> They aren't harmless, you know. Double quoted compose a
>> *brand*new*string*. This isn't necessarily what you always want.
>
>What about double-quoted strings where no interpolation is needed?
>Is that a bad practice and should one use single quotes instead?
>
>Or is the perl compiler/interpreter clever enough to not try and
>interpolate a constant string at run-time?
Good question. I remember somebody posting a benchmark comparing speed
of use of single or double quotes, and I think that the speed difference
was around 1%.
But surely, Perl does SOME checking in the string, as it will catch
errors in unbalanced hash braces/array brackets, and syntax errors
inside @{[...]} constructs.
>perl -wce "$_ qq(Some unbalanced $hash{BRACKET)"
syntax error at -e line 1, near "$_ qq(Some unbalanced $hash{BRACKET)"
Missing right bracket at -e line 1, within string
-e had compilation errors.
Surely, it must be able to simply flag "no interpolation necessary", and
optimize?
Bart.
------------------------------
Date: 23 Jun 1999 08:43:58 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: 2 simple (not to me tho) questions
Message-Id: <x7aetr6q9d.fsf@home.sysarch.com>
>>>>> "BL" == Bart Lateur <bart.lateur@skynet.be> writes:
BL> But surely, Perl does SOME checking in the string, as it will catch
BL> errors in unbalanced hash braces/array brackets, and syntax errors
BL> inside @{[...]} constructs.
it is parsed at compile time, not run time. a double quotish string is
converted to a form of join with the elements of the string as args. so
the interpolation is fast and involves no parsing.
i am in the singal quotes to mark no interpolation. i also use '' for
the null string as i have never confused it with one ".
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Wed, 23 Jun 1999 04:27:00 -0400
From: Jay Flahertry <fty@utk.edu>
Subject: Re: Apache + Perl
Message-Id: <37709A54.27F96527@utk.edu>
Jason Reed wrote:
> And don't forget! Next week!
>
> PERL VS. CGI!
>
Which one will be wearing the mask and cape and have a really obnoxious
manager? ;-)
--
Take care of your shoes...jay
fty@utk.edu
------------------------------
Date: 23 Jun 1999 10:20:28 GMT
From: mist@yoyo.cc.monash.edu.au (Michael Stillwell)
Subject: Re: can you split a word into letters?
Message-Id: <slrn7n1d7b.6oq.mist@fangorn.cs.monash.edu.au>
Bart Lateur <bart.lateur@skynet.be> wrote:
: Michael Stillwell wrote:
:
: >: my @a = @_ || ( $_ );
: >
: >For reasons I don't quite understand, this line should be
: >
: > my @a = @_ ? @_ : ( $_ );
:
: Context. || works using scalar context. You can't use @_ both in scalar
: and in list context at the same time, which is what you'd need in order
: to get @_'s elements.
Ah yes---thanks!
: BTW does this indeed allow to change $_? I'd think not.
How about this one:
sub champ {
if (@_) {
local @_ = @_; # comment out to modify parameters
chomp @_;
return wantarray ? @_ : $_[0];
} else {
local $_ = $_; # comment out to modify parameters
chomp;
return $_;
}
}
Although I wouldn't be surprised if there's some flaw in this attempt
too...
Michael
--
.. ABSOLUT .SIG. ..
.. Michael Stillwell ..
.. mist@yoyo.cc.monash.edu.au ..
.. http://yoyo.cc.monash.edu.au/~mist/ ..
------------------------------
Date: Wed, 23 Jun 1999 13:36:37 +0100
From: "Martin Quensel" <martin@adoma.se>
Subject: Re: CGI Error ?
Message-Id: <7kqi26$7ov$1@cubacola.tninet.se>
Mark Stellaard skrev i meddelandet <7kq1r1$qp5$1@tasmania.dev.ict.nl>...
>Hello,
>
>Currently I'am using a CGI script for uploading file's to the server tru a
>HTTP Browser.
>But every time I'am getting the following error:
>
>Premature end of script headers: /home/vdo/cgi-vdo/file-upload.cgi
>Can anybody tell me what's wrong?
Run it from the prompt first.
>If I try another uploading CGI script I get the same error, so it's
unlikely
>to be a error in the script itself, but maybe some error from Apache 1.3.6?
So what is the question doing here in the first place??
Apache comes with a good manual...if you dont have apache on your own
system, download it from www.apache.org
(yes, there is a windows verision) and see the manual or the faq, for
problems related to the server.
>I'am using CGI module 2.53
>Does anybody know's thanx !
>
Good luck
Martin Q
------------------------------
Date: Wed, 23 Jun 1999 11:32:33 +0100
From: "Webmaster" <webmaster@NOSPAMweb-design.org.uk>
Subject: Credit Card Validator ?
Message-Id: <7kqde4$f04$1@times.colloquium.co.uk>
Hi there I'm looking for a Credit Card Validator, that will validate the
card number AND the expiry date.
Matt Script Archive works for the card number but I can't get the fix to
work for the expiry date.
Urgent.
Thanks in advance ;,)
------------------------------
Date: Wed, 23 Jun 1999 04:20:12 -0400
From: Jay Flahertry <fty@utk.edu>
Subject: Re: Database Manipulation
Message-Id: <377098BC.910F2DCF@utk.edu>
paulm@dirigo.com wrote:
> I basically just want the user to click a submit button that takes the
> values they are viewing and puts them into text boxes or form cells.
> Then, they can submit any values they change.
>
> Right now, I have the values formatted to be placed into a table. Can
> I just replace this table with a form and form cells?
>
> I'm not familiar with hashes, (or Perl...this is a learning experience
> :) but I will give it a try.
>
What you are wanting to do is not trivial (not very hard though). From your
above statement though it will be very difficult.
1. You will need to be able to parse form paramaters and create a editable
form on the fly (use CGI.pm).
2. You will need to take the parameters from the editable form and create a
SQL statement to update a database (use DBI.pm)
All this requires the ability to write code. Take baby steps and work your
way through "Learning Perl" before tackling a project. How are you creating
the dynamic the user is viewing in the first place. You say it comes from a
database so I'm assuming there is code involved to extract the data from
the database and dynamically create the page for viewing. You really give
us _very little_ to go on and force us to make assumptions.
--
Take care of your shoes...jay
fty@utk.edu
------------------------------
Date: Wed, 23 Jun 1999 12:31:20 GMT
From: francesc_guasch@my-deja.com
Subject: dynaloader
Message-Id: <7kqk2o$5hg$1@nnrp1.deja.com>
I'm trying to install a module and it complains this way:
install_driver(mysql) failed: Can't load
'../blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: File not
found at /usr/lib/perl5/5.00503/i586-linux/DynaLoader.pm line 169.
Here is my system:
linux-2.2.6
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
GNU ld version 2.9.1 (with BFD 2.9.1.0.19)
perl, version 5.005_03 built for i586-linux
I tried reinstall perl and linux.
The last I've done is format my linux partition and reinstall
everything.
What else can I try ?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 23 Jun 1999 05:31:23 -0600
From: Ron Reidy <rereidy@uswest.net>
Subject: Re: Help - PERL - DBI install
Message-Id: <3770C58B.31BAE943@uswest.net>
johnbishop@my-deja.com wrote:
> We are struggling with the install of DBI 1.08 on AIX on an SP2.
>
> Can someone help me out on this - I'm more of a DBA than UNIX admin.
>
> Has my license expired? Our admin says that the compiler should be
> fine.
>
> Here's the output.
>
> # perl Makefile.PL
> *** Note:
> The optional PlRPC-modules (RPC::PlServer etc) are not installed.
> If you want to use the DBD::Proxy driver and DBI::ProxyServer
> modules, then you'll need to install the RPC::PlServer,
> RPC::PlClient,
> Storable and Net::Daemon modules. The DBI CPAN Bundle may help you.
> You can install them any time after installing the DBI.
> You do *not* need these modules for typical DBI usage.
>
> Optional modules are available from any CPAN mirror, in particular
> http://www.perl.com/CPAN/modules/by-module
> http://www.perl.org/CPAN/modules/by-module
> ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module
>
> Writing Makefile for DBI
>
> Remember to actually *read* the README file!
> Build, TEST and INSTALL Perl 5 first.
> Do NOT build the DBI under the Perl source tree.
> Use 'make test' to execute self tests.
> Use 'make install' to install the DBI and then delete this working
> directory before unpacking and building any DBD::* drivers.
>
> # make
> cc -c -qmaxmem=8192 -D_ALL_SOURCE -D_ANSI_C_SOURCE
> -D_POSIX_SOURCE -I/usr/local/include -O -DVERSION=\"1.08\"
> -DXS_VERSION=\"1.08\" -I/usr/local/lib/perl5/aix/5.00404/CORE
> -DDBI_NO_THREADS Perl.c
> 1506-333 (S) License failure: acquire: No servers available for this
> vendor (network license server/library).
> make: 1254-004 The error code from the last command is 1.
>
> Stop.
>
> Here's our version
>
> # perl -V
>
> Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
> Platform:
> osname=aix, osvers=4.2.1.0, archname=aix
> uname='aix willard 2 4 004246d04c00 '
> hint=recommended, useposix=true, d_sigaction=define
> bincompat3=y useperlio=undef d_sfio=undef
> Compiler:
> cc='cc', optimize='-O', gccversion=
> cppflags='-qmaxmem=8192 -D_ALL_SOURCE -D_ANSI_C_SOURCE
> -D_POSIX_SOURCE -I/usr/local/include'
> ccflags ='-qmaxmem=8192 -D_ALL_SOURCE -D_ANSI_C_SOURCE
> -D_POSIX_SOURCE -I/usr/local/include'
> stdchar='unsigned char', d_stdstdio=define, usevfork=false
> voidflags=15, castflags=1, d_casti32=define, d_castneg=undef
> intsize=4, alignbytes=8, usemymalloc=n, prototype=define
> Linker and Libraries:
> ld='ld', ldflags =' -L/usr/local/lib'
> libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
> libs=-lnsl -ldbm -ldl -lld -lm -lc -lbsd -lPW
> libc=/lib/libc.a, so=a
> useshrplib=false, libperl=libperl.a
> Dynamic Linking:
> dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE:perl.exp'
> cccdlflags=' ', lddlflags='-H512 -T512 -bhalt:4 -bM:SRE
> -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc
> -L/usr/local/lib'
>
> Characteristics of this binary (from libperl):
> Built under aix
> Compiled at May 7 1998 16:01:33
> @INC:
> /usr/local/lib/perl5/aix/5.00404
> /usr/local/lib/perl5
> /usr/local/lib/perl5/site_perl/aix
> /usr/local/lib/perl5/site_perl
>
> Here's my PATH
>
> PATH=/usr/lpp/ssp/rcmd/bin:/bin:/usr/bin:/usr/sbin:/etc:/usr/ucb:/usr/bi
> n/X11:/usr/local/bin:/local/sysadm:/local/bin:.:/usr/lpp/ssp/bin:/usr/lp
> p/ssp/kerberos/bin:/usr/UniInstall/services/bin:/usr/UniInstall/services
> /tools:/usr/UniInstall/agents/bin:/var/ifor:/usr/opt/ifor/ls/conf
>
> Any help is appreciated!
>
> JB
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
#1. Install the other modules listed at the begining og your output.
#2. Your license has expired! Talk to your SYSADMIN about it.
--
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
------------------------------
Date: Wed, 23 Jun 1999 13:09:43 +0100
From: "Simmo" <simsiSPAM_ME_NOT@hotmail.com>
Subject: Help Excel functions to Perl Code
Message-Id: <i94c3.900$KZ2.362834@news.enterprise.net>
Hi,
Has anyone any experience of creating Perl scripts that replicate Excel
functions or know of any resource which provides some help? Found a
spreadsheet::excel module but am not able to install on the server due to
security restrictions.
Many thanks
Ian Sims
simsi@hotmail.com
------------------------------
Date: Wed, 23 Jun 1999 09:40:48 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Re: how to connect oracle 8 thru perl on NT
Message-Id: <37709D8F.180761B2@hotmail.com>
> reference and comments both are welcome :)
> my $field ;
> while (($field) = $cursor->fetchrow_array()) {
comment :-), do you really want to be reading an array into a scalar???
unless of course that was your intention!,
Richard H
------------------------------
Date: Wed, 23 Jun 1999 05:14:42 -0700
From: Alex <alex@sea.wa.com>
To: "Alex G." <alex@sea.wa.com>
Subject: Re: How to start perl server with inetd.. (?)
Message-Id: <3770CFB2.BE9824C4@sea.wa.com>
"Alex G." wrote:
> Hi, could anybody tell me how to install a simple server in inetd.conf.
>
> The server works _alone_ just fine(I can start, and terminate it any
> time)
> However, when inetd is listening on the servers' port, the socket
> wouldn't return,,
> apparently it can't use the port used by inetd ???
> It only works for the first time, when new port is assigned.
> After that, if the process goes away, it can't be started again...
>
> #!/usr/bin/perl -w
> use IO::Socket;
> use Net::hostent;
>
> $PORT = 9000;
>
> $server = IO::Socket::INET->new( Proto => 'tcp',
> LocalPort => $PORT,
> Listen => SOMAXCONN,
> Reuse => 1);
>
> die "can't setup server" unless $server; ##<< and it dies every
> time
> ---------------------------------------------------------------------
> # grep testserver /etc/services
> testserver 9000/tcp # test server
>
> # grep testserver /etc/inetd.conf
> testserver stream tcp nowait root /home/alexg/bin/server
>
> # netstat -a |grep testserver
> tcp 0 0 *:testserver *:*
> LISTEN
>
> Thanks,
> -Alexander.
-------------------------------------------------
OK, I did figure it out after all,,.it's actually much simpler than that.
The services started with inetd don't have sockets AT ALL :-)
The inetd uses its own socket, and forks new process with STDIN and
STDOUT open to the prog. specified in inetd.conf when someone tries to
connect to that port.
So, there's no need to initiate socket or port at all
Just start with:
open(SOCKIN,"-") || &log_and_die();
open(SOCKOUT,">-")|| &log_and_die();
select(IN); $|=1;
select(OUT), $|=1
while(<IN>){ .. do whatever... }
close(IN), close(OUT);
#done :-)
------------------------------
Date: Wed, 23 Jun 1999 13:12:47 +0200
From: Gernot Homma <gernot@cat.at>
Subject: inheriting Class Data
Message-Id: <3770C12F.4EFFC22D@cat.at>
This is a multi-part message in MIME format.
--------------547B312ABEBF5A411AEACC6D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I've defined a class root. In this class i have a class variable called
"table" (a scalar). When I'm deriving some classes from root, I want to
set the class variable "table" for each derived class.
for example:
root - person : table = "person";
root - address : table = "address";
currently I have the following code
package root;
use strict;
my $_TABLE = undef;
sub new {
my $self = {};
bless $self;
$self->{_TABLE} = \$_TABLE;
}
sub table {
my $self = shift;
if (ref $self) {
${$self->{_TABLE}} = shift if @_;
return ${$self->{TABLE}};
}
else {
$_TABLE = shift if @_;
return $_TABLE;
}
}
# -- end of package root
package person;
use bo;
@ISA = qw (root);
person->table("person");
sub new {
... do some stuff;
}
# -- end of package person
package address;
use bo;
@ISA = qw (root);
adress->table("adress");
sub new {
... do some stuff
}
# -- end of package address
In a script I'm using this objects:
use address;
use person;
print address->table . "\n"; # output = "person";
print person->table. "\n"; # output = "person";
It seems that the class data $_TABLE is used from both classes "person"
and "address". Is there a possibility to make this data "private" to the
derived classes ?
--------------547B312ABEBF5A411AEACC6D
Content-Type: text/x-vcard; charset=us-ascii;
name="gernot.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Gernot Homma
Content-Disposition: attachment;
filename="gernot.vcf"
begin:vcard
n:Homma;Gernot
x-mozilla-html:FALSE
org:Cyber-Atelier
adr:;;;Vienna ;;1210;Austria
version:2.1
email;internet:gernot@cat.at
tel;fax:+43 1 272 92 51 9
tel;work:+43 1 272 92 51
x-mozilla-cpt:;0
fn:Homma, Gernot
end:vcard
--------------547B312ABEBF5A411AEACC6D--
------------------------------
Date: 23 Jun 1999 05:41:14 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: inheriting Class Data
Message-Id: <3770c7da@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
Gernot Homma <gernot@cat.at> writes:
:I've defined a class root. In this class i have a class variable called
:"table" (a scalar). When I'm deriving some classes from root, I want to
:set the class variable "table" for each derived class.
Did you read perltootc? Pick a layout format:
http://language.perl.com/misc/perltootc.pod
http://language.perl.com/misc/perltootc.man
http://language.perl.com/misc/perltootc.ps
http://language.perl.com/misc/perltootc.html
http://language.perl.com/misc/perltootc.text
--tom
--
"To avoid criticism, do nothing, say nothing, and be nothing."
--Elbert Hubbard
------------------------------
Date: Wed, 23 Jun 1999 13:28:12 +0100
From: "Martin Quensel" <martin@adoma.se>
Subject: Re: Newbie- foreach $var (keys %fields) - Outputs in wrong order ?????
Message-Id: <7kqhie$7j7$1@cubacola.tninet.se>
Kevin Hancock skrev i meddelandet <377098AC.9F127A45@arcom.com.au>...
>Hi
>
>Tryin g to write my first Perl script and so far so good. everything is
>working OK except the output from "foreach $var (keys %fields)" is not
>in the order the data was added to the array.
what? maybee you should check what a "hash" is and how it works, before
using them in your script
>The data seems to be stored in correct order but "foreach $var (keys
>%fields)" outputs in wrong order?
>
It prints them out just right.
If you want some order, you should try "sort", (perlfunc page....has a good
code snippet on how to sort a hash)
Best regards
Martin Quensel
------------------------------
Date: Wed, 23 Jun 1999 13:35:48 +0100
From: Dave Cross <dave@dave.org.uk>
Subject: Re: Newbie- foreach $var (keys %fields) - Outputs in wrong order ?????
Message-Id: <3770D4A4.E9E0FED2@dave.org.uk>
Kevin Hancock wrote:
>
> Hi
>
> Tryin g to write my first Perl script and so far so good. everything is
> working OK except the output from "foreach $var (keys %fields)" is not
> in the order the data was added to the array.
>
> The data seems to be stored in correct order but "foreach $var (keys
> %fields)" outputs in wrong order?
What makes you think that the data is stored in the correct order? It
almost certainly isn't.
Hashes are by their nature unordered. If you want order, use an array.
hth,
Dave...
------------------------------
Date: Wed, 23 Jun 1999 22:16:25 +0930
From: root <khan@arcom.com.au>
Subject: Re: Newbie- foreach $var (keys %fields) - Outputs in wrong order ?????
Message-Id: <3770D721.8A3ED979@arcom.com.au>
Dave Cross wrote:
> >
> > The data seems to be stored in correct order but "foreach $var (keys
> > %fields)" outputs in wrong order?
>
> What makes you think that the data is stored in the correct order? It
> almost certainly isn't.
>
> Hashes are by their nature unordered. If you want order, use an array.
I am watching the data as it is written to what I thought was an array.
If I am using a hash (array?) then it all becomes clear(er).
Thanks
Kevin
------------------------------
Date: Wed, 23 Jun 1999 12:38:04 GMT
From: mirak63@yahoo.com
Subject: NT - Server Up time
Message-Id: <3770d4bd.174182861@news.mindspring.com>
Hello,
Is there a way in Perl to be able to determine the time
and date that an NT server came up?
Thanks,
Karim Wall
------------------------------
Date: Wed, 23 Jun 1999 22:13:14 +0930
From: root <khan@arcom.com.au>
Subject: Re: Perl tutorial
Message-Id: <3770D662.4EA9598@arcom.com.au>
"Filip M. Gieszczykiewicz" wrote:
>
> In Article <376E8295.52CFD687@technologist.com>, through puissant locution, JDDemme <jddemme@technologist.com> soliloquized:
> >I'm too cheap to buy a perl book, so does anybody know of a really good
> >perl tutorial. More than just CGI and files. more that what
> >www.cgi-101.com has.
>
http://www.itlibrary.com/reference/dir.programminglanguages.perlandcgi1.html
Just the site, better than cheap, books are free.
also www.mcp.com does the same thing.
Cheers
Kevin
------------------------------
Date: Wed, 23 Jun 1999 11:14:49 GMT
From: dniwecniR@ten.atsivatla (M. Berlage)
Subject: Re: Perl und MS Exchange
Message-Id: <3778b982.693630046@newsreader.euronet.nl>
On Fri, 18 Jun 1999 18:27:06 +0200, "dpotocnik" <dpotocnik@access.ch>
wrote:
Answers in english.
>Sehr geehrte Perl Enthusiasten
>
>In meiner Firma mvchte ich sehr gerne meinen Chef
>von Perl |berzeugen. Da er der Meinung ist, dass Perl in einem Unternehmen
>gar keine Verbreitung findet, m|sste ich Ihn vom Gegenteil beindrucken.
>In Zukunft kriegen wir ndmlich einen MS Exchange Server ins Hause, und ich
>denke mir, dass sich mit Perl diesbez|glich sicher was machen ldsst (da ja
>Perl die Nr.1 f|rs Internet ist).
>Meine Frage:
>Kann MS Exchange Server als POP3 Server fungieren ?
Yes. An exchange server with the IMS (Internet mail service) installed
is a fully fledged POP3 & SMTP server.
> Hat jemand unter euch
>schon Erfahrungen in diesem Sinne gesammelt ?
I use several scripts that use our exchange server to automatically
send the reports to a group of people. There are several packages for
this that can be used with ActiveState Perl. (mail::sender) for
example.
>Was ich noch erwdhnen muss ist, dass ich noch fast kein Know - How in Sachen
>Perl besitze.
Then I suggest you start playing around with it. No better way to
learn. :-)
Cheers!
Martijn
------------------------------
Date: 23 Jun 1999 12:37:08 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Problem with DB_File
Message-Id: <7kqkdk$lb1$1@lublin.zrz.tu-berlin.de>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in comp.lang.perl.misc:
>Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote in comp.lang.perl.misc:
>>Well, I'm having a whale ( tr/aew/el/d ) of a time debugging this
>>DB_File application. I'll reproduce a complete demo script at
>
>Well, apparently there is indeed a bug in some versions of Berkeley DB.
>Paul Marquess, whom some of you may know, sent me mail to that effect,
>saying that he could reproduce the buggy behavior with v 1.85, but
>not with 2.7.5. The version I used is 2.0.7, so apparently it was
>fixed some time in between.
>
>So far, I had no luck linking 2.7.5 (available from www.sleepycat.com)
>to perl. The interface has changed and the dbopen function perl
>expects is no longer supported. So I guess I'll have to rebuild
>perl in the bargain. And here I thought dynamic linking was there
>to avoid this sort of thing...
>
>Anno
Umm... following up my own followup to my own article here. Someone
has to keep this thread alive, I guess.
which is gone in 2.7.5. I shall describe how to upgrade to DB_File
2.7.5. That's all there is below.
The upgrade isn't hard, but isn't trivial either, so I guess it
bears a description. The details below pertain to linux (2.0.36,
if it matters), but should apply to other systems with varying
degrees of applicability.
You'll need a perl source (from any CPAN site near you) and the source
for Berkeley DB 2.7.5 (from www.sleepycat.com). Then, put in a nutshell,
you'll have to replace /usr/include/db.h and /lib/libdb.so.2 with the
new versions and rebuild perl.
Unpack and build Berkeley DB. As usual, this involves a configure
and a make, executed, in this case, in the subdirectory build_unix of
db-2.7.5. You don't have to install Berkeley DB if you only want
to use it with perl; the standard installation puts everything
into /usr/local/BerkeleyDB, which won't be recognized by the perl
build. Instead, replace (that is, of course, save the old version
and replace) /usr/include/db.h with ...db-2.7.5/build_unix/db.h.
Do *not* use ...db-2.7.5/include/db.h, this is a template from
which the real thing is made and doesn't work as an include file.
Next you must build a shared library to use with perl. The
BerkeleyDB distribution doesn't do that for you, but it comes
with instructions how to build one using gcc (and also for HP/UX).
Otherwise, you're on your own. If you follow the instructions,
you'll have libdb.so in ...db-2.7.5/build_shlib. Replace (with
the same caveat as above) /lib/libdb.so.2 with that. If your
libdb.so is somewhere else, or named differently, you can use
ldd `which perl` to find out where perl expects to find libdb.so.
Now rebuild perl. If you have built perl before, you can save
time by going into ...perl5.00_?_??/ext/DB_File and do a
make clean there. At least this should work... I typed
make clean in the wrong directory at this point and had to build
from scratch.
Perl will now use 2.7.5 for DB_File. There seems to be a noticeable
loss in performance involved, one particular run used to take 260
seconds and now takes 363. Then again, it's easy to be fast if
you don't do things right.
Anno
------------------------------
Date: 23 Jun 1999 08:34:45 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Summing an array
Message-Id: <x7d7yn6qoq.fsf@home.sysarch.com>
>>>>> "A" == Abigail <abigail@delanet.com> writes:
A> James Stewart (james@britlinks.co.uk) wrote on MMCXXI September MCMXCIII
A> in <URL:news:ant2219160e6Lh==@ch0128.charis.co.uk>:
A> '' Just wondering how to find the sum of all the elements of an array. A
A> '' look through the FAQs doesn't yield an answer. I guess I could do it with
A> '' a loop, but I'm guessing there's a more elegant solution.
A> $sum = do {local $" = "+"; eval "@array"}; # Do you see a loop here?
yes. in the stringifying of @array. as mjd said there is a loop somewhere.
yapc bound, so no replies necessary.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Wed, 23 Jun 1999 10:22:34 GMT
From: jmtth@my-deja.com
Subject: system exec
Message-Id: <7kqch5$3b7$1@nnrp1.deja.com>
Hi,
>From my perl script I want to execute a batch file (mybat.bat) which set
environnement's variables.
At the end of batch's execution ; perl script must know those variables.
The System statement make a fork(), so I can't use it ; the Exec
statement finish the perl script, as a result what is after the exec
isn't compute.
How can I execute my batch in the script's process and in order to don't
shortcut the end of the script ?
here, part of my script :
$exe= $ENV{TODAY.DATE};
$exe .='env.bat';
exec $exe;
print $ENV{TODAY.TAPE}; # not executed
print $ENV{TODAY.DATE}; # not executed
Thanks.
JMG.
--
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Wed, 23 Jun 1999 04:05:46 -0700
From: "The Starman" <thestarman@NOSPAM.com>
Subject: Testing Perl scripts on Win 95/98/NT; and CGI too!
Message-Id: <le3c3.2358$Er1.38818@news2.randori.com>
>ivanwalsh@my-deja.com wrote:
>> but if I want to install Linux or Apache, do I
>> have to uninstall Windows 98. Somehow I was under
>> the impression that you could not have Win98 and
>> Linux on the same workstation.
>> My aim being also to test Perl files.
<SNIP>
>Well, you don't need Linux. You can get a Win32 version of Apache, a
>Win32 version of Perl and run them fine. Of course there's the problem
>where Windows can't perform some Unix system calls (but just don't use
>them), and you are able to test pretty much all scripts on your own PC.
>However, since you said that you were trying to get a mail program
>running, you might have to install "blat".
>should be able to run most things on your Win98 with ActivePerl
>(www.activestate.com) and Apache (www.apache.org).
>--
>Regards,
>Tim Greer
Tim,
As far as testing _simple_ perl .pl scripts (those that would only
interact with PERL.EXE and your STDIN STDOUT operating system
devices, etc.), I see no reason to plunk down mucho bucks when one
may only be interested in supplementing your learning at home!
The Win32 "port" of perl.exe (downloadable as a binary file in the
Win32 CPAN distribution) appears to be working just fine for me. I do,
however, wish that the Win32 perl FAQ was still available; I've never
even seen it -- the link has been dead for some time now; I'm somewhat
new to perl myself :-).
I have nothing against the very fine work of the Apache people
either,
BUT there is no need to spend all the time downloading a 3 MEGABYTE
file plus reading all of the documentation it takes to set up such a
server...
I ALSO DON'T like all of those disclaimers about how you may have
many problems with it stability on a Win32 system!
If you simply want to test out some CGI-scripts without going thru the
hassle of getting online and doing the FTP/Telnet stuff to some remote
server, then I'd highly recommend a fast little (and still free for the
non-commercial version) server called XITAMI (from IMATIX):
http://www.xitami.com/download.htm .
It comes as either a Windows (icon in taskbar) or DOS-window
("console") version; plus NT, OS/2, UNIX (many), even back to Win3.x.
I like the console version (762 KB for the whole distribution package).
This will do both HTTP and FTP on any port number; very stable.
I have been able to test guestbook cgi-bin perl scripts, for
example,
with no problems at all using this combination of Win32perl and xitami.
(Note: Some dial-up ISPs block all incoming HTTP/FTP access to your
Net connection. If yours doesn't, then you could have a friend connect
to your IP# and test your cgi-scripts remotely too.)
I have STARTED what I hope will be an easy to follow set of steps for
installing the perl executable on a Windows(tm) 95 machine at :
http://www.pe.net/~jsedory/ . I'm trying to make it possible for a
person
with NO former knowledge of perl to come here and get perl running
on their machine ready for them to begin learning the language with an
online tutorial, perhaps as soon as the next night.
The Starman.
------------------------------
Date: Wed, 23 Jun 1999 13:40:52 +0200
From: Anders Johansson <dr_avalanche1959@yahoo.com>
Subject: Transparent proxy ?
Message-Id: <3770C7C4.9E5C99C4@yahoo.com>
Hi!
I'm trying to make a queued entry to
a videoserver.
ID for each caller is to be given by
either hidden values(Forms) or cookies
(other suggestions are welcome)
The proxy must be transparent and
when the caller is in the conection is
streaming. Time is limited if there
exists a queue, but when I've opened a
connection to the caller how do I check
the time on?
pause every 10000 bytes and check time ?
really unsure how to
do this....
------------------------------
Date: Wed, 23 Jun 1999 10:17:42 GMT
From: haytounet@my-dejanews.com (Arnaud Limbourg)
Subject: Variable not imported
Message-Id: <3770b402.12243105@news.bull.fr>
Hello,
i define this variable:
$mail_command = "$dosmail_path$dosmail_prog -C \"-sOUR TEST MESSAGE
SUBJECT\" -f$mail_from $mail_to $dosmail_path/$nom";
Then i call it with:
system ("$mail_command");
but i get an variable not imported error.
Where did i go wrong ?
------------------------------
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 6106
**************************************