[10899] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4500 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 27 11:07:46 1998

Date: Sun, 27 Dec 98 08:00:25 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 27 Dec 1998     Volume: 8 Number: 4500

Today's topics:
    Re: ------What should I use as a Win32 perl interpreter (Marc Spitzer)
    Re: ------What should I use as a Win32 perl interpreter (Andrew M. Langmead)
    Re: a nicer way? (Jason Costomiris)
    Re: Accessing Databases (Honza Pazdziora)
    Re: attach html file to email <ghulam@khayal.com>
    Re: Basic Perl DOS/Win95 + WWW + CGI course for Newbies (Franklin)
    Re: Boolean search facility (Randy Kobes)
    Re: challenge: 99 bottles of perl (was Re: The quine pa <rick.delaney@home.com>
        Get Title <debot@xs4all.nl>
        get webpage with perl h9250293@obelix.wu-wien.ac.at
    Re: get webpage with perl (Tad McClellan)
    Re: locating module GDBM_File (Randy Kobes)
        mkdir and -p webmaster@skatesearch.com
        Newbie:Basic Troubleshooting <kdiffily@mail.together.net>
    Re: PERL OO: Function overloading (Damian Conway)
        problem with specific language characters ("v,d,|,_") <martin.schager@vienna.at>
    Re: Problem writing a file from web browser <chatmaster@c-zone.net>
    Re: Regex question - removing HTML tags.... (Abigail)
    Re: Regex question - removing HTML tags.... (Abigail)
    Re: Regex question - removing HTML tags.... (Abigail)
    Re: Retrospective on comp.lang.perl.moderated? (John Stanley)
    Re: Retrospective on comp.lang.perl.moderated? (John Stanley)
    Re: sending a query from one script to another (VKuchu)
        Serverside Talk on ASP and JSP reachable again ! fs60@rumms.uni-mannheim.de
        simple code needed to determine date to print on a web  (Loans2001)
    Re: simple code needed to determine date to print on a  (Mike Schechter)
    Re: test <debot@xs4all.nl>
    Re: Why does my browser try to download the script inst (Franklin)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sun, 27 Dec 1998 05:54:05 GMT
From: marc@m1.nassau.cv.net (Marc Spitzer)
Subject: Re: ------What should I use as a Win32 perl interpreter-----
Message-Id: <slrn78birs.nn0.marc@m1.nassau.cv.net>

In article <m190fuwnle.fsf@halfdome.holdit.com>, Randal L. Schwartz wrote:
>>>>>> "Geir" == Geir Magnusson <gmj@netaxis.com> writes:
>
>Geir> QnJldHQgU3VtbWVyZXIgd3JvdGU6DQoNCj4gICAgICAgICBSaWdodCBub3cgSSB1c2UgQWN0
>Geir> aXZlUGVybCwgYmVjYXVzZSBpdCdzIGZyZWUuICBBbnkgb3RoZXINCj4gaWRlYXM/ICBBbHNv
>Geir> LCBkb2VzIGFueW9uZSBrbm93IHdoZXJlIEkgY2FuIGZpbmQgYSBkZWNlbnQgYm9vayBvbg0K
>Geir> PiBnZXR0aW5nIHBlcmwgc2NyaXB0cyB0byBydW4gb24gYSBOVCBib3g/ICBBbGwgb2YgdGhl
>Geir> IG9uZXMgdGhhdCBJIGZvdW5kDQo+IGFyZSB3cml0dGVuIHdpdGggVU5JWCBpbiBtaW5kLiAg
>Geir> SSBkbyBteSBkZXZlbG9wbWVudCBvbiBTcGFycXMsIGJ1dCBvdXINCj4gd2ViIHNlcnZlciBp
>Geir> cyBEb21pbm8gb24gTlQuDQo+DQo+ICAgICAgICAgLUJyZXR0IFN1bW1lcmVyDQo+IHN1bW1l
>Geir> cmUxQHBpbG90Lm1zdS5lZHUNCg0KV2hhdCBhYm91dCBnZXR0aW5nIGFuZCBjb21waWxpbmcg
>Geir> dGhlIHJlZ3VsYXIgZGlzdHJpYnV0aW9uPyAgSSBkbyB0aGF0LA0KYW5kIEkgYW0gaGFwcHkg
>Geir> YXMgYSAgY2xhbS4NCg0KZ2Vpcg0KDQotLQ0KR2VpciBNYWdudXNzb24gSnIuDQpnbWpAbmV0
>Geir> YXhpcy5jb20NClBlcmwncyBnYXJiYWdlIGNvbGxlY3RvciBhYmhvcnMgYSBuYWtlZCBjaXJj
>Geir> dWxhcml0eS4gLXRjDQpDaGFzZSB0aGUgZHJlYW0sIG5vdCB0aGUgY29tcGV0aXRpb24uDQoN
>Geir> Cg0K
>
>No, I'm quite sure that *won't* work as a win32 perl interpreter.
>Try again.
>
>:-)

