[15754] in Perl-Users-Digest
Perl-Users Digest, Issue: 3167 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 25 18:20:58 2000
Date: Thu, 25 May 2000 15:20:33 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <959293232-v9-i3167@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 25 May 2000 Volume: 9 Number: 3167
Today's topics:
User's System Date penpendisarapen@my-deja.com
Re: User's System Date <makarand_kulkarni@My-Deja.com>
Re: User's System Date (John Stanley)
Re: valid email address <iltzu@sci.invalid>
What alternative to PPM ? cfrjlr@my-deja.com
Re: What alternative to PPM ? <glauber.ribeiroNOglSPAM@experian.com.invalid>
Re: What alternative to PPM ? <glauber.ribeiroNOglSPAM@experian.com.invalid>
What is the @INC ??? (LMC)
Re: What is the @INC ??? <makarand_kulkarni@My-Deja.com>
Re: What is the @INC ??? <bert@scanlaser.nl>
What package does "xsubpp" belong to and where are upda <elstner@bellatlantic.net>
What web url to send scripts to the world??? <y-o-y@home.com>
Re: What web url to send scripts to the world??? <rootbeer@redcat.com>
Where to Start + FIFO Stack <cdt9@cornell.edu>
Re: Where to Start + FIFO Stack <makarand_kulkarni@My-Deja.com>
Re: Where to Start + FIFO Stack (Sebastian Marius Kirsch)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 25 May 2000 20:19:47 GMT
From: penpendisarapen@my-deja.com
Subject: User's System Date
Message-Id: <8gk1si$q7s$1@nnrp1.deja.com>
Hello. I'm not sure if this is the correct forum for this, but I hope
someone can help me. Is there a way for me to get the sytem date from
the user's pc using a PERL/CGI script? I'm writing a script that outputs
appointments and events based on the current date, but some of the users
may be from another time zone or country, so using localtime(time)
wouldn't work. I figure I can do this using Javascript, but I'd like to
know if it can be done through CGI, so users who turn off Javascript can
use it.
TIA
Victor Quimson
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 25 May 2000 13:55:32 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: User's System Date
Message-Id: <392D9344.CEBBF24D@My-Deja.com>
> Hello. I'm not sure if this is the correct forum for this, but I hope
> someone can help me.
This is not the correct forum.
> Is there a way for me to get the sytem date from
> the user's pc using a PERL/CGI script? I'm writing a script that outputs
> appointments and events based on the current date, but some of the users
> may be from another time zone or country, so using localtime(time)
> wouldn't work. I figure I can do this using Javascript, but I'd like to
> know if it can be done through CGI, so users who turn off Javascript can
> use it.
I am assuming the situation where your server and the browser
are not in the same time zone. In this case your form should have
a hidden field that will be posted to your CGI script on submit (unless
you want the users to enter the local date and time every time).
Give a value to this hidden variable (equal to the system date/time/and the
time zone
when the form is being displayed ). Use javascript to do this.
eg ( may not be exactly whatever you wanted..check a Javascript reference
text to get more info. This is just the general idea.
==
<FORM NAME="formname">
<INPUT TYPE="HIDDEN" NAME="hiddenname">
.. other input boxes and buttons go here...
</FORM>
<SCRIPT LANGUAGE="JavaScript"><!--
var now = new Date();
document.formname.hiddenname.value = now;
//--></SCRIPT>
------------------------------
Date: 25 May 2000 21:20:09 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: User's System Date
Message-Id: <8gk5e9$s7a$1@news.NERO.NET>
In article <8gk1si$q7s$1@nnrp1.deja.com>, <penpendisarapen@my-deja.com> wrote:
>Hello. I'm not sure if this is the correct forum for this, but I hope
>someone can help me. Is there a way for me to get the sytem date from
>the user's pc using a PERL/CGI script? I'm writing a script that outputs
>appointments and events based on the current date, but some of the users
>may be from another time zone or country, so using localtime(time)
>wouldn't work.
localtime(time) will return the current local date and time as the PC the
script is running on knows it.
If it does not work on your system, please explain what, exactly, is
broken, or why you think it is not working. Do you think that those
users of your script who are "from another time zone" do not want to
work in local time, or are you trying to compare results from many users
across time zones? If the latter, gmtime will give the time in GMT.
bash# perl /dev/tty
print scalar localtime(time);
Thu May 25 14:14:44 2000bash#
bash# perl /dev/tty
print scalar gmtime(time);
Thu May 25 21:18:26 2000bash#
>I figure I can do this using Javascript, but I'd like to
>know if it can be done through CGI, so users who turn off Javascript can
>use it.
If your users do not have a language available to them, then you should
not program your solutions in that language. If they all have perl, you
should stick with perl.
------------------------------
Date: 25 May 2000 18:41:51 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: valid email address
Message-Id: <959279673.24518@itz.pp.sci.fi>
In article <x7hfboj5lb.fsf@onceler.kcilink.com>, Vivek Khera wrote:
> return q{You specified an improper Internet email address format. Please
> use an address like <KBD>yourname@domain.com</KBD>. If you do not
> know what your address is, please do not guess or make one up --
> ask your system administrator what it is.}
> unless ($addr =~ m/\S+@[\-\w]+\.[\-\w]+/);
The header of this message contains two e-mail addresses. One of them
passes your test. One of them is valid and deliverable. Guess which.
(Wait, they both pass - your regexp isn't anchored. But if that
really is intentional, you've got useless "+" characters in it.)
--
Ilmari Karonen - http://www.sci.fi/~iltzu/
Please ignore Godzilla and its pseudonyms - do not feed the troll.
------------------------------
Date: Thu, 25 May 2000 21:34:51 GMT
From: cfrjlr@my-deja.com
Subject: What alternative to PPM ?
Message-Id: <8gk69p$tfm$1@nnrp1.deja.com>
We are testing behind a secure firewall where we do not have access to
internet (deliberately).
What alternatives are there to using PPM to install perl packages on
our test machines ?
For example, we would like to install perl tk.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Thu, 25 May 2000 14:47:43 -0700
From: glauber <glauber.ribeiroNOglSPAM@experian.com.invalid>
Subject: Re: What alternative to PPM ?
Message-Id: <007f9cf8.d06e1972@usw-ex0103-019.remarq.com>
In article <8gk69p$tfm$1@nnrp1.deja.com>, cfrjlr@my-deja.com
wrote:
>We are testing behind a secure firewall where we do not have
access to
>internet (deliberately).
>
>What alternatives are there to using PPM to install perl
packages on
>our test machines ?
>
>For example, we would like to install perl tk.
The easiest way to do what you want is to use ftp to get the
package from
http://www.activestate.com/PPMPackages/5.6/zips/
or
http://www.activestate.com/PPMPackages/5.005/zips/
(depending on your Perl version)
Then use ppm to install it from the zip file:
ppm filename.zip
glauber
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Thu, 25 May 2000 15:00:01 -0700
From: glauber <glauber.ribeiroNOglSPAM@experian.com.invalid>
Subject: Re: What alternative to PPM ?
Message-Id: <03fa86ca.d3a31be9@usw-ex0103-019.remarq.com>
I just realize i wrote something stoopid:
In article <007f9cf8.d06e1972@usw-ex0103-019.remarq.com>,
glauber <glauber.ribeiroNOglSPAM@experian.com.invalid> wrote:
[...]
>The easiest way to do what you want is to use ftp to get the
>package from
>
>http://www.activestate.com/PPMPackages/5.6/zips/
>or
>http://www.activestate.com/PPMPackages/5.005/zips/
Of course, i meant, use your web browser to download the package
from Activestate.
Also, to install, unzip the file, read the README.
Sorry, next time i'll read my own post before hitting
the "submit" button.
glauber
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Thu, 25 May 2000 14:58:02 -0400
From: "Martin C Dore (LMC)" <lmcmcad@lmc.ericsson.se>
Subject: What is the @INC ???
Message-Id: <392D77BA.9F8A870A@lmc.ericsson.se>
Many times I read, or have this message....So what is @INC.....
------------------------------
Date: Thu, 25 May 2000 13:23:32 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: What is the @INC ???
Message-Id: <392D8BC4.7B083EF4@My-Deja.com>
> Many times I read, or have this message....So what is @INC.....
array containing the list of places to look for perl scripts to be
evaluated
by the do EXPR, require or use constructs.
--
------------------------------
Date: Thu, 25 May 2000 22:50:44 +0200
From: Bert IJff <bert@scanlaser.nl>
To: "Martin C Dore (LMC)" <lmcmcad@lmc.ericsson.se>
Subject: Re: What is the @INC ???
Message-Id: <392D9224.ACE74153@scanlaser.nl>
"Martin C Dore (LMC)" wrote:
>
> Many times I read, or have this message....So what is @INC.....
see
perldoc lib
------------------------------
Date: Thu, 25 May 2000 14:42:31 -0400
From: "Dave Elstner" <elstner@bellatlantic.net>
Subject: What package does "xsubpp" belong to and where are updates?
Message-Id: <8gjsje$89n$1@skates.gsfc.nasa.gov>
While attempting to run makefile.pl in sybperl-2.12, I get the following
warning:
Writing Makefile for Sybase::CTlib
Warning: This extension wants to pass the switch "-prototypes" to xsubpp.
Your version of xsubpp is 1.0 and cannot handle this.
Please upgrade to a more recent version of xsubpp.
"xsubpp" is in c:\perl\lib\extutils. I've searched on both "xsubpp" and
"extutils" and can't find anything. Can someone tell me where I can get an
update?
Thanks,
-Dave
dave.elstner@gsfc.nasa.gov
------------------------------
Date: Thu, 25 May 2000 20:57:32 GMT
From: A <y-o-y@home.com>
Subject: What web url to send scripts to the world???
Message-Id: <0tgX4.209122$Tn4.1832339@news1.rdc2.pa.home.com>
And fetch, of course!
Andy
------------------------------
Date: Thu, 25 May 2000 14:55:17 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: What web url to send scripts to the world???
Message-Id: <Pine.GSO.4.10.10005251453590.14618-100000@user2.teleport.com>
On Thu, 25 May 2000, A wrote:
> Subject: What web url to send scripts to the world???
>
> And fetch, of course!
Are you wanting to share programs with others? Maybe you want to find a
software archive.
Are you wanting to do something else with the web? Maybe you want to find
a search engine.
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 25 May 2000 14:54:53 -0400
From: "Courtney Tompos" <cdt9@cornell.edu>
Subject: Where to Start + FIFO Stack
Message-Id: <8gjst3$h4i$1@news01.cit.cornell.edu>
Hello, I'm a complete newbie when it comes to Perl so I have a couple of
quick questions. (Please try to refrain from flaming the newbie =)
1) What's a good point for one to start learning Perl? I've got a good
handle on C/C++ and Java so much of the syntax seems easily translated...
2) How difficult would it be to implement a FIFO stack in Perl (i.e. a
script to accept form input, add the input to the top of the stack, and pop
the last entry)?
Thanks in advance!
Courtney Tompos
------------------------------
Date: Thu, 25 May 2000 13:25:15 -0700
From: Makarand Kulkarni <makarand_kulkarni@My-Deja.com>
Subject: Re: Where to Start + FIFO Stack
Message-Id: <392D8C2B.406582A6@My-Deja.com>
> 2) How difficult would it be to implement a FIFO stack in Perl (i.e. a
> script to accept form input, add the input to the top of the stack, and pop
> the last entry)?
very simple using perl arrays
see these docs
perldoc -f shift
perldoc -f unshift
-
------------------------------
Date: 25 May 2000 22:32:22 +0200
From: skirsch@moebius.inka.de (Sebastian Marius Kirsch)
Subject: Re: Where to Start + FIFO Stack
Message-Id: <8gk2km$4ot$1@moebius.priv>
Courtney Tompos schreibt:
> 1) What's a good point for one to start learning Perl?
Read "Programming Perl"[1] up to chapter 4. Read it again up to chapter
6. Then start to code, occasionally re-reading the sections that are
relevant to your problem at hand. And when you feel that you've got a
grip on the stuff in the first five chapters, read the rest. (I'm
deliberately leaving out chapter six here, which is about interprocess
communication, which means you should have read it once, but you can
always re-read it if you need it.)
> 2) How difficult would it be to implement a FIFO stack in Perl (i.e. a
> script to accept form input, add the input to the top of the stack,
> and pop the last entry)?
push @array, $last_input;
$next_input = shift @array;
Remember, Perl is a modern (some say postmodern) language; you don't
have to worry about allocating storage, free()ing memory, constructing
data structures etc.
[1] "Programming Perl" by Larry Wall, Tom Christiansen and Randal
Schwartz. Cambridge, Ko"ln, Paris, Sebastopol, Tokyo: O'Reilly, ^2
1991. ISBN 1-56592-149-6.
--
Yours, Sebastian <skirsch@moebius.inka.de>
I never wanted to be a painter. I wanted to be a tap dancer.
-- Andy Warhol
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 3167
**************************************