[7167] in Perl-Users-Digest
Perl-Users Digest, Issue: 792 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 29 18:21:15 1997
Date: Tue, 29 Jul 97 15:01:36 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 29 Jul 1997 Volume: 8 Number: 792
Today's topics:
Re: Need help finding crypt... (William [Billy] Harrison)
Re: Need help finding crypt... (William [Billy] Harrison)
Re: Newbie Q. If statement confusion <rootbeer@teleport.com>
Re: Newbie: Needs to know how to get script to read rem (Felix Morley Finch)
NNTPClient Module <serginho@alpha.hydra.com.br>
Re: Opposite of ord <helmrl@aur.alcatel.com>
Re: Parsing line by line <rootbeer@teleport.com>
Re: Perl behavior on Win32 vs Unix (Mike Heins)
Re: perldb.pl core dump (Ilya Zakharevich)
Re: perldb.pl core dump <rootbeer@teleport.com>
perltroubles (Erwin Moller)
Re: redirection from STDERR (Tad McClellan)
Re: regexp problems:( <eike.grote@theo.phy.uni-bayreuth.de>
Re: Response Headers <rootbeer@teleport.com>
setuid perl scripts on HP-UX 10.20 (Sebastian Meyer)
Re: Sorting IP's <rootbeer@teleport.com>
Sorting MultiDimensional Arrays? (Desmond Ng)
Re: Statements executed out of order? <rootbeer@teleport.com>
Re: Summary of findings (was:"Use of uninitialized valu <rootbeer@teleport.com>
Re: Too many people in this group are arrogant #*(@# (R <jbokma@caiw.nl>
Re: Too many people in this group are arrogant #*(@# (R <ajohnson@gpu.srv.ualberta.ca>
TTL Was: www.perl.com? <paul.joslin@sdrc.com>
Re: turning off "<variable name> used only once" warnin (David J. Clark)
Re: Unix time, local time, year 2000 question. <rootbeer@teleport.com>
Re: Unix time, local time, year 2000 question. (Michal Jaegermann)
Why no SIGURG in POSIX? (Garth Corral)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 29 Jul 1997 15:13:29 GMT
From: harrison@ug.cs.dal.ca (William [Billy] Harrison)
Subject: Re: Need help finding crypt...
Message-Id: <5rl1ap$jro$1@News.Dal.Ca>
Oh, pardon me.
My problem is not that crypt, the UNIX command, is not installed. My
problem is that the installation of perl does not include the
implementation of crypt, the perl command.
Now that I think of it, I suppose I could just do a system call to the UNIX
crypt...that should give the results I need.
--
_________________________________________________________________
| William Harrison harrison@ug.cs.dal.ca |
| |
| Student at Dalhousie University, Halifax, NS, Canada, |
| e-wrestling participant, video game lover and Internet junkie |
|_________________________________________________________________|
------------------------------
Date: 29 Jul 1997 15:16:22 GMT
From: harrison@ug.cs.dal.ca (William [Billy] Harrison)
Subject: Re: Need help finding crypt...
Message-Id: <5rl1g6$jro$2@News.Dal.Ca>
Please ignore my last post. I was incorrect.
Our system itself has no crypt on it, so the initial response would seem to
be the correct action to take. I apologize for my ignorance, and thanks to
the poster who replied.
--
_________________________________________________________________
| William Harrison harrison@ug.cs.dal.ca |
| |
| Student at Dalhousie University, Halifax, NS, Canada, |
| e-wrestling participant, video game lover and Internet junkie |
|_________________________________________________________________|
------------------------------
Date: Tue, 29 Jul 1997 07:36:45 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Richard Burrows <Richard@rburrows.demon.co.uk>
Subject: Re: Newbie Q. If statement confusion
Message-Id: <Pine.GSO.3.96.970729073228.21501J-100000@kelly.teleport.com>
On Sun, 27 Jul 1997, Richard Burrows wrote:
> How come i cannot get it to accept the && condition
> Either of the conditions alone will work but not the two together.
> if (($data_received{'name'} eq "$name") &&
> ($data_received{'password'} eq "$password"))
That code is all right (although it has unneeded quote marks). Maybe
you're not testing what you think you're testing. See what this kind of
debugging code tells you.
print "Name is right\n" if $data_received{'name'} eq $name;
print "Pass is right\n" if $data_received{'password'} eq $password;
Beware leading or trailing whitespace or control characters when comparing
strings. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 Jul 1997 18:44:22 GMT
From: felix@crowfix.com (Felix Morley Finch)
Subject: Re: Newbie: Needs to know how to get script to read remote web page
Message-Id: <slrn5tsefv.rpe.felix@crowfix.com>
On Fri, 25 Jul 1997 20:29:40 -0400, support@total.net <support@total.net> scrawled:
>I'm currently writing a script that basically gets a log file (pretty
>much straight text, no HTML formatting) which is accessible via WWW for
>internal processing. I've been scouring the net for something that does
>something along that lines, but I'm either blind or too new at this to
>recognize what I need to find. Can anyone point me in the right
>direction?
Try LWP.pm. Here's LWP's own sample code which got me up and running
in 5 minutes:
# Create a user agent object
use LWP::UserAgent;
$ua = new LWP::UserAgent;
$ua->agent("AgentName/0.1 " . $ua->agent);
# Create a request
my $req = new HTTP::Request POST => 'http://www.perl.com/cgi-bin/BugGlimpse';
$req->content_type('application/x-www-form-urlencoded');
$req->content('match=www&errors=0');
# Pass request to the user agent and get a response back
my $res = $ua->request($req);
# Check the outcome of the response
if ($res->is_success) {
print $res->content;
} else {
print "Bad luck this time\n";
}
--
... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
Felix Finch, scarecrow repairer, rocket surgeon / felix@crowfix.com
PGP = 91 B3 94 7C E9 E8 76 2D E1 63 51 AA A0 48 89 2F
I've found a solution to Fermat's Last Theorem but I see I've run out of room o
------------------------------
Date: 29 Jul 1997 13:45:57 GMT
From: "Sergio Stateri Jr" <serginho@alpha.hydra.com.br>
Subject: NNTPClient Module
Message-Id: <01bc9c26$1deea280$ca75e7c8@Term104>
Hi! I try to install the NNTPClient Perl Module in my computer, but I think
that anything's wrong... I did a little test program :
----------------------------------------------------------------------------
---------------------------------------
require("cgi-lib.pl");
&ReadParse;
require News::NNTPClient;
$c = new News::NNTPClient("newsfeed.pnl.gov",119);
foreach ($c->newnews("alt.win95", time - 3600)) {
print $c->body($_);
}
----------------------------------------------------------------------------
---------------------------------------
And When I try to run it, I receive a strange message :
----------------------------------------------------------------------------
---------------------------------------
C:\DOWN\Testes>perl teste.pl
Socket object version 1.6 does not match $ 1.5 at C:\PERL\LIB/DynaLoader.pm
line
463.
BEGIN failed--compilation aborted at C:\PERL\LIB/News/NNTPClient.pm line 6.
----------------------------------------------------------------------------
---------------------------------------
Can anyone help me ? What's hapenning ? Have I to change the version on
DynaLoader Module ?
Thanks for any help.
Regards,
--
--------------------------------------------
Sergio Stateri Jr
Sco Paulo (SP) - Brazil
e-mail: serginho@mail.serve.com
--------------------------------------------
------------------------------
Date: Tue, 29 Jul 1997 10:15:29 -0400
From: "Ron L. Helms" <helmrl@aur.alcatel.com>
Subject: Re: Opposite of ord
Message-Id: <33DDFB01.167EB0E7@aur.alcatel.com>
Christopher Chan wrote:
>
> ord converts a alphabet to ascii. Is there a function to do the
> reverse? Thank you.
>
> --
> Christopher Chan
chr NUMBER
This is the opposite of ord LETTER.
Ron Helms
------------------------------
Date: Tue, 29 Jul 1997 07:52:54 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "Junaid Shah [C]" <shahjn@cig.mot.com>
Subject: Re: Parsing line by line
Message-Id: <Pine.GSO.3.96.970729075153.21501N-100000@kelly.teleport.com>
On Mon, 28 Jul 1997, Junaid Shah [C] wrote:
> I would like to parse a file process each line and before reading the
> next line be able to delete the current line from the file. Only I don't
> know how to go about doing it.
> ps: I know how to parse line by line it's the deleting part that I do
> not know...
When you make the new copy of the file, don't print the line you don't
want. :-) There are more details in the 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.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 Jul 1997 15:59:07 GMT
From: mheins@prairienet.org (Mike Heins)
Subject: Re: Perl behavior on Win32 vs Unix
Message-Id: <5rl40b$667$1@vixen.cso.uiuc.edu>
Scott McMahan (scott@lighthouse.softbase.com) wrote:
: John Yang (hjy2@cornell.edu) wrote:
:
: : system ("cp $PATH_TO_MASTER/cgi/* $PATH_TO_COURSE_CGI/");
: : # system ("copy c:/inetpub/wwwroot/master/cgi/*
: : c:/inetpub/scripts/courses/nttest/");
:
: : The first line is the one we used for the unix machine, the bottom line
: : is what I think it should be for the WinNT machine. It does not seem to
: : work.
:
: Remember copy is built into the command interpreter. system doesn't
: use the command interpreter. Either use xcopy, a real program, or
: cmd /c in front of copy.
Or better yet:
use File::Copy;
opendir(DIR, "$PATH_TO_MASTER/cgi")
or die;
@files = grep $_ ne '.' && $_ ne '..', readdir DIR;
for(@files) {
copy "$PATH_TO_MASTER/cgi/$_", "$PATH_TO_COURSE_CGI/$_";
}
That should work for any OS, give the right paths. (Only tested
on Perl 5.004.)
--
Regards,
Mike Heins
This post reflects the
opinion of my employer.
------------------------------
Date: 29 Jul 1997 10:09:32 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perldb.pl core dump
Message-Id: <5rkfgs$4s6@agate.berkeley.edu>
In article <870094638.14341@dejanews.com>, <darren@prismweb.com> wrote:
> Hello,
>
> I recently installed perl5002 (I know it's not the newest) on Interactive
> UNIX. I am getting "Floating exception(coredump)" when Itry to use the
> debugger. I have tried to find a fix, but have been unsuccessful. Can
> anyone point me in the right direction?
While some person which knows about *your particular situation* may
help you *as is*, you should expect much more reaction if you report a
bug in a latest perl (which may be 5.004_02 pretty soon).
Hope this helps,
Ilya
------------------------------
Date: Tue, 29 Jul 1997 08:06:49 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: darren@prismweb.com
Subject: Re: perldb.pl core dump
Message-Id: <Pine.GSO.3.96.970729080447.21501R-100000@kelly.teleport.com>
On Mon, 28 Jul 1997 darren@prismweb.com wrote:
> I recently installed perl5002 (I know it's not the newest) on Interactive
> UNIX. I am getting "Floating exception(coredump)" when Itry to use the
> debugger. I have tried to find a fix, but have been unsuccessful. Can
> anyone point me in the right direction?
Do you mean, you want us to tell you to install the newest version? :-)
If you mean something else, I can't see what you're asking for. But in any
case, why not install 5.004 and see how that works? Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 Jul 1997 16:38:01 GMT
From: erwinmol@dds.nl (Erwin Moller)
Subject: perltroubles
Message-Id: <5rl699$g4n$1@news2.xs4all.nl>
Dear reader, (janl?)I'm just starting with Perl. Can somebody tell me what's
wrong
with this program? It's a simple program that increases and decrease letters
in a sentence. My email is erwinmol@dds.nl
print ("\nGive me a sentence, please:");
$inp=<>;
chomp $inp;
@zin=();
while (length($inp) > 0)
{
$letter=chop $inp;
push @zin,$letter
}
print "\nIncreasing the letters gives :";
$i=$#zin;
while ($i >=0 )
{
print ++$zin[$i];
$i--;
}
print "\nDecreasing the letters gives :";
$i=$#zin;
while ($i >=0 )
{
print --$zin[$i];
$i--;
}
print "\n\n What is wrong here?\nWhy does Perl return -1 instead of letters?"
------------------------------
Date: Mon, 28 Jul 1997 12:27:29 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: redirection from STDERR
Message-Id: <1qkir5.2p8.ln@localhost>
Teebu Philip (tphilip@bnr.ca) wrote:
: Hello.
: I wish to call an executable program xyz from within a perl script bubba.pl.
: The program xyz redirects STDERR into STDOUT. I wish to seperate the STDERR
^^^^^^^^^^^^^
So, external to xyz, all output comes out on STDOUT?
: messages from STDOUT from within my perl script.
It is too late, if they were merged internal to xyz.
: Normally at the shell prompt
: I could do the following:
: brtphe33-132> (xyz > file.stdout) >& file.stderr
[ isn't csh awful in its handling of file descripters? (rhetorical question) ]
Ahhh. If that works, then xyz does NOT "redirect STDERR into STDOUT"
as you said above.
So, now I'm confused as to what xyz does.
Does xyz _itself_ redirect STDERR to STDOUT, or not?
If not, then you probably want to have a look at this Frequently
Asked Question: "How can I capture STDERR from an external command?"
If so, then it is too late to separate them, unless there is something
in the data that you can key on to know whether it was intended for
STDERR or STDOUT.
: I have tried some of the standard techniques for talking to oneself using the
: open with "|-" and having the parent talk with the child, but when I execute
: xyz from my perl script, I do not control the output of STDERR and it appears
: at the screen from my perl script.
: If anyone could give any insight on my problem, I would really appreciate it.
: Thanks.
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Tue, 29 Jul 1997 09:35:09 +0200
From: Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>
Subject: Re: regexp problems:(
Message-Id: <33DD9D2D.167E@theo.phy.uni-bayreuth.de>
Hi,
Jeff Eidsness wrote:
>
> I'm having much difficulty and think i'm retarded, cause i've not been
> able to find anything in the camel book regarding this. ...
My Camel Book (2nd Edition) says on page 63: "The quantifiers in
the left column above [of the table above] try the biggest quantity
first. ... By placing a question mark after any of the greedy
quantifiers, they can be made to choose the smallest quantity for the
first try."
> ... I can't be the
> only person with this problem.
Here you may be right ... ;-)
> I'm working with HTML files, and i'll do a s/// like:
>
> $foo=~s/\<(some wierd tag)\>/$1/g;
You could use either
$foo =~ s/<(.+?)>/$1/g; # there's no need to use '\<' or '\>'
or
$foo =~ s/<([^>]+)>/$1/g;
Bye, Eike
--
======================================================================
Eike Grote, Theoretical Physics IV, University of Bayreuth, Germany
----------------------------------------------------------------------
e-mail -> eike.grote@theo.phy.uni-bayreuth.de
WWW -> http://www.phy.uni-bayreuth.de/theo/tp4/members/grote.html
http://www.phy.uni-bayreuth.de/~btpa25/
======================================================================
------------------------------
Date: Tue, 29 Jul 1997 07:40:47 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: ALTA RESEARCH <alta@tab.com>
Subject: Re: Response Headers
Message-Id: <Pine.GSO.3.96.970729073845.21501K-100000@kelly.teleport.com>
On 27 Jul 1997, ALTA RESEARCH wrote:
> I am writting a program that access web pages. I don't want to pause the
> program for a number of seconds in hopes that the web page loads. I want
> to know when the page has loaded succesfully.
You should be using LWP, which returns either undef (on failure) or the
entire page (on success). Too easy! Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 Jul 97 08:46:47 GMT
From: meyer@megatel.de (Sebastian Meyer)
Subject: setuid perl scripts on HP-UX 10.20
Message-Id: <meyer.870166007@hp01.megatel.de>
Keywords: setuid perl kernel nosuid
Is it possible to run perl scripts setuid on HP-UX 10.20?
When I start a setuid perl script it just gives me:
YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET!
FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!
When I put up the question, howto disable set-id scripts, in
comp.sys.hp.hpux I received this one answer:
> That is not a feature of hp-ux. however, you can put the script in,
> saay, /usr/local/bin and make this a separate file system with
> "nosuid" set in /etc/fstab.
Mounting /usr/local with "nosuid" is not an option, too many programs
rely on this. Is there any way to get around this constraint or do I
really have to do without this feature in HP-UX ?
sebastian
[Followup set to comp.lang.perl.misc]
--
__o Sebastian Meyer Tel: 0421/22095-18 | megatel GmbH
_ \<,_ eMail: meyer@megatel.de | Wiener Stra_e 3
(_)/ (_) Aiming at: Holistic service | D-28359 Bremen
~~~~~~~~~~ "Warning: Dates in the calendar are closer than they appear!"
------------------------------
Date: Tue, 29 Jul 1997 07:50:59 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Dennis Mercer <dmercer@Glue.umd.edu>
Subject: Re: Sorting IP's
Message-Id: <Pine.GSO.3.96.970729074915.21501M-100000@kelly.teleport.com>
On 28 Jul 1997, Dennis Mercer wrote:
> Anyone here know of a way to sort IP's?
@sorted = sort @IP_list;
Of course, you may need something fancier if your IP addresses aren't
packed into four bytes. :-) But maybe you can see how to convert what you
have to be able to use this technique. Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 Jul 1997 15:20:57 GMT
From: aspgdng@cmc.doe.ca (Desmond Ng)
Subject: Sorting MultiDimensional Arrays?
Message-Id: <5rl1op$ipo$1@calvin.risq.qc.ca>
Hi,
I was wondering if there was an easy way to sort multidimensional arrays
row by row at a time.
For example:
1 2 10 4
2 3 5 1
I would like first to sort the first row: 10 4 2 1 and store this in a
different variable and then clear that variable and store the next sorted
row: 5 3 2 1
Thanks in advance for the help.
-Desmond
------------------------------
Date: Tue, 29 Jul 1997 07:48:44 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Euan Forrester <deforres@acs.ucalgary.ca>
Subject: Re: Statements executed out of order?
Message-Id: <Pine.GSO.3.96.970729074126.21501L-100000@kelly.teleport.com>
On Mon, 28 Jul 1997, Euan Forrester wrote:
> What's wierd is that if I comment out the last unlink command, it works
> fine. But, this command occurs AFTER the file is supposedly opened,
> printed, and closed again!
Probably you're a victim of output buffering: Error message are normally
sent at once, while standard output is saved in a buffer. This can cause
an error message to appear in the "wrong" place. Check out the magical $|
variable in perlvar(1). Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 29 Jul 1997 07:19:22 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Ronald Fischer <rovf@earthling.net>
Subject: Re: Summary of findings (was:"Use of uninitialized value" without using a value - why?)
Message-Id: <Pine.GSO.3.96.970729071136.21501F-100000@kelly.teleport.com>
On 28 Jul 1997, Ronald Fischer wrote:
> 2. Several people pointed out, that I got the "command line version"
> perl -ew die
> wrong and that it should be
> perl -we die
Correct.
> Again, this is reportedly true (I can't check it myself) for Perl
> 5.004, which produces the message
> Unquoted string "w" may clash with future reserved word
> on the first form and dies on the second.
Actually, on the first form, warnings are not enabled (since the w is a
line of code, rather than a -w flag). So Perl should not give that
warning, and should not execute the die (which is an argument rather than
a line of code in that case). The first command should basically do
nothing, but on versions of Perl before about 5.003_20 it would ignore the
w (oops!) and execute the die.
Hope this helps!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 Jul 1997 17:56:18 GMT
From: "John Bokma" <jbokma@caiw.nl>
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <01bc9c48$cc86dca0$c20ab2c2@tschai>
Larry D'Anna <ldanna@hotmail.com> wrote in article
<33DC9879.94032E84@hotmail.com>...
> John Bokma wrote:
>
> > Alan J. Flavell <flavell@mail.cern.ch> wrote in article
> > <Pine.A41.3.95a.970728135852.111678C-100000@sp049>...
> > > On 28 Jul 1997, John Bokma wrote:
> > >
> > > ...
...
> > > It only reinforces the point that if a quality answer is ready
and
> > > waiting in the relevant FAQ, it's foolish to ask for (and
> > > counterproductive to give) a random off-the-top-of-head answer
> > here.
> >
> > Isn't "It's in the FAQ" just such an answer?
>
> No. It is not random because it is the standard answer
> to a question that is in the FAQs. It is not
> off-the-top-of-head because it has been the
> standard answer to such questions for as long
> as FAQs have existed on usenet.
What I ment, referring to the FAQ because someone thinks it is in the
FAQ (see previous posting,
where I stated that someone referred to the FAQ whilst the original
poster stated clearly that his
problem was different from the one in the FAQ...)
John
--
----------------------------------------------------------------------
Need a Freelance Software Developer (MSc)? (CGI, Perl, Java, C, C++)
http://www.caiw.nl/~jbokma [Java demo's, Curriculum Vitae and
more...]
email: jbokma@caiw.nl phone: +31 10 4291827
------------------------------
Date: Tue, 29 Jul 1997 14:26:46 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <33DE43F6.25C2B0F@gpu.srv.ualberta.ca>
perhaps its time for a new FAQ entry...possible suggestions
follow:
Q: Why do so many questions in clpm just
refer me to the FAQ instead of providing me
with a clear and concise answer to the question?
A1: See the FAQ entry for this question...
A2: People in clpm are lazy.
A3: You aren't really reading this are you?
:-)
--
andrew
------------------------------
Date: 29 Jul 1997 10:34:45 -0400
From: Paul Joslin <paul.joslin@sdrc.com>
Subject: TTL Was: www.perl.com?
Message-Id: <y4d204i3p16.fsf_-_@sdrc.com>
>>>>> "Brian" == Brian Lavender <brian@brie.com> writes:
Brian> What is "TTL" and more importantly, when can access the perl.com site?
Brian> Is it "Through the Lens"? In other words, you don't know what you have
Brian> until you see it.
When you ask a DNS server to map a name to an IP address, one of the
headers it returns is "Time-To-Live". This tells your host (and any
intermediate servers) how long the address can remain in cache.
Suppose you ask for "www.perl.com" just before Tom changed the address
(and informed the DNS servers). After the change, for "TTL" seconds, when
you request the address, your host (or an intermediate server) will give
you the OLD (and wrong) address from their cache.
--
Paul R. Joslin paul.joslin@sdrc.com +1 513 576 2012
I wonder if Dracula ever has ticks.
-- Jack Handey
------------------------------
Date: 29 Jul 1997 11:58:58 -0400
From: dav@miguel.umiacs.umd.edu (David J. Clark)
Subject: Re: turning off "<variable name> used only once" warning
Message-Id: <y9nbu3l26kd.fsf@miguel.umiacs.umd.edu>
mjtg@cus.cam.ac.uk (M.J.T. Guy) writes:
> Jeffrey J. Barrett <gt5146c@acmez.gatech.edu> wrote:
> >
> > Thanks to everyone for the replies. Let me be a little more
> >specific as to where this is occuring. I am using the library routine
> >Getopt::Std to allow for easy command line parsing. My script can take
> >one flag, an 'f'.
> > In case you aren't familiar with it, the way this library is used
> >is with a 'getopt( 'f' )'. If an 'f' flag was given to the script, this
> >call will create a variable called '$opt_f' and set its value to '1'. I
> >only need to access this variable once, in an if statement to see if it
> >exists/is set to 1.
You might try simply turning off strict vars for the enclosing
block...
no strict vars;
-dav
------------------------------
Date: Tue, 29 Jul 1997 07:30:55 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Neil Briscoe <neilb@zetnet.co.uk>
Subject: Re: Unix time, local time, year 2000 question.
Message-Id: <Pine.GSO.3.96.970729072323.21501I-100000@kelly.teleport.com>
On 27 Jul 1997, Neil Briscoe wrote:
> I very recently wrote a script on my firewall which worked based on that
> very sentence. Since the string I have to pass to the postgres database
> needs a four digit year, I do a :-
>
> $year += 100;
I hope you mean 1900. :-)
> rather than
>
> $year = "19$year";
>
> as I might have been inclined to do.
>
> I'd dearly like to know if this code is going to keel over and die on New
> Year's day 2000.
> Now seems a good time to find out, if possible.
I agree. How do you think that you could find out? I can think of several
ways, all of which tend to be faster (and more reliable) than posting to
the newsgroup.
1. Read the docs. The behavior should be documented.
2. Read the FAQs. In fact, it's not just documented, it's FAQed.
3. Ask your local expert, system administrator, or vendor.
4. Set your system clock ahead three years and see whether
anyone complains. :-)
5. Write a test program.
$ perl -e 'print join " ", localtime(time+1e8), "\n";'
When you have questions which can't be answered by these methods, feel
free to post them here. I hope that one of these methods will help you
out. Good luck!
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 29 Jul 1997 03:00:32 GMT
From: michal@gortel.phys.ualberta.ca (Michal Jaegermann)
Subject: Re: Unix time, local time, year 2000 question.
Message-Id: <5rjmcg$e2s$1@pulp.ucs.ualberta.ca>
Randal Schwartz (merlyn@stonehenge.com) wrote:
:
: $ perl -e 'print scalar gmtime 1 << 31'
: Fri Dec 13 20:45:52 1901
:
: Hmm. That's not what I wanted. And look, it's a Friday the 13th. :-)
It depends a bit on a platform.
$ perl -e 'print scalar gmtime (1 << 31), "\n"'
Tue Jan 19 03:14:08 2038
$ perl -e 'print scalar gmtime (1 << 32), "\n"'
Sun Feb 7 06:28:16 2106
$ perl -e 'print scalar gmtime (1 << 55), "\n"'
Sun Jun 13 06:26:08 1141709097
Hm, it looks that we still have a few years ahead. :-) (This is
Linux on Alpha; Linux on Sparc will look similar).
:
: $ perl -e 'print scalar gmtime ((1 << 31) - 1)'
: Tue Jan 19 03:14:07 2038
:
: Ah. That's the number I was expecting.
:
: Year 2038. And what Perl does on such a time, I can only
: speculate. :-)
64-bit processors will be likely then tad more popular that they are
now. :-)
Michal
------------------------------
Date: 29 Jul 1997 17:53:27 GMT
From: garthc@compass-da.com (Garth Corral)
Subject: Why no SIGURG in POSIX?
Message-Id: <5rlamn$bkv@inbox.sanjose.compass-da.com>
Is there some technical reason why SIGURG is not exported by POSIX or
is this simply not yet implemented? While I'm on the subject, I
noticed that (at least in 5.003) F_SETOWN is not exported by Fcntl
either. How are people handling out-of-band data on a socket and
SIGIO/SIGURG in general?
Garth.
------------------------------
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 792
*************************************