But it might do as a M$ VB runtime, I could not  help myself. <grin>

marc
>
>-- 
>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: Sun, 27 Dec 1998 15:00:18 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: ------What should I use as a Win32 perl interpreter-----
Message-Id: <F4MpoJ.4KB@world.std.com>

marc@m1.nassau.cv.net (Marc Spitzer) writes:

>But it might do as a M$ VB runtime, I could not  help myself. <grin>

I've always thought it would be neat to make a processor whose opcodes
are all in the ASCII character range (with CR and LF being no-ops)
That way, its binaries could be transmitted through all sorts of
hostile mediums and arrive intact.

-- 
Andrew Langmead


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

Date: 27 Dec 1998 07:26:39 GMT
From: jcostom@madcow.jasons.org (Jason Costomiris)
Subject: Re: a nicer way?
Message-Id: <slrn78bo9f.i4n.jcostom@madcow.jasons.org>

On Sun, 27 Dec 1998 03:39:07 GMT, 
	Michael Rubenstein <miker3@ix.netcom.com> wrote:
: My point is not to argue for one approach or the other.  I've used
: both and am not going to say which one I've settled on.  If you're
: happy with the procedural approach, use it.  Or you might do as I have
: done and try both in various scripts and then decide which one you
: find better.
:
: [...]
:  
: I do not believe that Jason's views deserve the disdain they have
: received here.  There IS more than one way to do it.

Well said.  OO and procedural folks alike, let's agree to disagree.

To respond to Tom's previous posting about my /dev/null queue space
for his mail, I acted rashly, and have removed the rules from my 
 .procmailrc.  I've mailed him privately, and offered an apology.

Let's move on.

-- 
Jason Costomiris <><            | Linux...
jcostom@jasons.org              | "Find out what you've been missing 
http://www.jasons.org/~jcostom/ | while you've been rebooting Windows NT."
#include <disclaimer.h>         |         --Infoworld


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

Date: Sun, 27 Dec 1998 11:10:26 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Accessing Databases
Message-Id: <F4MF1E.FuK@news.muni.cz>

On 26 Dec 98 14:01:49 -0600, Gary Peake <gpeake@wt.net> wrote:
> Can someone point me to a perl/cgi program that will allow me to
> access mSQL database on my web host?

Basically (code untested):

	use DBI;	## this is _the_ database interface in Perl,
			## get it from CPAN
	my $dbh = DBI->connect('dbi:mSQL:database=database;host=web_host',
				'user', 'password') or die $DBI::errstr;
			## this creates you the database handle
	my $sth = $dbh->prepare('select * from mytable') or die $dbh->errstr;
			## this prepares a SQL statement
	$sth->execute(); ## this executes is
	while (my @data = $sth->fetchrow_array)
		{	## and here we fetch and print the databa from
			## the select
		print "@data\n";
		}

Man page DBI(3) and DBD::mSQL(3) will be very helpfull.

Hope this helps,

-- 
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
		Boycott the Czech Telecom -- www.bojkot.cz
------------------------------------------------------------------------


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

