[6758] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 383 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 28 01:07:25 1997

Date: Sun, 27 Apr 97 22:00:24 -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           Sun, 27 Apr 1997     Volume: 8 Number: 383

Today's topics:
     Re: ### newbie - FAQs?  Dwonload Perf for Win 95??? ### (Terry Carroll)
     ** The Perl Journal ** (Jon Orwant)
     Re: BASH & CGI -- HTML call to BASH (Abigail)
     Creating files <weinerd@ucsub.colorado.edu>
     Re: Creating files (Tad McClellan)
     Does somebody know how to open and write a Perl file in <cooper15@hsonline.net>
     dos2unix <cottert@sonic.net>
     Re: dos2unix <critter@quack.kfu.com>
     Re: Genetic programming with Perl (D. Black)
     Re: HELP! Matching a multi line pattern and replacing i (Mark Mills)
     MIME::Base64 <aas@bergen.sn.no>
     Re: MLDBM|Argh my brain is frying! (Blake Kritzberg)
     Re: newbie question: no data found? (rga)
     Re: Notice to antispammers (Terry Carroll)
     Re: Object IDs are bad (was: Ousterhout and Tcl lost th (Chris Bitmead uid(x22068))
     Re: Ousterhout and Tcl lost the plot with latest paper (Chris Bitmead uid(x22068))
     Re: perl cgi to print to frame <rootbeer@teleport.com>
     Re: Problem with Script (rga)
     Re: quote of the day? <webguy@fatdays.com>
     Re: use Win32::ODBC :Parse  exception (Paul Hanssen)
     using modems from perl <enzrowi@nzsf00.epa.ericsson.se>
     Re: using modems from perl (Nathan V. Patwardhan)
     Using timegm and utime in MacPerl <B.P.Fowler@rack.demon.co.uk>
     Win free website development software (CGI), 10 winners <win@basehit.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sun, 27 Apr 1997 23:55:09 GMT
From: carroll@tjc.com (Terry Carroll)
Subject: Re: ### newbie - FAQs?  Dwonload Perf for Win 95??? ###
Message-Id: <3365e724.5921339@news.aimnet.com>

On 27 Apr 1997 20:15:58 GMT, tacloud@aol.com (TACloud) wrote:

>Where can I find a FAQ list for Perl?

http://www.perl.org/CPAN/doc/manual/html/pod/perlfaq.html

>Where can I download Perl 5.0 for Windows 95?

http://www.activeware.com/

--
Terry Carroll       | "Al Gore is doing for the federal government what
Santa Clara, CA     | he did for the Macarena.  He's removing all the
carroll@tjc.com     | unnecessary steps."
Modell delenda est  |                - Bill Clinton, September 20, 1996


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

Date: 28 Apr 1997 00:17:27 GMT
From: orwant@fahrenheit-451.media.mit.edu (Jon Orwant)
Subject: ** The Perl Journal **
Message-Id: <5k0qan$ncc$1@nadine.teleport.com>



	  The Perl Journal is a quarterly, printed magazine
		     devoted to All Things Perl.

			    http://tpj.com

       Issue #6 is speeding toward press, and will be mailed in
	mid-late June.  Now would be a good time to subscribe
	    if you want to receive it hot off the presses.

Some heartfelt testimonials:

     "It is the most useful technical publication I have seen." 
                                                              -Lisa Nyman 

     "TPJ is the most consistently relevant, content-rich publication
      I get, and I get a pile of them. You folks do a great job." 
                                                              -John Bazik 

     "Do yourself a favor and subscribe." 

                                                      -SunExpert magazine

     "...a really hot magazine..."
						     -HotWired, in Packet

     "My first issue of The Perl Journal (vol 1 issue 2) is the best 
      single issue of a technical journal I have read."
						  	   -Andrew Duncan

     "The Perl Journal outsells WiReD here."
                                          -Quantum Books of Cambridge, MA

Prices: $18 U.S., $25 international.  Back issues are $7 ($9 non-U.S.)
and are first-class/air-mail so you get 'em quick.  

	 *** Order online at http://tpj.com/tpj/ordering. ***

All back issues are available (totalling 192 pages for all five)
and when you order four issues, get the fifth free!  

TPJ accepts checks, money orders, VISA, and MasterCard, but
operates on *prepayment only* -- we have neither the time nor
the money to send out individual invoices.  There's an order form at 
http://tpj.com/tpj/subscription_form for postal orders.  Our address:

			   The Perl Journal
			     P.O. Box 54
			   Boston MA 02101
				 USA

Enjoy the magazine, and a big thank you to all subscribers, authors,
and advertisers for their support!

-Jon

----------------
Jon Orwant
The Perl Journal
http://tpj.com


		      Complete Table of Contents

Issue #6 (tentative):

     The First Annual Obfuscated Perl Contest
     Randomness, Part Two
     Using the AutoLoader and AutoSplit modules
     Perl/Tk: A Tour of the Nonstandard Widgets
     CGI and the Web: Computing Coolness
     Just the FAQs: Sorting Tutorial
     Making Your Own Sundials with Perl
     WebClip: Gathering Data from the Web
     A Perl in the Oil Patch
     Object Oriented Programming
     3-D Graphics and Perl
     Perl News / New Modules
     Information Retrieval and What "pack 'w'" is For

Issue #5 

     Programming like you mean it: Pattern Languages
     In Sync With Your Data (Understanding Regular Expressions)
     DBI - The Database Interface for Perl 5
     Perl/Tk: Signals, Sockets, and Pipes
     Creating Surreal HTML Pages With The Mangler
     Perl News / New Modules
     Perl and the X protocol
     PDL: The Perl Data Language
     Perl And Nuclear Weapons Don't Mix

Issue #4:		

     A Subjective Look at Object Oriented Programming
     Best of Both Worlds: Embedding Perl in C
     The LWP Library: CGI Programming
     use Lovecraft qw(cthulhu necronomicon)
     New Modules
     Randomness
     Understanding Regular Expressions
     The Grid Geometry Manager: Perl/Tk Programming
     The Perl Purity Test
     Using Usenet from Perl

Issue #3:

     Data Hiding
     Perl, Politics, and Pairwise Voting
     CGI Scripts and Cookies
     Penguin: The First Tentative Waddle
     New Modules
     Perl/Tk: Events and Other Things
     FTP: File Transfer Using Perl
     Understanding Regular Expressions
     The Perl Institute
     Obfuscated Perl Contest Results

Issue #2:

     How Perl Saved The Human Genome Project
     The Perl Compiler
     Penguin: Java Done Right
     MacPerl
     Perl And The Tk Toolkit: The Mouse Odometer
     Saving State with CGI.pm
     Understanding Regular Expressions
     Results of the Prisoner's Dilemma
     The Zeroth Obfuscated Perl Contest

Issue #1:

     Wherefore Art, Thou?
     Perl And The Tk Toolkit
     Creating, Processing, And Sending Mail From Perl
     HTML Hacking with Regular Expressions
     Programming For The Web: CGI.pm
     The Prisoner's Dilemma




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

Date: Mon, 28 Apr 1997 01:40:03 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: BASH & CGI -- HTML call to BASH
Message-Id: <E9BrAs.4Fs@nonexistent.com>

On Sun, 27 Apr 1997 14:56:08 -0500, J. Roemer wrote in
comp.lang.perl.misc URL: news:3363AF58.6737@spiderpub.com:
++ I'm looking for somebody who
++ can help me with a BASH/CGI question.
++ 
++ (If this isn't the appropriate newsgroup,
++ could you point me in the right direction?
++ Thanks!)

It isn't. This is a group about perl (I don't know why they call it
comp.lang.perl.misc, sci.sports.vacuum-cleaners would have been
so much more obvious).

