[12127] in Perl-Users-Digest
Perl-Users Digest, Issue: 5727 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 19 17:07:16 1999
Date: Wed, 19 May 99 14:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 19 May 1999 Volume: 8 Number: 5727
Today's topics:
Re: about: use strict; (Bart Lateur)
Re: about: use strict; <dgris@moiraine.dimensional.com>
Re: about: use strict; (Larry Rosler)
Re: Accents Sensitivity (Bart Lateur)
ANNOUNCE: Champaign-Urbana.pm Meeting Tue May 25 (Daniel S. Lewart)
Re: boolean test input... (Andrew Allen)
Re: Browser's current URL? <swarren@www.wwwdotorg.org>
Re: can someone help me with locking??? <g059@mailserv.uni-giessen.de>
Converting url encoded strings (eg. %20 to space) <bostjan.marusic@megaklik.si>
Re: FAQ 4.41: How do I compute the difference of two ar (Andrew Allen)
Re: FAQ 4.41: How do I compute the difference of two ar (Larry Rosler)
FreeBSD and Encrypted Passwords <wntrwolf@nephillim.net>
How do I get the IP of the server I am on. <Mark.Conlin@bridge.bellsouth.com>
Re: In dire need of help! System() call on NT... <swarren@www.wwwdotorg.org>
Re: or vs || <swarren@www.wwwdotorg.org>
Perl Developer/Programmer Wanted for NJ <morin@cisny.com>
Perl in the News: _Cryptonomicon <tchrist@mox.perl.com>
Re: Printing hash of hashes. (Michel Dalle)
Re: Reg Exp Q! <*@qz.to>
Re: Running a perl script from an applet <carlos@geometrictech.com>
Re: Shell Vars <swarren@www.wwwdotorg.org>
Re: Simple Time Manipulation <gellyfish@gellyfish.com>
Re: TROLL ALERT (Re: Perl "constructors") zenin@bawdycaste.org
Verifying passwd in FreeBSD anakim@my-dejanews.com
Re: Waiting for input on multiple Filehandles <swarren@www.wwwdotorg.org>
web access counters <ifedulov@outlook.net>
Re: what's wrong with my head(er)...? <gellyfish@gellyfish.com>
Re: Y2K. localtime(time) (Larry Rosler)
Re: Y2K. localtime(time) (I R A Aggie)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 19 May 1999 19:37:35 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: about: use strict;
Message-Id: <37441168.3837774@news.skynet.be>
David Cassell wrote:
>And also for rather small scripts, if yuo type like me.
> ^^
>[example appearing conveniently here || ]
"use strict" won't help if you have both variables $yuo and $you...
Bart.
------------------------------
Date: 19 May 1999 14:18:35 -0600
From: Daniel Grisinger <dgris@moiraine.dimensional.com>
Subject: Re: about: use strict;
Message-Id: <m3n1z0vmn8.fsf@moiraine.dimensional.com>
bart.lateur@skynet.be (Bart Lateur) writes:
> David Cassell wrote:
>
> >And also for rather small scripts, if yuo type like me.
> > ^^
> >[example appearing conveniently here || ]
>
> "use strict" won't help if you have both variables $yuo and $you...
It will if you keep your scopes small enough. Unless you pick
really bad variable names.
dgris
--
Daniel Grisinger dgris@moiraine.dimensional.com
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Wed, 19 May 1999 13:53:08 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: about: use strict;
Message-Id: <MPG.11acc48c29625182989ab0@nntp.hpl.hp.com>
In article <37441168.3837774@news.skynet.be> on Wed, 19 May 1999
19:37:35 GMT, Bart Lateur <bart.lateur@skynet.be> says...
> David Cassell wrote:
>
> >And also for rather small scripts, if yuo type like me.
> > ^^
> >[example appearing conveniently here || ]
>
> "use strict" won't help if you have both variables $yuo and $you...
If '-w' doesn't find the problem, because each of them is defined, then
one would have to rely on the DWIMmer (which wouldn't get it right
either). Debugging just won't go away all by itself. Sigh...
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 19 May 1999 19:37:33 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Accents Sensitivity
Message-Id: <37431040.3542278@news.skynet.be>
amenrique@my-dejanews.com wrote:
>I have developed a search engine in Spanish. It works fine. The problem
>is that users are trying to find words without writing the accents used
>in spanish, i.e. they search for Maria with no results, as the right
>spelling is Marma (with an accent on the i)
>
>Is there an easy way the make the search "not sensitive" to the
>accents, so a search for Maria would return all findings with Marma?
Well... it depends on the text you're searching for. If THAT text
contains accents, it makes not much sense converting the user's accented
characters to unaccented ones.
Something I've already doen, is replace
maria
with
m[aa`bc]r[iml][aa`bc]
and use this as the search pattern. Tada: accent insensitive search!
Bart.
------------------------------
Date: 19 May 1999 20:19:30 GMT
From: d-lewart@uiuc.edu (Daniel S. Lewart)
Subject: ANNOUNCE: Champaign-Urbana.pm Meeting Tue May 25
Message-Id: <7hv6ci$6fd$1@vixen.cso.uiuc.edu>
Champaign-Urbana Perl Mongers,
Our May meeting will be:
Tue May 25 19:00 CDT
Papa Del's
206 E Green St
Champaign, IL
We will be in the non-smoking area. I will wear my Perl t-shirt.
See y'all,
Daniel Lewart
Champaign-Urbana Perl Mongers Fearless Leader
d-lewart@uiuc.edu
http://cmi.pm.org/
------------------------------
Date: 19 May 1999 19:20:57 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: boolean test input...
Message-Id: <7hv2up$q4o$2@fcnews.fc.hp.com>
Jeremiah J Marble (jjm69@columbia.edu) wrote:
: hi *,
: i was wondering if anyone had written, or could refer me to, a good
: function to parse a line like
: -->
: html AND javascript AND (perl NOT (vb OR java))
: <--
: in order to extract, using those keywords, the info from a structure like
: -->
: $prog_lang{$keyword};
: <--
Here's a shot (untested):
%ops=('AND' => 'and', 'NOT' => 'and not', 'OR' => 'or');
$_='html AND javascript AND (perl NOT (vb OR java))';
s/\w+/$ops{$&} || "\$prog_lang{'$&'}"/eg;
$value=eval $line;
Andrew
------------------------------
Date: Wed, 19 May 1999 15:18:13 -0400
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Browser's current URL?
Message-Id: <7hv2sl$mnb$1@owl.slip.net>
LEB <airman@inreach.com> wrote in message
news:3741FA6C.2E2B74B@inreach.com...
> Anyone know of a way to grab the current url in a browser or window?
> i.e. You are at http://www.aeropublishers.com. I need to grab that url
> information to a variable if possible???? Also, I will need to grab the
> url in a frame of the browser window, etc.
>
> Two frames:
> Frame1 has content
> Frame2 is running a perl program that submits the url of Frame1
The latter is extremely unlikely. You probably have a frame that is
displaying the output of a Perl CGI script running (or rather, that was run)
on the Web server. As such, there is no way for the CGI script to know the
URL of the other frame directly.
There are ways for a CGI to determine its own URL. This might map to the URL
of the other frame. Alternatively, the frameset could pass a parameter to
the CGI that has this information.
But, this is a CGI question, not a Perl question and you'd find people more
interested in such things in comp.infosystems.www.authoring.cgi.
--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com http://www.techhouse.com/
mailto:swarren@wwwdotorg.org http://www.wwwdotorg.org/
MIME, S/MIME and HTML mail are acceptable
------------------------------
Date: Wed, 19 May 1999 22:20:22 +0200
From: Marc Dietrich <g059@mailserv.uni-giessen.de>
To: Cameron Dorey <camerond@mail.uca.edu>
Subject: Re: can someone help me with locking???
Message-Id: <Pine.A41.4.05.9905192216010.15994-100000@c2.hrz.uni-giessen.de>
On Wed, 19 May 1999, Cameron Dorey wrote:
> [cc'd to md]
>
> Marc Dietrich wrote:
> >
> > try the flock mechanism. See perldoc -f flock or man flock. This only
> > works on Unix Systems.
>
> BRAAAK! Wrong! Next contestant spin the Wheel, please. flock works on
> WinNT, but not on Win9x. I believe I have also seen that it works on
> VMS, but have had no experience with that OS since 1982.
>
> Cameron
>
WinNT is based upon a unix derivate developed by Digital. Win9x is based
upon QDOS (Quick and Dirty OS) developed by someone I don't know (and many
other don't too) and bought by M$ for $25000 20 years ago.
Marc
----------
Marc Dietrich marc.dietrich@physik.uni-giessen.de
------------------------------
Date: Wed, 19 May 1999 22:17:09 +0200
From: "Bostjan Marusic" <bostjan.marusic@megaklik.si>
Subject: Converting url encoded strings (eg. %20 to space)
Message-Id: <7hv6bb$2eb$1@planja.arnes.si>
Is there a function that converts strings passed to the program with the
url?
Example:
example.cgi?param1&string%20parameter%20with%20spaces
I would like to get this in to the form
$ARGV[0] = param1
$ARGV[1] = string parameter with spaces
Best Regards,
Bostjan
------------------------------
Date: 19 May 1999 19:06:13 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: FAQ 4.41: How do I compute the difference of two arrays? How do I compute the intersection of two arrays?
Message-Id: <7hv235$q4o$1@fcnews.fc.hp.com>
Larry Rosler (lr@hpl.hp.com) wrote:
: But as there is no equivalent short-circuiting exclusive-or operator:
: ^ ^^ xor
: NO!
nitpicking-- xor, by its definition, cannot be short-circuiting.
Andrew
------------------------------
Date: Wed, 19 May 1999 12:33:58 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: FAQ 4.41: How do I compute the difference of two arrays? How do I compute the intersection of two arrays?
Message-Id: <MPG.11acb200c630cf81989aaf@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <7hv235$q4o$1@fcnews.fc.hp.com> on 19 May 1999 19:06:13 GMT,
Andrew Allen <ada@fc.hp.com> says...
> Larry Rosler (lr@hpl.hp.com) wrote:
> : But as there is no equivalent short-circuiting exclusive-or operator:
>
> : ^ ^^ xor
> : NO!
>
> nitpicking-- xor, by its definition, cannot be short-circuiting.
What nit are you picking? Of course there can't. Because it is so
obvious, I actually snipped the sentence in my post that explained why,
before I sent it, so as not to insult anyone's intelligence
gratuitously. Perhaps that was a mistake. But I didn't think H. L.
Mencken's saw* applied to the intelligence of the members of this
newsgroup. :-)
Anyway, perlop is quite explicit about it:
"Binary ``xor'' returns the exclusive-OR of the two surrounding
expressions. It cannot short circuit, of course."
But perlop doesn't explain why, either. :->
(In the deep dark crevasses of my brain, I recall someone posting a
request for a '^^' operator, before being politely shouted down.)
* No one ever went broke underestimating the taste of the American
public.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 19 May 1999 19:43:10 GMT
From: -{WinterWolf}- <wntrwolf@nephillim.net>
Subject: FreeBSD and Encrypted Passwords
Message-Id: <7hv48e$hck$1@nnrp1.deja.com>
I am writing a set of scripts that will need to validate username and
password against the system passwd file. Since FreeBSD doesn't use
shadow password files, I am having trouble getting the original
encrypted password string for comparison against the one submitted by
the script user. Does anyone have experience in getting the password
string from the pw.db file?
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 19 May 1999 15:53:08 -0400
From: Mark Conlin <Mark.Conlin@bridge.bellsouth.com>
Subject: How do I get the IP of the server I am on.
Message-Id: <374316A4.8CA116F0@bridge.bellsouth.com>
How can I get the IP of the server I am running on ?
Thanks
Mark
------------------------------
Date: Wed, 19 May 1999 15:30:30 -0400
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: In dire need of help! System() call on NT...
Message-Id: <7hv3jn$mqc$1@owl.slip.net>
<webmaster@man.amis.com> wrote in message
news:7httkj$lhl$1@nnrp1.deja.com...
> I am working on NT platform. I want to run an expect script by passing
> to it two paramaters. These are from the username/password form fields
> filled in by the user. The expect script will do something with it. My
> problem is it is not doing anything. I have already tried all means I
> have found in dejanews (including the one below) but nothing seems to
> work. It's suppose to authenticate the username & password against a VAX
> account. Please help me. The expext script, below the Perl code,
> already works. Any ideas will be greatly appreciated. Thanks!!
Some things to try:
Does the expect script work when executed with the exact same command-line
from the command-prompt?
In general, passing a username and password on the command-line is A Bad
Thing, since it might make it possible for someone to run a ps-equivalent to
grab the password...
In your description, you state nothing happens. The code you gave performs
quite a bit of error checking and prints out various information based on
the error. I assume you mean it really does print nothing?
One thought: you probably can't use 'sheila.exp' as a command, you need to
do something similar to:
expect sheila.exp user pass
since Windows doesn't support #! or anything that would associate sheila.exp
with expect. Note that you can fool cmd.exe into doing a mapping of *.exp ->
expect, but I don't think this works with system() in Perl.
--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com http://www.techhouse.com/
mailto:swarren@wwwdotorg.org http://www.wwwdotorg.org/
MIME, S/MIME and HTML mail are acceptable
------------------------------
Date: Wed, 19 May 1999 15:41:45 -0400
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: or vs ||
Message-Id: <7hv48q$mti$1@owl.slip.net>
Andre Arpin <arpin@adan.kingston.net> wrote in message
news:3742c1e9.0@news.cgocable.net...
> Given the following definition I would not expect the output from my
> program.
>
> Logical and, or, not, and xor
> As more readable alternatives to &&, ||, and !, Perl provides the
and,
> or and not operators. The behavior of these operators is identical--in
> particular, they short-circuit the same way.[34]
>
> from
> Programming Perl
> By Larry Wall
>
>
> It seems that >>> or and || <<< are different in more ways then
precedence.
> Any one knows the proper definition.
>
> sub a
> {
> $x='';
> print "$x a ";
> return $x;
> }
>
> sub b
> {
> print "b ";
> return 1;
> }
>
> print "or >>";
> print a or b;
prints the result of calling a (hence the a in the output), then 'or's the
result of the print with the result of calling b.
> print "\n";
> print "|| >>";
> print a || b;
calculates a||b (which in turn prints ' a b ') then prints the result of
this (which is 1)
> OUTPUT:
>
> or >> a
> || >> a b 1
--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com http://www.techhouse.com/
mailto:swarren@wwwdotorg.org http://www.wwwdotorg.org/
MIME, S/MIME and HTML mail are acceptable
------------------------------
Date: Wed, 19 May 1999 20:02:45 GMT
From: "Bill Morin" <morin@cisny.com>
Subject: Perl Developer/Programmer Wanted for NJ
Message-Id: <FNE03.162$d5.80475@client.news.psi.net>
Greetings!
My name is Bill Morin, and I'm the Managing Director of Concepts in Staffing
in New York City, a recruiting firm specializing in New Media Technologies.
One of our clients, a Financial Services with local offices in Jersey City,
NJ,
is actively seeking a fulltime Perl Developer/Programmer to take part in its
internet and intranet development projects. Their platforms are UNIX -
Solaris and LINUX - and they'd prefer Perl experience in one or both of
these flavors.
Should be familiar with cgi.pm and perl5 object-oriented tools; JavaScript
and/or HTML would be considered plusses. Experience need not be extensive,
but strictly academic experience will not be considered at this time. 4-year
college degree is a plus. Good communication skills, both oral and written,
are important. Salary ranges from $60-70K plus a Bonus. Our client is VERY
motivated to hire someone immediately. Please contact me for consideration
or further information. Thanks!
Regards,
Bill Morin
Managing Director
Concepts in Staffing
Email: morin@cisny.com
Phone: 212.293.4355
SnailMail: 9 East 37th Street
New York, NY 10016-2822
------------------------------
Date: 19 May 1999 13:53:22 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Perl in the News: _Cryptonomicon
Message-Id: <374316b2@cs.colorado.edu>
If you haven't checked out the crypto Perl program
in Neal Stephenson's newest novel, _Cryptonomicon_,
you can see it explained at
http://www.counterpane.com/solitaire.html
Source is there, too.
--tom
--
"I'd explain it to you, but your head would blow up."
- Steven Wright
------------------------------
Date: Wed, 19 May 1999 20:10:35 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Printing hash of hashes.
Message-Id: <7hv5q9$ndh$1@xenon.inbe.net>
In article <7huqr0$ab4$1@nnrp1.deja.com>, rajeshsharda@my-dejanews.com wrote:
>Hi,
>
> I have a hash array.
> The values in this hash array are the names of the other hash arrays.
>
> Is there any way I can print the key-value pair of the hash arrays
>which are in the values of the first hash array?
One way would be to include the following lines in your perl script :
..
system("perldoc perldsc") || die "Can't find the relevant documentation for
your question : $!";
..
As an alternative, look up the 'perldsc' page in your HTML documentation,
or run 'perldoc perldsc' from command line.
For the rest, I wish you a merry RTFM :-)
Michel.
------------------------------
Date: 19 May 1999 19:53:52 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Reg Exp Q!
Message-Id: <eli$9905191546@qz.little-neck.ny.us>
In comp.lang.perl.misc, Bill Jones <bill@fccj.org> wrote:
> /(?:(?:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i;
Match a '1' optionally followed by a . or -
previous line optional
An optional ( followed by three digits and an optional ) followed
by an optional . or -
previous four lines optional
Match three digits followed by an optional . or -
Match four digits
Match an 'x' (case insensitive) followed by one or more digits
previous line optional
Here was how I rewrote it a few weeks ago:
(
$one, $area, $exchange, $local, $extension,
$int, $country, $intcity, $intlocal, $intextension
) =
m! \b (1?) \s* (?: [(./-]? \s* (\d{3}) \s* [)./-]? \s* )?
(\d{3}) (?: \s* [./-] \s* | \s+ )? (\d{4}) \s* (x \s* \d+)? \b
| \b (0 \s* 11) [\s./+-]* \(? (\d{3}) \)? [\s./+-]*
(\d{2,}) [ ./+-]* (\d+) \s* (x \s*\d+)? \b
!ix
After further study of international numbers, I've found that I
do not have enough information about them to have any high
confidence in my abiulity to recognize them via RE without also
finding any arbitrary number of five or more digits that happens
to come after a '+'. Still, for this RE, if $int is defined, then
it was the international portion of the RE that matched.
Elijah
------
gathered international phone numbers from spam and whois records
------------------------------
Date: Wed, 19 May 1999 14:10:29 -0600
From: Carlos Hernandez <carlos@geometrictech.com>
Subject: Re: Running a perl script from an applet
Message-Id: <37431AB5.8B12A20E@geometrictech.com>
The only way I can think of is using the "showDocument" method. You call another page, and in that page is your perl scrip... If you know of any other method, please let me know!
--- Carlos
carlos@geometrictech.com
"Denley, Jake (EXCHANGE:FITZ3:9D14)" wrote:
> I have a perl script that I want to call from my Java applet. The
> script takes two parameters, which I would like to pass from the
> applet. Is it possible to run a perl execuatable from the applet? The
> script will simply create a file which I will be using later on in the
> applet.
>
> Is this possible and if so how is it done?
>
> Jake Denley
> jaked@comnet.ca
------------------------------
Date: Wed, 19 May 1999 15:20:07 -0400
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Shell Vars
Message-Id: <7hv308$mnr$1@owl.slip.net>
Todd McLaughlin <toddm@waltz.rahul.net> wrote in message
news:7hsu17$n8t$1@samba.rahul.net...
> How can a get the value of a shell variable in my perl script? Namely, I
want ~.
Use the variable %ENV. To find out about this, execute:
perldoc perlvar
You'll want something like:
$ENV{ 'environment variable name' }
I've never heard of a ~ variable before, though. Do you mean the user's home
directory? This might be stored in $ENV{HOME} depending on your shell. You
might want to investigate reading it from /etc/passwd based on the user's
uid, if you're on Unix.
--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com http://www.techhouse.com/
mailto:swarren@wwwdotorg.org http://www.wwwdotorg.org/
MIME, S/MIME and HTML mail are acceptable
------------------------------
Date: 18 May 1999 22:05:31 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Simple Time Manipulation
Message-Id: <7hso7b$5uv$1@gellyfish.btinternet.com>
On 18 May 1999 20:21:25 GMT hymie! wrote:
> In our last episode, the evil Dr. Lacto had captured our hero,
> Jonathan Stowe <gellyfish@gellyfish.com>, who said:
>>Newsworthy <hannum@ohio.edu> wrote:
>>> Hello,
>>>
>>> I want to be able to add 24 hours to the (timelocal) funciton. Could
>>> somebody tell me how I can best do this?
>>>
>>
>>I assume you mean localtime ?
>>
>>$time = localtime(time + 86400);
>>
>>Which of course might fail at some places at certain times of the year but
>>its usually good enough ;-}
>
> Why will this fail? Daylight savings time doesn't change the fact that
> 24 hours is 86,400 seconds.
>
Of course it is - I kind of leapt ahead to the idea of tomorrow and
yesterday.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: 19 May 1999 19:33:22 GMT
From: zenin@bawdycaste.org
Subject: Re: TROLL ALERT (Re: Perl "constructors")
Message-Id: <927142546.431844@localhost>
armchair@my-dejanews.com wrote:
>snip<
: And the documentation does still have me baffled. For instance:
:
: "localtime - convert UNIX time into record or string using local time"
:
: Maybe you can explain why they are using the term record in Perl
: documentation?
That's easy, it doesn't:
$ perldoc -tf localtime | grep record | wc
0 0 0
$ perldoc -tf localtime
localtime EXPR
Converts a time as returned by the time function to a 9-element
array with the time analyzed for the local time zone. Typically
used as follows:
# 0 1 2 3 4 5 6 7 8
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
>>SNIP<<
Ok, so maybe it should say "list" instead of "array", BFD.
--
-Zenin (zenin@archive.rhps.org) Caffeine...for the mind.
Pizza......for the body.
Sushi......for the soul.
-- User Friendly
------------------------------
Date: Wed, 19 May 1999 19:37:17 GMT
From: anakim@my-dejanews.com
Subject: Verifying passwd in FreeBSD
Message-Id: <7hv3td$h8t$1@nnrp1.deja.com>
I'm writing a set of scripts to check passwords on
a FreeBSD system. Because FreeBSD doesn't use
a shadow file and stores the passwd string in a db
file, I'm having trouble getting the original
encrypted passwd for comparison.
Does anyone know how to go about doing this?
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 19 May 1999 15:25:40 -0400
From: "Stephen Warren" <swarren@www.wwwdotorg.org>
Subject: Re: Waiting for input on multiple Filehandles
Message-Id: <7hv3al$mp7$1@owl.slip.net>
Jeremy Burton <jpburton@netspace.net.au> wrote in message
news:37426859.B04E3FC4@netspace.net.au...
> Hi There,
> I am attempting to write some perl code which will read from both a
> named pipe, and also from a com port. I am trying to work out how to
> write the perl code such that whilst in a loop, it will wait for input
> either on the com port OR on the named pipe, and then continue through
> the loop whenever one of these is acheived. Does
> anyone know of a way in which I can do this? I have tried using select
> with 4 arguments, however I was only able to get this to wait for the
> second input device
> (whichever order i put them in didn't matter) to have data waiting.
>
> Any help/pointers/etc would be most helpful,
Execute the following:
perldoc -f select
However, since you say 'com port' I assume you're running on Windows. This
might make it difficult to use select on the serial port. Select works on
file descriptors and I'm unsure if you can access the com ports this way?
Perhaps one can just open( FH, 'COM:' ) ;
Anyway, for anything that can be a file descriptor, then select() is the way
to go.
--
Stephen Warren, Snr Systems Engineer, Technology House, San Francisco
mailto:swarren@techhouse.com http://www.techhouse.com/
mailto:swarren@wwwdotorg.org http://www.wwwdotorg.org/
MIME, S/MIME and HTML mail are acceptable
------------------------------
Date: Wed, 19 May 1999 19:46:21 GMT
From: "Igor Fedulov" <ifedulov@outlook.net>
Subject: web access counters
Message-Id: <hyE03.7938$Gn3.1390@news.rdc1.il.home.com>
Hello world of Perl gurus!
Help please to newbie in Perl. Does anybody know where can I get a free
counter .cgi script for my home page. Server running Apache under Unix.
Best regards,
Igor Fedulov
http://www.outlook.net/~ifedulov
------------------------------
Date: 18 May 1999 22:23:01 -0000
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: what's wrong with my head(er)...?
Message-Id: <7hsp85$5v3$1@gellyfish.btinternet.com>
On Tue, 18 May 1999 12:19:11 -0500 brent wrote:
> admitted newbie has following headache --
>
> trying to learn some perl for CGI stuff. I've been using variations of the
> following code to print to the browser with no success. When I debug it from
> the command line it keeps closing the <body> & <html> tags before putting
> any of my content in ... what up with that?
>
> Any advice would be greatly appreciated ...
>
> ------------------------
>
> print $query->header;
>
> print $query->start_html(-title=>'Votes Returned',
> -BGCOLOR=>'blue');
>
> h2('Percentages'),
>
> print p("The percentage of those who answered Yes is :
> $yes_percent."),
> print p("The percentage of those who answered No is :
> $no_percent."),
> print p("The percentage of those who answered Maybe is :
> $maybe_percent."),
> print p("$total people have voted so far."),
>
> print $query->end_html;
>
Is this your actual code ? I ask because it appears that you are mixing
the OO and procedural interfaces to the CGI module and whilst I am not
sure if this going to cause your problem and am too tired to test it
right now, I do know that its probably not what you want to be doing
for other reasons.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
Hastings: <URL:http://www.newhoo.com/Regional/UK/England/East_Sussex/Hastings>
------------------------------
Date: Wed, 19 May 1999 12:08:15 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Y2K. localtime(time)
Message-Id: <MPG.11acabf6925c5e28989aae@nntp.hpl.hp.com>
[Posted and a courtesy copy mailed.]
In article <3742e3cd.0@usenet.fccj.cc.fl.us> on Wed, 19 May 1999
12:17:13 -0400, Bill Jones <bill@fccj.org> says...
...
> > [about Matt's script archive]
...
> Which ones do you find more worthwhile to rewrite ?
> (Some should be dumped and started over...)
The only one I have used (actually, passed on to a non-Perl-programmer
to use) is formmail, which simply accepts CGI input from a static HTML
form and generates e-mail with the form's field contents. The
'sendmail' address is probably hard-wired into the program.
In addition to being '-w' and 'use strict;' intolerant, this script does
inadequate error checking. That is probably typical of all of the
scripts. But the 'logic' of this particular dummy is probably adequate,
and maybe for all of them. After all, they are supposed to be
functional, no?
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 19 May 1999 19:06:04 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Y2K. localtime(time)
Message-Id: <slrn7k6325.6jo.fl_aggie@thepentagon.com>
On 19 May 1999 16:16:11 +0100, Jonathan Stowe <gellyfish@gellyfish.com>, in
<3742d5bb@newsread3.dircon.co.uk> wrote:
+ Maybe we ought to post bits of the code (or even the whole thing :) at the
+ weekend and do a group rewrite ...
I can hack on a few things, as time permits. I would like someone(s)
else to review my code for stupidities, tho. Can we obtain a review
board, please?
James - would probably improve my perl a few hundred percent...
------------------------------
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 5727
**************************************