Date: Sun, 27 Dec 1998 12:18:36 +0300
From: Ghulam Hussein Kara <ghulam@khayal.com>
Subject: Re: attach html file to email
Message-Id: <3685FB6C.4E024733@khayal.com>

Use Mimelite1.130 ; It's at the following url.

http://ftp.digital.com/pub/plan/perl/CPAN/modules/by-module/MIME/ERYQ/

Ghulam.

Bill Binkley wrote:

> Need to attach an html file to a email that I am sending with a perl
> script!
>
> Any information or where to look would be appreciated very much,
>
> Thanks and have a happy xmas.
>
> Bill
> --
> Bill Binkley
> Software Composers, Inc.
> http://www.dowebpages.com
>
> Go to this URL for JavaScript examples
> and sample code. For JavaScript at it's
> best see the "European Tour". If you
> have a question about the examples, put
> it in the comments of the visitors form.



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

Date: Sun, 27 Dec 1998 12:09:40 GMT
From: data-art@home.com (Franklin)
Subject: Re: Basic Perl DOS/Win95 + WWW + CGI course for Newbies , Christmas free  offer .
Message-Id: <3687237a.387639806@news>

How do I access your course?

On Sat, 26 Dec 1998 17:51:37 -0800, TRG Software
<chatmaster@c-zone.net> wrote:

>Expert wrote:
>> 
>> I would like to give basic Perl course for newbies.
>> Integration of CGI Perl scripts with WWW pages.
>> Setting up simple WIN95/ web server and setting up web pages + CGI
>> programs running on your PC , for testing purposes.
>> 
>> Hope this course to be free, interactive, mayby on shareware basis.
>> 
>> If some of you guys are interested I set up  news group to move us
>> there.
>> regards,
>> Jack
>
>I might be interested in helping you with this (if you need any more
>help), but I'll need more details. :-)
>
>Good luck



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

Date: 27 Dec 1998 04:16:03 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: Boolean search facility
Message-Id: <slrn78bdlp.n9h.randy@theory.uwinnipeg.ca>

On Sat, 26 Dec 1998 14:02:43 -0500, 
	Steven Barbash <stevenba@ccpl.carr.org> wrote:
>
>Is there a package or module or extension or software or link to software 
>or ...
>which does a boolean search?
>more specifically, not limited to AND and OR and NOT, but doing NEAR?

Hi,
   Eric Bohlman posted a while ago a couple of modules that do
boolean searches - you can get these from
	http://members.xoom.com/omsdev/ebohlman/perlmodules/
There's a simple and an advanced version. For near searches,
you might want to look at the String::Approx module, found under
	http://www.perl.com/CPAN/authors/id/JHI/

-- 
		Best regards,
		Randy Kobes

Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theory.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: Sun, 27 Dec 1998 04:03:37 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: challenge: 99 bottles of perl (was Re: The quine page)
Message-Id: <3685B35D.9128F540@home.com>

Uri Guttman wrote:
> 
> my last version fixed that but i must have posted one i was still
> playing with. i was testing and cutting and pasting all at once with 
> no coherency since i was following the song lyrics! :-) burp!!!

If you want to strive for realism, then let's try to duplicate the
Expect entry from http://www.ionet.net/~timtroyr/funhouse/beer.html. 
Don't read the comments at the top of it, though.  You really have to
run this to appreciate it.

I started playing around with it, but was having trouble with printing
one letter at a time on my win32 system so I have (temporarily) given up
on posting my copy of it for Uri's challenge.  Perhaps someone else
would like to give it a go.