You can ask CGI questions in the cgi group
(comp.infosystems.www.authoring.cgi) and bash questions in
in comp.unix.shell, or in one of the gnu groups.



Abigail


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

Date: Sun, 27 Apr 1997 21:37:12 -0700
From: Darren Weiner <weinerd@ucsub.colorado.edu>
Subject: Creating files
Message-Id: <3364296F.72B8@ucsub.colorado.edu>

Another one of those "I thought I knew what I was doing, but" questions.

I've been trying to create a file, using either sysopen or open.

When I run the script via telnet, everything works fine.

When I run the script via my browser, I DO NOT get an error, yet the
file is not created.

Thanks in advance for helping to make my world sane again...

-Darren
weinerd@ucsub.colorado.edu


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

Date: Sun, 27 Apr 1997 22:35:45 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Creating files
Message-Id: <hu51k5.4f3.ln@localhost>

Darren Weiner (weinerd@ucsub.colorado.edu) wrote:
: Another one of those "I thought I knew what I was doing, but" questions.

: I've been trying to create a file, using either sysopen or open.

: When I run the script via telnet, everything works fine.
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
: When I run the script via my browser, I DO NOT get an error, yet the
                        ^^^^^^^^^^^^^^
: file is not created.
  ^^^^^^^^^^^^^^^^^^^

