[8753] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2370 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 21 17:07:27 1998

Date: Tue, 21 Apr 98 14:00:30 -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           Tue, 21 Apr 1998     Volume: 8 Number: 2370

Today's topics:
    Re: 2 newbie questions <merlyn@stonehenge.com>
        AS ISAPI REL316 Problems <effad@comet.cmis.abbott.com>
    Re: Beep to another NT-workstation (Vincent Veeger)
        Command line instructions don't execute in Win95 <due@discovernet.net>
    Re: Command line instructions don't execute in Win95 <due@discovernet.net>
        db_phone.pl in Shishir Gundavarams book CGI Programming <ceedeg2@cee.hw.ac.uk>
        Getting rid of the DOS console window when running a Pe <brhess@email.msn.com>
        How to create a new file? <eugene@psy.nsu.ru>
    Re: newbie trying to close off a pipe (Kenneth Herron)
    Re: Pattern Matching on HighBit Characters (John Moreno)
        Perl and MVS - how to? <cjensen4@csc.com>
        perl modules for win nt? <mehta@mama.indstate.edu>
    Re: Perl on NT IIS3 and Frontpage (Includes?) scott@softbase.com
    Re: perltoot, clarification, please (Greg Bacon)
        Q: Simple RegExp match help required... (jules)
    Re: Regexp question <merlyn@stonehenge.com>
        Sendmail Attach <grupo@nevado.cui.edu.co>
    Re: spoiled noobie (Kevin Reid)
    Re: spoiled noobie <ljz@asfast.com>
        Sprite <rwoods@express-news.net>
    Re: suggested research methods? <jdporter@min.net>
        Symbolic ref and angle opeator <hex@voicenet.com>
        Time : Year2000 & 2038 code question (Tony Moran)
    Re: UNIX mail script <jamesr@aethos.co.uk.nospam>
    Re: VB DLL and Perl scott@softbase.com
    Re: Wanna laugh? (My First cgi.pm Script) <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 21 Apr 1998 13:08:32 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: alecler@cam.org (Andre L.)
Subject: Re: 2 newbie questions
Message-Id: <8cu37n491w.fsf@gadget.cscaper.com>

>>>>> "Andre" == Andre L <alecler@cam.org> writes:

Andre> "I apologize to the group for answering this question despite the fact
Andre> that my name is not Tom Phoenix or Randall Schwartz."

And neither is mine.

:-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 133 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Tue, 21 Apr 1998 14:42:59 -0500
From: "David J. Effa" <effad@comet.cmis.abbott.com>
Subject: AS ISAPI REL316 Problems
Message-Id: <6hiss2$3ha1@news.abbott.com>

I am using the latest AS Release 316 port of Perl and PerlIS.  I am using a
Perl script under Perlis.dll with WebSite Pro V2.2.2 and I get this error
logged to the web site server.log file every time I access a Perl script
that is using CGI.PM:

    ISAPI DLL C:\WebSite\perl5\bin\Perlis.dll returned error, logged ""
    ISAPI DLL C:\WebSite\perl5\bin\Perlis.dll returned error, logged ""
    ISAPI DLL C:\WebSite\perl5\bin\Perlis.dll returned error, logged ""

The script runs correctly though but that server log file fills up fast!

Has anyone now the cause of this?

Dave Effa
Abbott Labs





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

Date: Tue, 21 Apr 1998 11:33:39 GMT
From: veeger@iaehv.nl (Vincent Veeger)
Subject: Re: Beep to another NT-workstation
Message-Id: <353c820c.16752158@news.iaehv.nl>

On Tue, 21 Apr 1998 10:24:25 GMT, Brent Michalski <perlguy@inlink.com>
wrote:

>Have you tried:
>`net send <username> beep`;
>or you could try:
>$command="net send <username> beep;
>system($command);

>If you can type it on the command-line, you can usually do the same
>thing with the ` `'s

Hi Brent,