I think Perl hackers should be able to make it even more human-like in
less code (although I get the impression that one would need to 'use
Expect;').

-- 
Rick Delaney
rick.delaney@shaw.wave.ca


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

Date: Sun, 27 Dec 1998 13:29:24 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Get Title
Message-Id: <36862823.3CC3CCF4@xs4all.nl>

Does anybody know a script to get the Title of a webpage?
Some help for making a own script is OK.





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

Date: Sun, 27 Dec 1998 11:57:31 GMT
From: h9250293@obelix.wu-wien.ac.at
Subject: get webpage with perl
Message-Id: <7657bb$beg$1@nnrp1.dejanews.com>

hi!

I would like to go through webpages on the web and grep the essential
information for me with PERL and mail it to my account. How can i do that? is
there anywhere a ready source for retriving the HTML of a webpage?

thanx in advance

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


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

Date: Sun, 27 Dec 1998 08:32:40 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: get webpage with perl
Message-Id: <8eg567.iph.ln@magna.metronet.com>

h9250293@obelix.wu-wien.ac.at wrote:

: I would like to go through webpages on the web and grep the essential
: information for me with PERL and mail it to my account. How can i do that? is
: there anywhere a ready source for retriving the HTML of a webpage?


   use LWP::Simple;
   $html = get('http://www.perl.com');

   use HTML::Parser;  # for getting "essential" info from the HTML


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: 27 Dec 1998 04:03:13 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: locating module GDBM_File
Message-Id: <slrn78bcto.n9h.randy@theory.uwinnipeg.ca>

On Sun, 27 Dec 1998 00:46:36 GMT, 
	Jarle H Knudsen <no.unsolicited.mail.please@jarle.com> wrote:
>I'm having a hard time locating the GDBM_File module on CPAN. Can
>someone please advise me?
>
>(I'm using "perl, version 5.005_02 built for MSWin32-x86-object".)

Hi,
   I assume that's the ActiveState build - according to their web
site, GDBM, NDBM, and ODBM don't build on Win32. DB_File does though,
which I believe is available thru ActiveState's ppm (Perl Package
Manager), or thru installing on your own with the sources.
   Alternatively, if you really need it, you might try compiling
perl with the cygwin tools, which may allow GDBM to be built.

-- 
		Best regards,
		Randy Kobes

Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theory.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: Sun, 27 Dec 1998 15:29:54 GMT
From: webmaster@skatesearch.com
Subject: mkdir and -p
Message-Id: <765jph$k84$1@nnrp1.dejanews.com>



I'd like to invoke mkdir -p  from perl.  I know I can shell it out to do this,
but is there a way to do this from the built in version fo mkdir in perl?



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


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

Date: Sun, 27 Dec 1998 10:02:46 -0500
From: Kevin Diffily <kdiffily@mail.together.net>
Subject: Newbie:Basic Troubleshooting
Message-Id: <36864C12.25B50DAD@mail.together.net>

I have been trying to get various scripts to runon an Apache Server and
have run into problems debugging some.  Aside from the obvious checking
of correct paths and permissions how does one start the debugging
process?  I know this is a tall order to fill but any help is
appreciated.
The current script I am having trouble with returns a Server 500 error
from my browser yet returns almost perfect web page code via Telnet
except that unintended line spaces exist within some of the URLs.



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

Date: 27 Dec 1998 07:19:09 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: PERL OO: Function overloading
Message-Id: <764n1d$scm$1@towncrier.cc.monash.edu.au>

hoangngo@usa.net writes:

>Hello-

>Can anyone out here tell me if PERL offers function overloading? I am trying
>to create a function and depends on the parameter passed to it (scalar,
>array, or hash) it will behave differently. One way is to detect the type of
>parameter, the other way is use function overloading. Unfortunately, i
>couldn't find the solutions in PERL documentation. Please drop me a line if
>you have any information on this.

You can do this (and much more) with the Class::Multimethods 
module which will be going up on the CPAN early in the new
year.

Damian


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

Date: Sun, 27 Dec 1998 14:48:31 +0100
From: Martin Schager <martin.schager@vienna.at>
Subject: problem with specific language characters ("v,d,|,_")
Message-Id: <36863AAF.93BA5AB5@vienna.at>

If someone submits information via a form, that contains v,d,|,_, I get
strange %something instead of these characters, when I process the form.
Is there any solution to this problem?




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

Date: Sun, 27 Dec 1998 02:01:41 -0800
From: TRG Software <chatmaster@c-zone.net>
Subject: Re: Problem writing a file from web browser
Message-Id: <36860585.4FBAAE4F@c-zone.net>


Jason Swett wrote:
> 
> Rookie here.  On a Unix server, I can run a CGI script via telnet that
> re-writes a little test file.  This won't work when run from a browser.
> 
> Is there something special that needs to be done to give the browser user
> permissions to re-write the file?
> 
> I've used CHMOD to give RWX access to the test file, but that doesn't sem to
> cut it.
> 
> Any ideas?  Thanks.

Well, my "idea" is: If it works fine in Dos and not via a browser, then
you probably didn't set the content-type.. Do you know the differences
between web/browser based perl scripts, and one's that aren't web
related? You say it doesn't work, but what does it not do, or what does
it DO? Do you get any errors?.. What are you running? More info would
help. 
Good luck...
--
Regards,
Tim Greer - chatmaster@c-zone.net
TRG Software and The Link Worm
http://www.linkworm.com
The Chat Base
http://www.chatbase.com
-----------------------------------------------------------------------
* Creator of Paradise Chat, Chat Central & Spiral Chat
* Receiving over 250,000+ hits a day from users Worldwide!!!
* Sales of custom chat server scripts * CGI/Perl scripting
* Script trouble shooting/security * Modify & debug scripts
* Freelance Perl Scripting for any purpose or application


       Copyright ) 1998 TRG Software and The Link Worm.


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