Sounds as if this Question may have been Asked here Frequently...


If you tried to create a file, and the file was not created,
then it sure seems like you DO get an error.

I suppose you meant you do not get an error _message_?


Anyway, this is probably a CGI problem, not a Perl problem.

The newsgroup for CGI questions is:

comp.infosystems.www.authoring.cgi


: Thanks in advance for helping to make my world sane again...

Where did you look for error messages? In the server log?
That's where they usually go...


Did you check the return value from the open() call?

Did you print out the $! variable to get a plain (often too plain ;-)
text description of why it failed?


open(FILE, ">newfile") || die "could not open 'newfile'  $!";


Of course, you already knew this (since it is normal Usenet practice
to check the FAQ for a newsgroup BEFORE posting to that newsgroup),
because of this stuff that you saw in the Perl FAQ part 9:


----------------------------
=head2 My CGI script runs from the command line but not the browser.  Can you help me fix it?

Sure, but you probably can't afford our contracting rates :-)

Seriously, if you can demonstrate that you've read the following FAQs
and that your problem isn't something simple that can be easily
answered, you'll probably receive a courteous and useful reply to your
question if you post it on comp.infosystems.www.authoring.cgi (if it's
something to do with HTTP, HTML, or the CGI protocols).  Questions that
appear to be Perl questions but are really CGI ones that are posted to
comp.lang.perl.misc may not be so well received.

The useful FAQs are:

    http://www.perl.com/perl/faq/idiots-guide.html
    http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml
    http://www.perl.com/perl/faq/perl-cgi-faq.html
    http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
    http://www.boutell.com/faq/
----------------------------


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 28 Apr 97 00:59:08 GMT
From: dianne  cooper <cooper15@hsonline.net>
Subject: Does somebody know how to open and write a Perl file in a windows95 server?
Message-Id: <3363f65c.0@news.hsonline.net>


Does anybody know how to open and write files in a Windows95 server?
That's the only thing that is stopping me from using Perl scripts.

If anybody knows how I'd love to know!

Thanks!
Cameron Cooper
Cooper15@hsonline.net


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

Date: 27 Apr 1997 23:58:39 GMT
From: "Tammy Cotter" <cottert@sonic.net>
Subject: dos2unix
Message-Id: <01bc5367$660d0f00$71e6c9d0@cottert>

I've just gone through a few weeks of hell and wanted to save anyone else
the same prediciment. This is mainly for the newsgroup history files. 
First the guts, then my story:

____________________________________________________________________________
______

When writting a script on a windows/dos based system and uploading it to a
UNIX system you must translate your file using the "dos2unix" command.

Example.  you upload your ascii text file "joe.pl" and are now on your
shell.  At the prompt type in 

dos2unix joe.pl