I'm afraid my question was not clear, net send <username> <text> works
perfectly from the command line, generating a BEEP-Tone AND the
message "text" at the receivers end, but I would like to generate a
BEEP-tone at another WS without the popup-message the NET SEND-command
generates.

Regards,

Vincent Veeger



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

Date: 21 Apr 1998 12:56:51 GMT
From: "Allan M. Due" <due@discovernet.net>
Subject: Command line instructions don't execute in Win95
Message-Id: <6hi52j$qat$0@206.165.146.159>

Hi Folks,

    I blame this on Abigail <grin>.  I am in the process of learning Perl
and have been lurking on the Newsgroup for few weeks.  I became curious
about the SIGs that Abigail and others use and I have been trying to get
them to execute running Perl under Win95 (ActiveState version, build 316)
and for some reason they won't run.  For example, if I enter the following
at the UNIX (system at school) prompt:

perl -e 'print "JaPHW\n";'

It runs fine but if I enter the same commands at the Dos prompt (home) I
receive the following error message:

Can't find string terminator "'" anywhere before EOF at -e line 1.

    Kind of an obscure problem, but it is bugging me.  I have read through
perlrun and have tried searching for other reports of this problem and I
find none so I figure it must be me.  Any help or info would be appreciated.

--
Allan M. Due
Due@discovernet.net
Due@WhiteCrow.net
Due@murray.fordham.edu

"There are two major products that come out of Berkeley: LSD and UNIX. We
don't believe this to be a coincidence."
-Jeremy S. Anderson




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

Date: 21 Apr 1998 13:16:08 GMT
From: "Allan M. Due" <due@discovernet.net>
Subject: Re: Command line instructions don't execute in Win95
Message-Id: <6hi66o$sb4$0@206.165.146.159>

Hi Folks,

    Sorry to reply to myself.  Apparently the best way to solve a problem is
to post it to the newsgroup and and then the solution will magically pop
into your head.  Just so you can embarras yourself twice.  First by posting
the question, and then having to reply to yourself.  It turns out that
using:

perl -e "print 'JaPHW';"

works just fine under win95.  However, I would still like to understand why
this is different.  Again, sorry for the double post.

AmD




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

Date: Tue, 21 Apr 1998 10:43:41 GMT
From: Dan Gray <ceedeg2@cee.hw.ac.uk>
Subject: db_phone.pl in Shishir Gundavarams book CGI Programming.
Message-Id: <Pine.SGI.3.95.980421113939.4078A-100000@ninmu>

Has anyone got this to work?