Date: 27 Dec 1998 04:15:05 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <764c89$h6i$1@client3.news.psi.net>

Gilly (mingtian@hanmail.net) wrote on MCMXLII September MCMXCIII in
<URL:news:36857e42.6474464@usenet.kornet21.net>:
++ abigail@fnx.com (Abigail) wrote:
++ 
++ :GiLLY (hklife@soback.kornet21.net) wrote on MCMXLI September MCMXCIII in
++ :<URL:news:3681e0f3.25474765@news.snu.ac.kr>:
++ :++ :<!-- So, what about this? --
++ :++ :>
++ :++ 
++ :++ s/<!\s*-\s*-.*?-\s*-\s*>//gs;
++ :
++ :
++ :<!-- So, what - - > about this then? -->
++ 
++ if both '- - >' and '-->' are valid then which is the closing tag?


Neither.



Abigail


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

Date: 27 Dec 1998 04:18:58 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <764cfi$h6i$2@client3.news.psi.net>

Gilly (mingtian@hanmail.net) wrote on MCMXLII September MCMXCIII in
<URL:news:36847de4.6380144@usenet.kornet21.net>:
++ tadmc@metronet.com (Tad McClellan) wrote:
++ 
++ :GiLLY (hklife@soback.kornet21.net) wrote:
++ :
++ :: :<!-- So, what about this? --
++ :: :>
++ :
++ :: s/<!\s*-\s*-.*?-\s*-\s*>//gs;
++ :      ^^^ ^^^     ^^^
++ :
++ :   I don't think spaces are allowed there (I know they are not in
++ :   SGML, but if we want to call what is accepted by popular browsers
++ :   "real HTML", then I don't know ;-)
++ 
++ <!- - So, what  about this then? 
++ - - >
++ 
++ Communicator 4.5 for win32 thinks the above as a comment.
++ and don't know about IE as i don't have it.


Netscape has never been able to produce a piece of software that has
been able to parse SGML comments correctly.

Your reports on what communicator does have no value.


As you can check for yourself in the specifications, '<!- ' is illegal.




Abigail


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

Date: 27 Dec 1998 04:21:56 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <764cl4$h6i$3@client3.news.psi.net>

GiLLY (hklife@soback.kornet21.net) wrote on MCMXLIII September MCMXCIII
in <URL:news:36842cab.2690974@news.snu.ac.kr>:
++ On 24 Dec 1998 17:16:49 GMT, abigail@fnx.com (Abigail) wrote:
++ 
++ >GiLLY (hklife@soback.kornet21.net) wrote on MCMXLI September MCMXCIII in
++ ><URL:news:3681e0f3.25474765@news.snu.ac.kr>:
++ >++ :<!-- So, what about this? --
++ >++ :>
++ >++
++ >++ s/<!\s*-\s*-.*?-\s*-\s*>//gs;
++ >
++ >
++ ><!-- So, what - - > about this then? -->
++ 
++ now,
++ 
++ s/<!\s*--.*?--\s*>//gs;