that will translate it (eliminate the [ctrl]M's)

____________________________________________________________________________
_______

My story:

First, this is my first programming since High School in the Mid '80's (on
apple IIe's).  But Perl looked easy enough so I thought I'd try it.

I got a copy of FORMMAIL.PL made my adjustments and loaded up on the server
- It didn't work.

Someone then told me I needed to dos2unix the thing (didn't know what that
was)- so I searched around the net and came to
http://traffic.ce.gatech.edu/courses/ce2523/dos2unix.htm

That page says the following:

Syntax

>> dos2unix <in_file> <new_file>

where <in_file> is the name of the file that you want to convert and
<new_file> is the name of the file to save the changes. 

Example

>> dos2unix junk.for junk.for

So that was exactly what I did  "dos2unix fibmail.pl fibmail.pl"  - this
had the effect of deleting all data within the file (except I didn't know
it was doing this).

I discovered this fact after visiting my ISP and asking one of their techs
what I was doing wrong.  When he pulled up the file he said my problem was
that my files were empty.

Hope this helps someone down the road,

Kevin Cotter


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

Date: Sun, 27 Apr 1997 20:09:13 -0700
From: "Charles F. Ritter" <critter@quack.kfu.com>
Subject: Re: dos2unix
Message-Id: <336414D9.1D3E8703@quack.kfu.com>

Tammy (or Kevin) Cotter wrote:


> My story:
> 
> First, this is my first programming since High School in the Mid '80's (on
> apple IIe's).  But Perl looked easy enough so I thought I'd try it.
> 

Welcome back. I had one of whose apple IIe things. Life was good.


> Someone then told me I needed to dos2unix the thing (didn't know what that
> was)- so I searched around the net and came to
> http://traffic.ce.gatech.edu/courses/ce2523/dos2unix.htm
 
You could have saved yourself the search and learned more about perl if
you had written your own dos2unix. Example:

#!/usr/bin/perl -w

while(<STDIN>) {

    chomp;chomp;
    print "$_\r\n";
}
__END__

The syntax would be:

    cat oldfile | dos2unix > newfile

Of course this format only works on unix. You are running Linux aren't
you? 

Have fun!

Charles Ritter


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

Date: 27 Apr 1997 15:31:00 -0700
From: alecto@arlington.pe.net (D. Black)
Subject: Re: Genetic programming with Perl
Message-Id: <5k0k34$p8d@arlington.pe.net>

Zachary Brown (zbrown@lynx.dac.neu.edu) wrote:
>Genetic programming would go perfectly on perl. Has anyone written a 
>library to generate random perl code (random within user-defined 
>parameters, of course)?

	try: www.genome.wi.mit.edu/ftp/pub/software

	also of interest might be The Summer 1996 issue
        of The_Perl_Journal, which contains an article on
        perl and the Human Genome Project.

	perl/dna trivia: article states that the DNA string 
	is 3 times 10 to the ninth letters long.


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

Date: Mon, 28 Apr 1997 02:05:06 GMT
From: mark@ntr.net (Mark Mills)
Subject: Re: HELP! Matching a multi line pattern and replacing it
Message-Id: <3366054d.601276661@news.ntr.net>

On 27 Apr 1997 00:18:29 GMT, dblack@icarus.shu.edu (David Alan Black)
wrote:

>Hello -
>
>junkmail@sysa.abdn.ac.uk (Kyzer) writes:
>
>>David Millier of i_dont@have.one wrote in comp.lang.perl.misc:
>>: I need to match somthing that looks like this:
>>: New files in F:\ozzy_data\buckeye
>>: Need to remove the "New files in ........." followed by two blank lines.
>>
>>$list=`cat <list`;
>>$list =~ s/^New files.+\n\n//;
>
>That will remove the text line and *one* blank line, *once*.
>
>Something along these lines should work:
>
>$list =~ s/New files.+\n{3}//g;
>
>assuming that the string "New files" doesn't show up in the
>middle of a line which is followed by two blank lines but is
>not supposed to be deleted (unlikely - but could happen if
>a file were named "New files").
>
>David Black
>dblack@icarus.shu.edu

Don't let it match "New Files unless it is at the beginning of the
line...

$list =~ s/\nNew files.+\n{3}/\n/g;

[Hopper, Dennis]: There's mines over there, there's mines over 
there, and watch out those goddam monkeys bite, I'll tell ya.
==Apocalypse Now==


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

Date: 28 Apr 1997 00:16:07 GMT
From: Gisle Aas <aas@bergen.sn.no>
Subject: MIME::Base64
Message-Id: <5k0q87$nbn$1@nadine.teleport.com>

I have uploaded MIME-Base64-2.00 to CPAN.  This module is call
compatible with the MIME::Base64 module distributed with libwww-perl,
but since it is implemented by XS-functions it runs about 20 times
faster.  The next release of libwww-perl will not contain the
MIME::Base64 and MIME::QuotedPrint modules.

http://www.perl.com/cgi-bin/cpan_mod?module=MIME::Base64

-- 
Gisle Aas <aas@sn.no>




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

Date: 28 Apr 1997 04:49:35 GMT
From: kritzber@ucsub.Colorado.EDU (Blake Kritzberg)
Subject: Re: MLDBM|Argh my brain is frying!
Message-Id: <5k1a8v$kgu@lace.colorado.edu>

In article <5k0ls5$b48@pirate.shu.edu>,
David Alan Black <dblack@icarus.shu.edu> wrote:
>
>These variables have gone out of scope.  My, my, my :-)
>
>Usen Sie strict, bitte.
>
>David Black
>dblack@icarus.shu.edu


I'll meet your strict and show you 'use diagnostics,' because
it's such a clearly rational idea.

That showed me exactly which part of my brain-damaged
code the script objected to, and perhaps sheds more
light on the problem?

while((my $k, my $v) = each (%pr)) {
     while ((my $k1, my $v1) = each (%$v)) {
          if ($k1 eq "openDate") {
             $toggleOpen = $v1 if ($mydate >= $v1);
          }
          if ($k1 eq "closeDate") {
             $toggleClose = $v1 if ($mydate <= $v1);
          }
       }
       if ($toggleOpen && $toggleClose) {
          $mystatus = "ACTIVE";
          $reloop = "on";

       <snip>

[62]   $tmp = $pr{$k};
[63]   $tmp->{status} = "$mystatus";
[64]   $pr{$k} = $tmp;


________
The errors back include:

Argument "O_RD" isn't numeric in entersub at
        /usr/local/lib/perl5/site_perl/MLDBM.pm line 58 (#1)
###Eh?.... don't know what that's about.
Argument "O_RD" isn't numeric in entersub at /usr/local/lib/perl5/site_perl/MLDB
M.pm line 58.

Uncaught exception from user code:
        gdbm store returned -1, errno 2, key "HY52039" at /usr/local/lib/perl5/s
ite_perl/MLDBM.pm line 92.
        MLDBM::STORE('MLDBM=HASH(0x10217068)', 'HY52039', 'HASH(0x102172d8)') ca
lled at update.cgi line 64

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

Does all this still relate to out-of-range variables, thinkest thou?
Anyone know what "-1, errno 2" means in gdbm? "You're a lout and
you buy lousy beer, too," is my guess, but a linguist could probably
do better.

Hmmmmm ... very perplexing.

Blake


-- 
            ________________________                           ___________
LONDON - Former students at two British schools, judged 
by government inspectors as failing their pupils, are          ------------
suing [the schools] for their poor education. REUTERS          B. Kritzberg


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

Date: Mon, 28 Apr 1997 02:37:16 GMT
From: rga@io.com (rga)
Subject: Re: newbie question: no data found?
Message-Id: <33640ce0.2965197@news.io.com>


mosey@alpha2.csd.uwm.edu (John Thomas Mosey) wrote:

>I am just picking cgi/Perl up. I wrote a little test script and eve nthis 
>doesn't work. I have an HTML form that posts to this script. I'm told on 
>the HTML end that there is no data. What's wrong withthe script? (PS 
>Permissions are correct)
>
>John Mosey
>
>#!/usr/bin/perl
>   print "Content-type: text/html \n\n";

Stick to the same format for HTML returns
below, as you did above.

>  print $name;

Document contains no data errors usually mean
that while the perl script executed without error,
whatever it returned to the browser was "nothing"

	print "$name";



Home Pages:
http://www.io.com/~rga/


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

Date: Mon, 28 Apr 1997 02:00:44 GMT
From: carroll@tjc.com (Terry Carroll)
Subject: Re: Notice to antispammers
Message-Id: <336a033f.13117519@news.aimnet.com>

On 26 Apr 1997 02:39:44 GMT, ljz@asfast.com (Lloyd Zusman) wrote:

>  You are
>actually expending time and effort to create a web page that will
>thwart the efforts of many, many people who are doing their best to
>keep spammers off their back.
>
>These people who munge their addresses are not doing it to make things
>difficult for *you*.  I'm sure that most of them are not even thinking
>about Tom Christiansen when they do this address munging.  

People who use invalid email addresses to thwart spammers have made a
decision to shift their problem of wanting to avoid spam from themselves
to the persons who want to legitimately correspond with them.  They have
decided that the inconvenience to spammers outweighs the inconvenience to
legitimate users, and they have decided on this without regard to the
legitimate users.

Tom's web page serves to change that balance.  By removing the
inconvenience to spammers, it removes the motivation for these rude people
to shift their problem to the shoulders of legitimate correspondents.


--
Terry Carroll       | "Al Gore is doing for the federal government what
Santa Clara, CA     | he did for the Macarena.  He's removing all the
carroll@tjc.com     | unnecessary steps."
Modell delenda est  |                - Bill Clinton, September 20, 1996


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

Date: 28 Apr 1997 11:34:36 +1000
From: Chris.Bitmead@alcatel.com.au (Chris Bitmead uid(x22068))
Subject: Re: Object IDs are bad (was: Ousterhout and Tcl lost the plot with latest paper)
Message-Id: <s6yg1wclykz.fsf@aalh02.alcatel.com.au>

ark@research.att.com (Andrew Koenig) writes:

> > In the tree example that you started with, what is wrong with just
> > passing round the whole subtree so that it can be compared with as
> > necessary? Any reasonable implementation will only be passing round a
> > pointer so you lose nothing.
> 
> Because it will compare equal with any other subtree that happens to
> have the same structure, which is not what I want.

So all you have to do is generate a unique name for each node, right?
Just an incremental number perhaps.



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

Date: 28 Apr 1997 10:43:57 +1000
From: Chris.Bitmead@alcatel.com.au (Chris Bitmead uid(x22068))
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <s6yohb0m0xe.fsf@aalh02.alcatel.com.au>

ark@research.att.com (Andrew Koenig) writes:

> So it is also with programming languages.  If C++ had not built on C, it
> would never have gotten out of the starting gate.  So it had no choice
> but to inherit its computational model from C.  Many people consider other
> computational models better, but there is far from a consensus as to
> which one to use.  So the C model, which C++ uses, remains the common tongue.
> 
> This is a behaviorial observation, not a value judgement.

It is a correct observation, but by the same token I think it is a
big-time myth that computer programmers are too slow to learn new
languages, or that it is uneconomic to teach a new language rather
than plough ahead with what you already know.



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

Date: Sun, 27 Apr 1997 18:58:59 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: fredc <fredc@earthlink.net>
Subject: Re: perl cgi to print to frame
Message-Id: <Pine.GSO.3.96.970427185707.24996B-100000@kelly.teleport.com>

On Sat, 26 Apr 1997, fredc wrote:

> Can someone please tell me how to direct the output from a perl cgi to a
> frame rather than to a full page?

Sure, it's the same way that FORTRAN CGI scripts do it. But before you ask
your question in a FORTRAN group, maybe you should consider whether the
language is the important thing, or whether it's a CGI question. If you
have a CGI question, look for a CGI newsgroup, then read their FAQ. Hope
this helps! 

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Mon, 28 Apr 1997 02:32:44 GMT
From: rga@io.com (rga)
Subject: Re: Problem with Script
Message-Id: <33640bf4.2729201@news.io.com>


camerond <camerondejong@geocities.com> wrote:

>Hi all
>
>I run Web Site 1.1 on a Windows 95 computer. 

Is this a trick question ?


Perl for Win32 
    Get it w/ your browser at
     http://www.ActiveWare.com/
    Get it w/ your FTP at
     ftp.epix.net/pub/languages/perl/ports/win32/perl5/Release

Home Pages:
http://www.io.com/~rga/


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

Date: Sun, 27 Apr 1997 23:46:15 -0500
From: "Brian H. Marston" <webguy@fatdays.com>
Subject: Re: quote of the day?
Message-Id: <33642B97.2DB2@fatdays.com>


> I'd like to make a quote of the day script, only I don't know the syntax
> to call the day. What code to I use to check what day of the month it is?

There are probably better ways, but this is what I use:

sub DateAndTime {
        $ENV{"TZ"} = "CST6CDT";
        $thismonth = (January, February, March, April, May, June, July,
August,
                      September, October, November,
December)[(localtime)[4]];
        $thisday   = (localtime)[3];
        $thisyear  = (localtime)[5];
        $hour      = (localtime)[2] % 12;
        $minutes   = (localtime)[1];

        if ((localtime)[2] >= 12) {
                $AMorPM = "PM";
        }
        else {
        $AMorPM = "AM";
        }

        if ($hour == 0) {
                $hour = 12;
        }

        if ($minutes <= 9) {
                $minutes = "0$minutes";
        }
}

Check out my Random Quote Generator at http://www.fatdays.com/


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

Date: Mon, 28 Apr 1997 00:31:21 GMT
From: paulh@sanford.com.auX (Paul Hanssen)
Subject: Re: use Win32::ODBC :Parse  exception
Message-Id: <3363ef34.832727@news.per.aone.net.au>

On Fri, 11 Apr 1997 09:21:14 -0600,
Laurent_Filhol@HP-France-om8.om.hp.com wrote:

>I've just loaded the latest version of perl (5.003_07 build 306)
>and I ve always a problem with win32::ODBC add-on.
>When i compile my script i have : Parse exception

You need the latest version of the ODBC.pll file.
Find it in the same directory you found Win32::ODBC. 
It is called ODBC_Build_304.zip or something similar.
Alternatively, you might try the beta odbc.pll file that is 
in the Win32::ODBC distribution.

Paul
(Remove the X in my email address to reply personally)

Paul Hanssen
Graduate Software Engineer
Australian Informatics Pty Ltd


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

Date: Mon, 28 Apr 1997 13:45:48 +1200
From: Ross Williamson <enzrowi@nzsf00.epa.ericsson.se>
Subject: using modems from perl
Message-Id: <3364014C.41D9@nzsf00.epa.ericsson.se>

I need some assistance.  I am trying to write a perl script to
do a simple set of commands to a modem.

I am currently using
open3( $mR, $mW, $mE, "cu -l /dev/ttyb");
(with $mR, $mW, $mE set up correctly, $mR is read handle $mW is write
handle)

It is opening the cu session fine... ie I get the connected message
back.  However when I try to use either 
		print $mW
or
		$mW->write
nothing is going through to the modem.  Its almost like my statements 
are not getting through to the modem via cu.

Has anyone else tried this or alternatively has anyone written any code
to do something like this.

TIA

-- 
+-----------------------------------------------------------------+
     Ross Williamson - Support Engineer - Ericsson New Zealand
              Phone (04)460-1061 - Mobile 025 956 265
                "Seize the day tomorrow is overtime"


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

Date: 28 Apr 1997 04:48:55 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: using modems from perl
Message-Id: <5k1a7n$bgi@fridge-nf0.shore.net>

Ross Williamson (enzrowi@nzsf00.epa.ericsson.se) wrote:

: Has anyone else tried this or alternatively has anyone written any code
: to do something like this.

Jamie Zawinski, stud, of Netscape fame, reported success with sysopen(),
as suggested by Tom Christiansen.  Check out http://www.dejanews.com and
search for comp.lang.perl.misc I/O (you'll get about 5-10 answers).

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Mon, 28 Apr 1997 03:38:02 +0000
From: Ben <B.P.Fowler@rack.demon.co.uk>
Subject: Using timegm and utime in MacPerl
Message-Id: <33641B70.4D8D@rack.demon.co.uk>


Grateful for advice on this topic, or failling that, a little sympathy
would be fine.

My code was working fine until recently, and I suspect that the 
problem started when I upgraded to MacPerl 5.1.3r2.

What I want to do is set the date of a downloaded file.

I can get the date from the server very easily, and this
is typically in the form of a string such as "Sun, 20 Apr 
1997 20:52:53 GMT".It is no trouble to convert this
to a series of numbers such as 53,52,20,20,3,97
for feeding to timegm.

However, timegm does not give the correct result for dates
after 1971.

I think that this is because the Mac uses 1904 as the epoch, and 
2 147 483 647 second (just over 68 years) brings us to the
year in question. A further 68 years brings us to 2038, and I
suspect that I would be OK if utime used unsigned integers.

1. Does anyone have a better analysis of the problem?

2. Is there an easy solution? Do I have to modify timelocal.pl
or utime?

3. If I could get the correct count of seconds (which would fit into a
32-
bit quantity, starting 0xAF......, how to I pass this value to utime.

I am puzzled, because I am sure that this was working until recently.

The MacFAQ says that utime is not 100% compatible. 
Ben.


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

Date: 28 Apr 1997 02:37:17 GMT
From: "Mitchell Koester" <win@basehit.com>
Subject: Win free website development software (CGI), 10 winners
Message-Id: <01bc538e$03983760$7fbff4cd@mkoester.netten.net>

10 winners will receive their choice from 1 of 6 award winning software
products from WebGenie. Use your specific information to automatically
create guestbooks, cgi-scripts, dropdown menus, rotating banners, mailing
list management and more!

No form to fill out, just come to our website, enter your e-mail, and hit
the submit button.

We NEVER sell e-mail addresses, they are for the contest only. The contest
is only to attract people to our website. Please come and register at
http://www.basehit.com

-- 
Thanks,
Mitchell Koester
http://www.basehit.com
win@basehit.com


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

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

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