The working demo on the oreilly web-site works, but the example program I
downloaded from the site (which matches the book exactly) only gives the
headings for the database and then returns "Array(" below (an example can
be seen at http://www.cee.hw.ac.uk/cgi-bin/phone_form.html)

 If anyone could send me a working source I would really appreciate it.

 Dan.

============================================
Dan Gray
3rd year BSc Comp Sci, Heriot-Watt University
ceedeg2@cee.hw.ac.uk
- Hiking - Mountain Biking - Running -
"Living on dreams and custard creams!"



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

Date: Tue, 21 Apr 1998 08:44:15 -0400
From: "Bill Hess" <brhess@email.msn.com>
Subject: Getting rid of the DOS console window when running a Perl program
Message-Id: <OQZGWQSb9GA.148@upnetnews03>

I am running Perl 5.004_04 on WinNT/Win95 and I need to run a Perl Program
with no DOS Console window popping up - how can I do this???

Bill Hess
brhess@msn.com




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

Date: Tue, 21 Apr 1998 18:50:54 +0600
From: Eugene Gorlov <eugene@psy.nsu.ru>
Subject: How to create a new file?
Message-Id: <353C962A.90077295@psy.nsu.ru>

I need to create a new file on the disk. How can I do it
using Perl?

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

E-mail: eugene@psy.nsu.ru
Euge



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

Date: 21 Apr 1998 19:52:40 GMT
From: kherron@campus.mci.net (Kenneth Herron)
Subject: Re: newbie trying to close off a pipe
Message-Id: <6hite8$3dq$1@news.campus.mci.net>

In article <353B7720.8F8B2DE3@maths.warwick.ac.uk>,
David Epstein  <dbae@maths.warwick.ac.uk> wrote:
|open(SENDMAIL,"|/usr/lib/sendmail -t") or die etc;
|print SENDMAIL $various;
|close SENDMAIL;# BUT it refuses to close.
|
|There may be a sendmail flag which will do the job, but I'm trying to
|learn perl, not sendmail, so I would welcome a general solution, which
|would work with commands other than sendmail.

As you suspect, the problem is that sendmail doesn't exit as soon as
its input pipe is closed (in fact, it's probably trying to deliver the
message).  There *is* a sendmail flag to change this ("-odq" or
"-odb"), but the fundamental problem here is that waiting for the child
is part and parcel of using open() for pipes.

Someone else suggested the perlipc document, but it doesn't appear to
cover (IMHO) the most straightforward solution:  Forget using open();
build the pipe with pipe(), then do your own fork() and exec() to start
the subprocess.  When you're done writing to the pipe just close it;
this won't hang because perl won't implicitly wait on the subprocess.


	pipe IN, OUT;
	if (undef == ($pid = fork)) {
		die "Can't fork";
	}
	elsif (0 == $pid) {
		close OUT;
		open STDIN, "<&IN";
		exec '/usr/lib/sendmail', '-t' or die "Can't exec";
	}
	close IN;
	print OUT "From: <make@money.fast>\n";
	print OUT "Subject: Make Money Fast!\n";
	...
	close OUT;

This will leave the child sitting around as a zombie, so if the parent
program isn't going to exit soon afterwards (e.g., it's a
constantly-running process) you should harvest the child sooner or
later with wait().
-- 
Kenneth Herron -- kherron@campus.mci.net
"When Microsoft first took control of the Funk & Wagnalls Encyclopedia
product, there was a flattering biography of Bill Gates.  But it said he
was known as a tough competitor.  Now it says that he's known for his
charitable contributions." -- Gary Reback, <http://www.ljx.com/reback/>


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

Date: Tue, 21 Apr 1998 19:49:28 GMT
From: phenix@interpath.com (John Moreno)
Subject: Re: Pattern Matching on HighBit Characters
Message-Id: <1d7uedf.1wvci951ae0kxfN@roxboro0-025.dyn.interpath.net>

Holly Sommer <hsommer@micro.ti.com> wrote:

> At least, I *think* that is what the problem is.
> 
> I have a textfile which is full of junk, and I want to
> strip out the junk. Simple s/<junk>//g , you'd think, except
> that the junk I want to strip out starts with what *LOOKS*
> like a Capital-A-accent with the accent that goes up and
> to the right (not sure what the proper word for that character
> is). 
> 
> I emailed this question to a listserv, and the junk that I
> pasted into my mailer came out as a bunch of `=E0=E00=E00=E000
> looking junk, which is considerably different from the 
> HHCapital-A-accented stuff I copied and pasted. In fact, when
> I paste it here in this post, the junk comes out as just
> zeroes, so...
> 
> How the heck do I get a pattern match on this?

Do a hex or octal range search.

This strips out all of the low values characters (tabs, returns, that
kinda junk) you'll have to adjust it:

$test = "this is a \t test \n for low value chars";

$test =~ s/[\x0-\x1f]//g;

print $test;

-- 
John Moreno


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

Date: Tue, 21 Apr 1998 14:26:28 +0200
From: Christian Bastholm Jensen <cjensen4@csc.com>
Subject: Perl and MVS - how to?
Message-Id: <353C9074.752E8B72@csc.dk>

I want to use perl on an mvs to access a DB2 database. I have no
previous experince with mvs, so I have been looking for info on how to
integrate perl with mvs, but I haven't been able to find any.

I have found the modules to use (DBD::DB2) to do it, but I want to know
more about how Perl and MVS work together, and how much of the UNIX core
functionality there is available in the MVS ported distributuion of
Perl.

I have experience using perl on unix and windows, but thats a different
world all togehter!

Where can I get this info, all help will be greatly appreciated.

Thanx,

Christian Bastholm

"Outside of a dog, a book is man's best friend; inside of a dog it's to
dark to read".


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

Date: Mon, 20 Apr 1998 23:25:39 -0500
From: Miten S Mehta <mehta@mama.indstate.edu>
To: Miten S Mehta <mehta@mama.indstate.edu>
Subject: perl modules for win nt?
Message-Id: <Pine.LNX.3.96.980420232406.23313A-100000@mama.indstate.edu>

4/20/98

Hello,

I have bin for perl for nt and atlest works for hello world.  I want to
have the modules too.  where do I get them? how do I use them?

Thank you.







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

Date: 21 Apr 1998 12:07:10 GMT
From: scott@softbase.com
Subject: Re: Perl on NT IIS3 and Frontpage (Includes?)
Message-Id: <6hi25e$gsv$2@mainsrv.main.nc.us>

Jonathan Senkerik (jonathans@tecsys.comNO_SPAM) wrote:

>   How do I include a perl script in my Frontpage web?

The last time I investigated the issue, IIS and its PWS 
derivative did not support server-side includes like the
NCSA and Apache servers do. You can't run a script and have
its output appear "inline" as part of the HTML text. With
IIS 4, for all I know this could have changed, but with
Microsoft's ASP technologies, I doubt it.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: 21 Apr 1998 19:37:23 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: perltoot, clarification, please
Message-Id: <6hishj$6rg$1@info.uah.edu>

In article <Pine.A41.3.96.980421135520.53384D-100000@ginger.libs.uga.edu>,
	Brad Baxter <bmb@ginger.libs.uga.edu> writes:
: If I could, I'd like a bit of an explanation as to what the following line
: of code is doing: (in the section, Inherited Autoloaded Data Methods)
: 
:     @{$self}{keys %fields} = values %fields;

It's a hash slice assignment.  You (and perl) know this because:

 o $self is a reference to a hash
 o The leading `@' tells you what is being wrung out of the left-hand
   side.  (Think ``these'' when you see a `@').

The reason Tom didn't write C<%$self = %fields> is because that would
have discarded the other key/value pairs that may have already been
in $self's thingy.

The perlref manpage talks all about references and squeezing cheese out
of rocks. :-)

Greg
-- 
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF


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

Date: Tue, 21 Apr 1998 19:38:00 GMT
From: jules@jules.mangled.com (jules)
Subject: Q: Simple RegExp match help required...
Message-Id: <6hisjv$fh3$1@gte1.gte.net>

Good afternoon.

I have (what I'm sure is) a very simple RegExp problem and there's a couple
of possible things standing in the way of my expression from working:

	1. I'm stupid.
	
	2. I'm new to Perl.

For right now I'm going to assume it's the latter. I'm trying to find lines
like this in a text file:

	...
	From ???@??? Tue May 14 07:26:36 1996
	...
	From ???@??? Tue May 14 07:26:38 1996
	...
	From ???@??? Tue May 21 17:21:46 1996
	...
	From ???@??? Fri Sep 29 20:44:48 1995
	...
	And so on...

Here's the line in my script that's giving me grief:

	if ( $line = /^From \?\?\?\@\?\?\? */ ) {

I'm reading that as "if $line equals a start of line, a space, three escaped
question marks, escaped at sign, three more escaped question marks, a space,
a wild card to catch everything else on the line"

Doesn't catch anything.

Interestingly I can get it to work with

	if ( $line =~ /From \?\?\?\@\?\?\? */ ) {

Where am I screwing up? And, so I can learn from this, why am I screwing up?

Thanks!

----------------------------------------------------------------
As you can see, I've mangled my email address to avoid spam from 
the bandwidth sucking scumbags that make your average ambulance 
chaser look like the pope.
----------------------------------------------------------------



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

Date: Tue, 21 Apr 1998 13:07:02 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
To: rjk@coos.dartmouth.edu
Subject: Re: Regexp question
Message-Id: <8cyawz494e.fsf@gadget.cscaper.com>

>>>>> "Ronald" == Ronald J Kimball <rjk@coos.dartmouth.edu> writes:

Ronald> Larry Rosler wrote:
>> 
>> A.P. wrote in message <353B8BD5.E20015D3@apdo.com>...
>> >
>> >/(^|\s)(\S+)(\s+\2)+(\s|$)/
>> 
>> As the book says, these subexpressions ensure that the stuff inbetween
>> is contained within word boundaries.  Later you will meet that idea
>> expressed more straigntforwardly as \b.

Ronald> As Ilya already pointed out, \b matches between \w and \W, not
Ronald> \s and \S.  Hence the use of (^|\s) and (\s|$) in the regex.

And in fact, I deliberately constructed the question in such a way
that *any* use of \b was wrong.  This comes up when I'm teaching this
section, and the answer is usually first puzzling, then enlightening,
to the class.  Makes me look a bit clever as well.  Nothing wrong with
that. :-)

print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,990.69 collected, $186,159.85 spent; just 133 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Tue, 21 Apr 1998 07:54:09 -0500
From: "InterRed" <grupo@nevado.cui.edu.co>
Subject: Sendmail Attach
Message-Id: <6hh1j9$6in1@ibague.cetcol.net.co>

How can I send email with attach!...

thanks!




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

Date: Tue, 21 Apr 1998 08:35:15 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: spoiled noobie
Message-Id: <1d7t3l7.1po95cu1m0v6gwN@slip166-72-108-158.ny.us.ibm.net>

Sahagian <sahagian@ziplink.net> wrote:

> I grew up? with the trim() function which returns a string with the
> leading and the trailing space-chars removed.
> 
> Any elegant way to do this in PERL5 ?  Thanks. -dvs-

$var =~ s/^\s*([^ ]*)\s*$/$1/;

That's about as elegant as it gets.

This will delete any kind of whitespace. If you want to delete only
spaces, use:
$var =~ s/^ *([^ ]*) *$/$1/;

You could do this:

sub trim ($) {
  my $str = shift;
  $str =~ s/^\s*([^ ]*)\s*$/$1/;
  return $str;
}

$out = trim $in;

-- 
  Kevin Reid.      |         Macintosh.
   "I'm me."       |      Think different.


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

Date: 21 Apr 1998 09:16:02 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: spoiled noobie
Message-Id: <ltwwcjqprh.fsf@asfast.com>

kpreid@ibm.net (Kevin Reid) writes:

> Sahagian <sahagian@ziplink.net> wrote:
> 
> > I grew up? with the trim() function which returns a string with the
> > leading and the trailing space-chars removed.
> > 
> > Any elegant way to do this in PERL5 ?  Thanks. -dvs-
> 
> $var =~ s/^\s*([^ ]*)\s*$/$1/;
> 
> That's about as elegant as it gets.

I'm sorry to interject here, but the above regexp will not work to
remove leading and trailing white space from the following string, or
any string which contains embedded white space:

   $var = "   abc  def   ";

The following regexp will work just fine for that, however:

   $var =~ s/^\s*(.*?)\s*$/$1/;

And as was mentioned here recently, the following two-expression
syntax would run faster:

   $var =~ s/^\s+//;
   $var =~ s/\s+$//;

> [ ... ]

-- 
 Lloyd Zusman
 ljz@asfast.com

perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'


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

Date: Tue, 21 Apr 1998 07:35:13 -0500
From: Ron Woods <rwoods@express-news.net>
Subject: Sprite
Message-Id: <353C9281.28EA8434@express-news.net>

Is there a NT version of Sprite? I've found the Sprite download files;
but they create unix executables. How do I get the NT executables? Or do
they exist?

Thanks


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

Date: Tue, 21 Apr 1998 13:22:45 GMT
From: John Porter <jdporter@min.net>
Subject: Re: suggested research methods?
Message-Id: <353C9F27.1E43@min.net>

Bill 'Sneex' Jones wrote:
> 
> John Porter wrote:
> 
> > With all due respect to Jon, this suffers the same problems as
> > printing out the CPAN long listing yourself. It's not quite as
> > bad, since it includes short usage statements.
> 
> Jon didn't place the ENTIRE book on-line did he?

No, but all the modules along with all their docs (such as they are)
are on-line by nature.

John Porter


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

Date: Tue, 21 Apr 1998 13:05:18 GMT
From: Matt Knecht <hex@voicenet.com>
Subject: Symbolic ref and angle opeator
Message-Id: <iQ0%.714$D13.4738127@news3.voicenet.com>

I'm having a problem trying to get a symbolic reference to work with
the angle operator.  I've bolied my code down to this:

#!/usr/local/bin/perl -w
#use strict;	# Can't use strict with symoblic refs

local ($fh, $fname, $filehandle, %files, $line);

$fh = 'something';
$fname = '/tmp/junkfile';

open($fh, $fname) or die "fooey: $!\n";

${$files{'file1'}}{'filehandle'} = $fh;
$filehandle = $fh;

$line = <${$files{file1}}{filehandle}>;
print "hash of hash: $line\n";

$line = <$filehandle>;
print "scalar: $line\n";

close($fh);


Setting $filehandle=to$fh works perfectly.  Setting the hash of hash
does not dereference the symbolic reference.  It just prints out
"something" without the <>, too.  I've tried various ways to express
the hash of hashes.  All fail in compile except this syntax.  Here are
some other things that fail:

$line = <$files{file1}->{filehandle}>; #With or without quotes on barewords

produces:
Can't use subscript on glob at /db/hex/bin/ftest line 13, near "'filehandle'}"
syntax error at /db/hex/bin/ftest line 13, near ">;"

As far as I can tell, this isn't a syntax error (The same construct works
perfectly well when assigning data, or printing data, just not with
files).

$line = <${files{'file1'}->{'filehandle'}}>;
Missing right bracket at /db/hex/bin/ftest line 26, within string

Which, AFAIK, is just plain wrong.  There are no brackets missing there.
That line works perfectly well anywhere else that isn't in an angle
operator.

I'd really like to get this working.  It would be very handy to have a
hash of hases that can each hold their own file pointer.  Any advice is
welcome.

Here is some system information from where I have this running:

This is perl, version 5.004_04 built for sun4-solaris
gcc version 2.7.2.3
SunOS auth2 5.6 Generic sun4m sparc SUNW,SPARCstation-20

-- 
Matt Knecht <hex@voicenet.com>  -  The official Minister of Redundancy Minister
                                   of the next millenium!


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

Date: 21 Apr 1998 13:11:20 GMT
From: tmoran@iol.ie (Tony Moran)
Subject: Time : Year2000 & 2038 code question
Message-Id: <6hi5to$5fd$2@news1.news.iol.ie>

Hi, in reviewing perl code for compliancy, I came across this in 
a function that calls localtime() and then does: 

 $year += ($year < 70) ? 2000 : 1900; 

I know the below is right, 

  $four_digit_year = 1900 + $year; 

but why would the  author of the first line of code 
want to add back 2000 on to the integer returned 
by localtime(). 

What could cause that integer to possibly be lower 
than 70 in the first place ? 

I think, that the code was originally written for the 
Wintel platform, if that might have some bearing.. 

If you have any suggestions, I'd really appreciate it.. 


Many thanks,   Tony.
-- 










=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| He who will not reason, is a bigot; he who cannot is a fool;            |
| and he who dares not is a slave.                                        |
|                                                     -= TonY =-          |
|     <tmoran@iol.ie>        Dublin, Ireland                              |
++*%$%*+-+*%$%*+-+*%$%*+-+*%$%*+-+*%$%*+-+*%$%*+-+*%$%*+-+*%$%*+-+*%$%*+-++


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

Date: 21 Apr 98 12:00:24 GMT
From: "James Richardson" <jamesr@aethos.co.uk.nospam>
Subject: Re: UNIX mail script
Message-Id: <01bd6d1e$7ca0c780$26c0a4c1@kitkat.aethos.co.uk>

plambert$1@plambert.org wrote in article
<6hgcci$mch$2@nntp1.ba.best.com>...
> anpap@usa.net spewed:
> > I need a Unix (or perl) cgi script that will enable me to
> > send mail without a mail client.
> > I have tried telneting on port 25 from within a shell cgi
> > script, but it didn't work.
> > Anyone has a script that works??
> 
> Wow.  I don't think anyone has _ever_ tried to do this before.  If this
> were a simple and common question (like "I can't get perl 5.004 to
compile
[absolute complete rubbish cut]
> But no, I don't think anyone has ever done this before.  You're probably
> on your own.
> 

Well, mail is not called SMTP for nothing, it is actually very easy to get
mail sent without having a mail program.
The first thing to get is the address of a mail server that 'knows' how to
send mail to everybody you want to send mail to...
The actual process of sending mail goes like this:

HELO <your host name>
MAIL FROM:<you@home>
RCPT TO: <somebody@somewhere>
DATA
Your email goes here
and so on
and so on
until a line with a dot. on its own.
 .

(Which is of couse all documented in RFC 821)

Anyway, using telnet wont work... cos you can't simply pipe stuff into
telnet.

So...... why not just use the SMTP module. (its part of the libnet bundle
on CPAN)

James



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

Date: 21 Apr 1998 12:13:52 GMT
From: scott@softbase.com
Subject: Re: VB DLL and Perl
Message-Id: <6hi2i0$gsv$3@mainsrv.main.nc.us>

Steve (TC100@t-online.de) wrote:
> I wrote a xxx.DLL in Visual Basic. Now I have  to use this program for
> my server. ..... I must open
> the xxx.dll, an then I need the access to the methods an objects
> defined in the xxx.dll.

You need to make the DLL an ActiveX object that supports Automation.
I'm not a VB expert by any means, but it looks like VB can do this.

An Automation server is the only type of Win32 DLL a Win32 Perl program
can call at runtime. In fact, short of spawning another EXE, it's the
only kind of anything Perl can use at runtime. There is no mechanism
for accessing an arbitrary DLL (unless you create a custom version of
Perl using the extension capabilities).

Creating a Perl extension to call a VB DLL would be more painful
than creating an Automation server in VB. You'd have to translate
the Perl data types into VB ones and vice versa.

> Sorry about the bad english.

Actually, your "bad english" was clearer than most posts I have
seen. At least you explained the problem.

Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more. 


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

Date: Tue, 21 Apr 1998 06:18:24 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Wanna laugh? (My First cgi.pm Script)
Message-Id: <6hi6ah$bd1@bgtnsc03.worldnet.att.net>


Tad McClellan wrote in message <6kogh6.im2.ln@localhost>...
>Michael J Gebis (gebis@albrecht.ecn.purdue.edu) wrote:
>: wsmith@NOSPAM.ctron.com (Will Smith) writes:
>
>: }On Fri, 17 Apr 1998 12:12:58 GMT, John Porter <jdporter@min.net>
>: }wrote:
>
>: }|>> TANSTAAFL.  FNORD. :)


I knew it. The Illuminati are behind Perl. (One could easily make a case
for Larry being Illuminated, but that's a subject for another day.) On
the other hand, by definition, the Illuminati are behind everything
fnord.




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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

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