<!-- So, what <!-- --> about this then? -->


Don't try to parse HTML with a bunch of regex, each attacking the
entire text. Write a parser. Or use the one from CPAN.



Abigail


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

Date: 27 Dec 1998 09:23:47 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Retrospective on comp.lang.perl.moderated?
Message-Id: <764ub3$qm5$1@news.NERO.NET>

In article <ylbtkvuox6.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>And now we have a .moderated group that, even if there is no other
>distinguishing factor, at least has a considerably lower traffic load,
>which is precisely what some people want.

I was not aware that having a "considerably lower traffic load" sans
any other distinguishing factor (e.g. better discussions, higher S/N)
was a valid reason for creating a new USENET newsgroup. I would consider
such a group to be a failure. You can achieve the same effect by simply
selecting only every 5th or 8th article from the original group.

>So it seems to me that everyone wins.  I like it when that happens.  :)

Can we end this "year end evaluation" nonsense? It isn't on topic for
either group, and this is the only group I know of that thinks there is
some requirement for a year end evaluation. 



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

Date: 27 Dec 1998 09:04:15 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Retrospective on comp.lang.perl.moderated?
Message-Id: <764t6f$qc3$1@news.NERO.NET>

In article <367EB2A4.73F47D66@tcon.net>,
Ken McNamara  <conmara@tcon.net> wrote:
>I hope you'll continue the moderated page.  

What "moderated page"? 

>Is there anyway to sort through
>the 'newbie See John run!' stuff on misc and post/move the better questions
>onto moderated?

If the poster wanted it to appear in .moderated, he would have posted it
there. If you lose information because you choose not to read it where
it appears, you have nobody to blame but yourself. Cut off your nose to
spite your face and you have to put up with the lack of a nose.

Now, can one of the moderators please explain why this bogus "year end
reconcilliation" stuff is appropriate for a discussion group about
perl? Isn't this exactly the sort of advocacy/troll that you had to have
a moderated group so you could get away from it?


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

Date: 27 Dec 1998 05:44:45 GMT
From: vkuchu@aol.com (VKuchu)
Subject: Re: sending a query from one script to another
Message-Id: <19981227004445.12581.00002301@ng-cr1.aol.com>


Try File handles open &
 close A & B
 You can catch what went in script B in
 Script A!!

 --Friendly neighbourhood
    Spiderman!


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

Date: Sun, 27 Dec 1998 15:10:26 GMT
From: fs60@rumms.uni-mannheim.de
Subject: Serverside Talk on ASP and JSP reachable again !
Message-Id: <765il1$jef$1@nnrp1.dejanews.com>

Serverside Talk on ASP and JSP reachable again !

The guys from <a href="http://www.netit.net">Netit.net</a>  changed their
Provider, but now they are online again.

They provide a Newssite with daily news relating to themes like ASP, JSP and
Serverside technologies in general :<br>
http://www.netit.net/asp/asp.html

You could subscribe for a free e-mail newsletter and
you can find there some tuorials and a ASP/JSP Newsgroup too.



If there are news on serverside technologies, please give <a
href="mailto:fs60@rumms.uni-mannheim.de">me</a> a hint.

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


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

Date: 27 Dec 1998 06:32:57 GMT
From: loans2001@aol.com (Loans2001)
Subject: simple code needed to determine date to print on a web page.
Message-Id: <19981227013257.05295.00002089@ng11.aol.com>

Hello perl Fans,

I wrote a perl program that reads in two files, does some computations, and
prints out some tables of numbers. 

I'd like my program to print the date my page was last updated. (Interest rates
page). Do I have to use the stat function? Could someone please provide in
plain english "the code" I need to write in Perl. 

It should look at the date the interest rates file was uploaded, and looks at
the current system date, computes the number of seconds ago it was uploaded, I
guess, and then how do I convert this number to print the date the file was
actually uploaded?



Thanks.

Scot King
http://www.mortgage-pros.com


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

Date: Sun, 27 Dec 1998 06:58:53 GMT
From: mschechter@earthlink.net (Mike Schechter)
Subject: Re: simple code needed to determine date to print on a web page.
Message-Id: <3685d6f3.50643631@news.earthlink.net>

On 27 Dec 1998 06:32:57 GMT, loans2001@aol.com (Loans2001) wrote:

>Hello perl Fans,
>
>I wrote a perl program that reads in two files, does some computations, and
>prints out some tables of numbers. 
>
>I'd like my program to print the date my page was last updated. (Interest rates
>page). Do I have to use the stat function? Could someone please provide in
>plain english "the code" I need to write in Perl. 
>
>It should look at the date the interest rates file was uploaded, and looks at
>the current system date, computes the number of seconds ago it was uploaded, I
>guess, and then how do I convert this number to print the date the file was
>actually uploaded?

I believe the date, or last modified date, of the file will be the
date that it was last uploaded.  Thus, the stat() function will give
you what you want, with some other tweaking.  stat() returns the
number of seconds since the epoch (01 JAN 1900) that the file was
modified, among many other things.  Thus, you could get the last
modified date of the file, as far as hours, minutes, day, month, and
year are concerned, with the following:

<-- Begin Code -->

my ($mod_time, $hour, $min, $day, $mon, $yr, $outstr);

$mod_time = (stat("path_to_file/file_name")[9];

# Last modified time is index 9 of array returned by stat, so we
# grab that only.  We then go on to get the time in a usable
# format by supplying this number (remember it is in epoch
# seconds) to the localtime function, and return only the
# info we are interested in.

($min,$hour,$day,$mon,$yr) = (localtime($mod_time))[1..5];

# We now need to do some modifications, because of the format
# of the numbers returned by localtime, i.e., year is the
# number of years since 1900, month numbers run from 0 to
# 11, and also remember the time is returned in 24 hour
# (military) format.  For printing, we force the hours and
# minutes to print with two numbers for cases like 00:05,
# which would normally print as 0:5.

$yr += 1900;
$mon++;
$outstr = "$mon/$day/$yr at ".sprintf("%.2d",
$hour).':'.sprintf("%.2d", $min);
print "$outstr";

<-- End Code -->

And that's it.  Remember that you don't need to do any converting,
since the file time stamp should match the time that it was uploaded,
and you use the localtime function only because it is the function
that converts from epoch seconds to real values, with whatever value
you supply to it.

I have used this (almost) exact code in a program of mine.  The only
difference was that I used an array to hold the month names, and
printed out the month names as words not numbers using the index value
returned by localtime().

Hope this helps,

Mike Schechter



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

Date: Sun, 27 Dec 1998 13:28:22 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Re: test
Message-Id: <368627E6.978564F4@xs4all.nl>

Yeah, your test was succesful

You have written your first message in the Newsgroup comp.lang.perl.misc




Gnacco wrote:



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

Date: Sun, 27 Dec 1998 11:57:29 GMT
From: data-art@home.com (Franklin)
Subject: Re: Why does my browser try to download the script instead of execute it?
Message-Id: <36862030.386797545@news>

You're gonna think this is a STUPID solution, but to solve this
problem I created a dummy small script that works.  Then whenever my
real script exhibits this behavior, I cut the contents of my real
script onto a COPY of the operational dummy script.  Presto!  My
troubles are gone...

On 22 Dec 1998 06:29:47 GMT, worldmall@aol.com (Worldmall) wrote:

>Do you know why my browser tries to download the cgi/pl scripts I installed
>instead of executing them?  I changed the chmod to 755 and I even tried 777 but
>it still tried to download the scripts :(
>
>Could this mean the administrators have disabled cgi scripts from running in
>any directory other than cgi-bin?  They say they've enabled execute for all
>subdirectories as I requested but I just don't see it.
>
>Where should I start so I can make these scripts run properly?
>
>Thanks!
>
>Andre'
>p.s. I know I can't install them to aol, I've installed them to a different
>provider's site. Thanks again.



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

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

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