[6567] in Perl-Users-Digest
Perl-Users Digest, Issue: 192 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 27 17:13:55 1997
Date: Thu, 27 Mar 97 14:00:21 -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 Thu, 27 Mar 1997 Volume: 8 Number: 192
Today's topics:
Re: /RE/ for Dummies - It is even hard for experts! (Robert Schuldenfrei)
Re: A Call for Clarity (Schwartzian Transform Considere (Greg Andrews)
Re: Bidirectional communication <seay@absyss.fr>
can't resolve symbol '_h_errno' <stiggy@vm.com>
Re: Directory Listing in Perl (Bennett Todd)
general question: databases w/ perl <ster@stargazer.net>
Re: general question: databases w/ perl (Drew J. Asson)
Re: global my() variable used in foreach() loop loses i <rra@stanford.edu>
Re: how to print the content of an html file? <rootbeer@teleport.com>
How to sort an arrary? <tony@vegas.es.hac.com>
Re: Little beginers question <rra@stanford.edu>
Re: Looking backwards through a text file (Matthew D. Healy)
Re: LWP:UserAgent hangs at runtime on NT (Nathan V. Patwardhan)
Re: Parsing file problem <seay@absyss.fr>
Re: Parsing file problem (Kevin Earls)
password-verification <cubasch@nrw-online.de>
Re: Perl Data Structures Cookbook. Wher did it go? (Matthew D. Healy)
Re: print "Content type: text/html\n\n"; <flavell@mail.cern.ch>
Re: Same syntax, different result. <rootbeer@teleport.com>
TPJ: Nukes <zot@ampersand.com>
Re: TPJ: Nukes (Nathan V. Patwardhan)
trouble with pipes (Tom Vaughan)
Re: Who makes more $$ - Windows vs. Unix programmers? (Keith Alphonso)
Xsubpp part of Win32 distribution <ting@platinum.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 27 Mar 1997 19:34:32 GMT
From: sailboat@tiac.net (Robert Schuldenfrei)
Subject: Re: /RE/ for Dummies - It is even hard for experts!
Message-Id: <5hei2p$6sa@news-central.tiac.net>
Kevin Hawkins has a solution:
I have been flat out and not had a chance to try these various solutions.
Kevin's is the only one that has worked so far. Here is an extract of what
works:
@rem = '
@echo off
perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';
# captest - testing ways to to change all caps to initital caps.
# This solution was suggested by Kevin Hawkins.
$buffer= ' AUTHORIZED FOR THIS MCS-3 FUNCTION ';
if ($buffer=~ /^(\s*[0-9A-Z_\-\,\!\.\?]+\s*)+$/) {
$buffer=~ s/(\w+)/\L\u$1/g;
$buffer=~ s/Mcs-3/MCS-3/g;
print "Buffer: $buffer \n";
}
else {
print "No joy \n";
}
__END__
:endofperl
I used Tom Christiansen's s///g pattern for the substitution as it is fast. The
only problem I found with Kevin's "recognizer" pattern is that if the line
begins with a number of all caps characters and ends with one or more lowercase,
the search hangs for a VERY LONG time. I slammed into such a beast in my
production code. For example from the above test:
$buffer= ' AUTHORIZED FOR THIS MCS-3 FUNCTION loser case here ';
will cause trouble. Since I only had one instance of this in only one chapter,
it was no big deal. Do you have any idea what is causeing the rescan? Thanks
for your help. Bob
At 10:24 PM 3/19/97 -0600, Kevin wrote:
>Okay, this is a bit kludge-y looking (oh my atrocious grammar!), but
>it seems to work for me, if what you want is something that will
>convert lines whose words are all caps to first-letter-only caps (I
>was a bit confused as to what you wanted...):
>
>#!/usr/bin/perl
>
>open(IN, "test.lines") || die "Can't open input: $!\n";
>
>while (<IN>) {
> chop;
> if (/^(\s*[A-Z_\-\,\!\.\?]+\s*)+$/) {
> @words = split(/\s+/, $_);
> shift(@words) if ($words[0] eq "");
> @spaces = split(/\S+/, $_);
> foreach $word (@words) {
> $word =~ tr/A-Z/a-z/;
> $word = ucfirst($word);
> print shift(@spaces), $word;
> }
> print "\n";
> } else {
> print "$_\n";
> }
>}
>
>close(IN);
>
>Where test.lines was full of all the goofy permutations I could come
>up with. I'm sure there's a more concise way to do this, but this
>seems to work for me.
>
> HTH,
> Kevin
>
>Robert Schuldenfrei wrote:
>>
>> I got some help from Tom Christiansen and Eric Bohlman, but neither script did
>> the complete chore. Here is the script as suggested by Tom:
>>
>> @rem = '
>> @echo off
>> perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
>> goto endofperl
>> @rem ';
>>
>> # captest - testing ways to to change all caps to initital caps.
>> # This solution was suggested by Tom Christiansen.
>>
>> $buffer= " THIS is regular text. ";
>> $buffer=~ s/(\w+)/\L\u$1/g;
>> print "Buffer: $buffer \n";
>>
>> __END__
>> :endofperl
>>
>> It passed the test by converting THIS IS ALL CAPS to This Is All Caps, but also
>> converted the above to This Is Regular Text. Clearly having all of my manual in
>> initial caps is going overboard :)
>>
>> Here is Eric's code. It too solved the problem of turning THIS IS ALL CAPS into
>> This Is All Caps. It was easy on the rest of the text, but had its own grief
>> with the sentence below:
>>
>> @rem = '
>> @echo off
>> perl %0.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
>> goto endofperl
>> @rem ';
>>
>> # captest - testing ways to to change all caps to initital caps.
>> # This solution was suggested by Eric Bohlman.
>>
>> $buffer= "It is I, said the MCS-3 system.";
>> $buffer=~ s/\b([A-Z])([A-Z]+)/$1\L$2/g;
>> print "Buffer: $buffer \n";
>>
>> __END__
>> :endofperl
>>
>> It produced "It is I, said the Mcs-3 system. MCS-3 is the name of my production
>> management system and it would be hard to repair the damage.
>>
>> I think that the secret to solving this is in the fact that the target is lines
>> that are ALL caps on one line. It starts with ^, the beginning of the line, has
>> random white space, every letter is in caps (although there may be numbers and
>> dashes) and ends with a \n newline. If even one character is lower case, go on
>> to the next line.
>>
>> I will be out for the next few days, so if anyone has a solution I will get to
>> it next week.
>>
>> Least anyone think I am not pleased for the help that Eric and Tom gave, this IS
>> NOT the case. In fact just looking at their solution was a big help to my perl
>> and /RE/ education. Thank you. Bob
>>
>> .
>> Robert Schuldenfrei
>> S. I. Inc.
>> 32 Ridley Road
>> Dedham, MA 02026
>> Voice: (617) 329-4828
>> FAX: (617) 329-1696
>> E-Mail: bob@s-i-inc.com
>> WWW: http://www.tiac.net/users/tangaroa/index.html
>
>--
>=) Kevin Hawkins -- Senior in Computer Science, University of Illinois
>(= NCSA Technology Management | e-mail to: khawkins@ncsa.uiuc.edu
>=) http://gto.ncsa.uiuc.edu/khawkins/
>(= PGP public key available -- finger khawkins@ncsa.uiuc.edu
>
>
Robert Schuldenfrei
S. I. Inc.
32 Ridley Road
Dedham, MA 02026
Voice: (617) 329-4828
FAX: (617) 329-1696
E-Mail: bob@s-i-inc.com
WWW: http://www.tiac.net/users/tangaroa/index.html
------------------------------
Date: 27 Mar 1997 18:50:10 GMT
From: gerg@shell. (Greg Andrews)
Subject: Re: A Call for Clarity (Schwartzian Transform Considered Scary)
Message-Id: <5hefh2$8sk$3@news.wco.com>
gsar@engin.umich.edu (Gurusamy Sarathy) writes:
>
>Students often hate the things they don't immediately understand.
>
Heh. When I first read that sentence, I thought it said:
Students often write things they don't immediately understand.
and I agreed wholeheartedly.
-Greg
------------------------------
Date: Thu, 27 Mar 1997 19:00:19 +0000
From: Douglas Seay <seay@absyss.fr>
To: Fred Metcalf <ftm@math.ucr.edu>
Subject: Re: Bidirectional communication
Message-Id: <333AC3C3.5182@absyss.fr>
Fred Metcalf wrote:
>
> As an occasional Perl user, I have now run into the "Bidirectional
> Communication" problem (p. 344 of the 2nd ed. - Programming
> Perl).
>
> I would like to pass the value of a variable to an external
> filter and have the output land in another variable. There
> are two solutions suggested in PP: IPC::Open2 and Comm.pl.
> Neither of these works - IPC because of a hangup, and Comm.pl
> because of a lack of pseudo-ttys (I would like the code to
> be mostly machine-independent). At the moment I'm just using
> a temporary file, which is not an "elegant" solution.
>
> If anyone has a better solution to this, I'd appreciate
> hearing about it.
>
> What is really required, it seems to me, is an extension of
> the open command to:
>
> open IN_HANDLE, "| filter ... |", OUT_HANDLE
>
> An example of this would be to format a chunk of text using
> "fmt" as a filter.
>
> Thanks in advance for any help.
>
> Fred Metcalf
Fred,
I think that you're making this more complicated than
is needed. You only need that multi-process stuff for
interactions. This is purely one way stuff. If you
have the variable $before and you want to filter it
through $filter_prog and get the results into $after:
$after = `$filter_prog $before`;
chomp($after);
and you're done.
- doug
------------------------------
Date: Thu, 27 Mar 1997 18:11:50 GMT
From: Jesse Erlbaum <stiggy@vm.com>
Subject: can't resolve symbol '_h_errno'
Message-Id: <E7prpv.83G@nonexistent.com>
I'm having problems compiling perl 5.003 under Linux 2.x using GCC
2.7.0.
During the compilation of miniperl, during the install, I repeatedly
get:
./miniperl: can't resolve symbol '_h_errno'
I'm no compiler expert, but it seems to me that I might be missing some
essential libraries, or something. I'm trying to track the problem
down, and I am hoping that someone here might be able to give me a hint
as to what is missing and/or broken.
I will make every effort to check the group, but if you could CC: any
replies to my mailbox, it would be greatly appreciated!
Thanks much!
-Jesse-
------------------------------
Date: 27 Mar 1997 18:26:08 GMT
From: bet@waltz.rahul.net (Bennett Todd)
Subject: Re: Directory Listing in Perl
Message-Id: <slrn5jletq.ikr.bet@waltz.rahul.net>
On 27 Mar 1997 07:10:54 -0700, Randal Schwartz <merlyn@stonehenge.com> wrote:
>Building a single string looks like work [join]. Building a list
>looks like less work [map]. But simply walking the list is fastest
>[foreach].
Well, that would depend on other items, I expect; consider:
#!/usr/local/bin/perl -w
use strict;
use Benchmark;
use IO::File;
my($count) = (shift or 20);
use vars qw($fo @data);
@data = 0 .. 999;
warn "First, with print to normal filehandles\n";
open FO, ">/dev/null";
timethese ( $count, {
'eric' => 'print FO join("\n",@data),"\n";',
'merlyn' => 'print FO map "$_\n", @data;',
'rootbeer' => 'for (@data) { print FO "$_\n"}',
});
warn "Then, with IO::File handles\n";
$fo = new IO::File ">/dev/null";
timethese ( $count, {
'eric' => '$fo->print(join("\n",@data),"\n");',
'merlyn' => '$fo->print(map "$_\n", @data);',
'rootbeer' => 'for (@data) { $fo->print("$_\n")}',
});
First, with print to normal filehandles
Benchmark: timing 20 iterations of bet, eric, merlyn, rootbeer...
eric: 0 secs ( 0.20 usr 0.00 sys = 0.20 cpu)
(warning: too few iterations for a reliable count)
merlyn: 1 secs ( 1.37 usr 0.01 sys = 1.37 cpu)
rootbeer: 1 secs ( 1.21 usr 0.00 sys = 1.21 cpu)
Then, with IO::File handles
Benchmark: timing 20 iterations of bet, eric, merlyn, rootbeer...
eric: 0 secs ( 0.15 usr 0.00 sys = 0.15 cpu)
(warning: too few iterations for a reliable count)
merlyn: 2 secs ( 1.34 usr 0.00 sys = 1.34 cpu)
rootbeer: 7 secs ( 7.12 usr 0.01 sys = 7.13 cpu)
For printing 1000 integers to /dev/null, the most dramatic difference occurs
when you use the OO IO::File::print method invocation. The old-fashioned I/O
has less overhead per I/O operation, clearly, but 1000 small objects are still
best pulled into one before printing, if speed is of interest. With fewer
items, or larger ones, the balance would shift in favour of printing each item
directly.
-Bennett
------------------------------
Date: 27 Mar 1997 19:01:28 GMT
From: "Ster" <ster@stargazer.net>
Subject: general question: databases w/ perl
Message-Id: <01bc3ae0$37475bc0$187b65cf@cornholio>
If I were making a data base on a unix system to be accessed by perl
scripts (add,delete,edit), would a plain text file be best?
Is there built in database abilities/function in perl?
How would I lock records within a file but not lock the entire file?
Send info or links to Ster@Stargazer.net
I greatly appreciate any help minor or major.
___________________________________________
Ster's Idiot Extravaganza: http://server.nich.edu/~njd
StarGazer ISP http://www.stargazer.net
Ster Computer Services http://stargazer.net/~ster
------------------------------
Date: 27 Mar 1997 15:00:37 -0500
From: dja@chablis.hcf.jhu.edu (Drew J. Asson)
Subject: Re: general question: databases w/ perl
Message-Id: <ykk9mtqf4q.fsf@chablis.hcf.jhu.edu>
You probably would like Sybperl, a perl5 (and I think perl4 support
still out there) which allows perl to comm with sybase database.
There are other products out there for other databases, which you can
find if you go to the Yahoo site and look under perl information (h
http://www.yahoo.com/Computers_and_Internet/Programming_Languages/Perl/Extensions/
As for Sybperl, the FAQ says:
1.2) Where can I get Sybperl?
Sybperl is available from CPAN (the Comprehensive Perl Archive Network)
The easiest way to get at CPAN is to go through Tom Christiansen's
CPAN multiplexer at perl.com. To get the latest Sybperl release you
can use this URL:
http://www.perl.com/perl/CPAN/authors/id/MEWP
Drew
--
--------------------------------------------------------
Drew J. Asson, Community of Science, Inc., Baltimore, MD
------------------------------
Date: 27 Mar 1997 12:45:13 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: global my() variable used in foreach() loop loses its value
Message-Id: <qumafnp83om.fsf@cyclone.stanford.edu>
Devin Ben-Hur <dbenhur@egames.com> writes:
> 4) p.100... 2nd paragraph:
> The variable is implicitly local to the loop and regains
> its former value upon exiting the loop. If the variable
> was previously declared with <B>my</B>, that variable
> instead of the global one is used, but it's still
> localized to the loop.
And if you knew exactly what that meant the first time you read it and how
it interacts with subs called from inside foreach loops, you're a lot
better than the rest of us.
> Do we really need to give instructions on *basic* searching and reading
> skills in this group?
Oh, please give me a fscking break. You think it's obvious on first read
that although the word "localizing" is used in the description of what
happens to foreach loop variables, it's *not* doing the same thing as a
local(), which would make the value of the variable available to called
subs from inside the foreach loop, but rather is lexically scoping the
variable and called subs get a different lexical scope?
Scoping issues involving foreach loops and my/local variables aren't the
trivial FAQ you're making them out to be, and you and a half-dozen other
people on this newsgroup are doing yourselves and Ron a major disservice
by treating him like an idiot for not understanding it the first time.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
------------------------------
Date: Thu, 27 Mar 1997 10:47:11 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Timothy Shell <tshell@mcs.net>
Subject: Re: how to print the content of an html file?
Message-Id: <Pine.GSO.3.96.970327104457.13866X-100000@kelly.teleport.com>
On Thu, 27 Mar 1997, Timothy Shell wrote:
> while ($_ = <HTML_FILE>)
> {print "$_ \n";};
>
> I use something similar to print out whole html files and perl doesn't
> mind.
It will in the upcoming version 5.004. :-) Try one of these instead.
while (defined($_ = <HTML_FILE>))
while (<HTML_FILE>) # easier way to write it
Hope this helps!
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 27 Mar 1997 19:03:23 GMT
From: "Tony Reeves" <tony@vegas.es.hac.com>
Subject: How to sort an arrary?
Message-Id: <01bc3ae1$911a3e00$43931193@treeves.es.hac.com>
Is there an easy way to sort a standard array?
I have an array that contains:
lastname, firstname, date, phone, location, manager
I'd like to sort the array by the first value, that is lastname..
is there an easy way to do this?
I read that sort can work with assocate arrays.. but this is a standard
one..
------------------------------
Date: 27 Mar 1997 12:58:14 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Little beginers question
Message-Id: <qum7mit832x.fsf@cyclone.stanford.edu>
Rich Schramm <rdschramm@scripps.com> writes:
> $#array is a variable that tells you how many elements are in the @array
Careful. $#array tells you the highest index in the array, which is one
less than the number of elements in the array. The scalar value of @array
gives you the actual number of elements in the array.
--
Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
------------------------------
Date: Wed, 26 Mar 1997 13:27:27 -0500
From: Matthew.Healy@yale.edu (Matthew D. Healy)
Subject: Re: Looking backwards through a text file
Message-Id: <Matthew.Healy-2603971327270001@pudding.med.yale.edu>
In article <333797CB.4942@egames.com>, dbenhur@egames.com wrote:
...
>
> If I recall, his original query was how to print the tail
> (last 20 lines) without reading the whole file.
>
> This is quick & easy with fixed length records:
> open(FILE,$filename) or die(...);
> seek(FILE, -($record_length * $num_recs), 2);
> while ($num_recs--) {
> read(FILE, $record, $record_length);
> # format and print $record
> }
>
>
If you only need 20 lines, then I'd think the above code could still
be used with a little bit of fudging.
With most of the logfiles I've encountered, while there was some variation
in line lengths, one usually has at least a notion of how long the lines
normally will be. Thus it is usually possible to state, in advance, a
not-insanely-large number of bytes such that that many bytes are virtually
certain to contain at least 20 newlines. Of course, in most cases that
many bytes will probably contain more than 20 newlines.
So, use the above code to grab that many bytes, count newlines in what
was grabbed, throw away the first (N-20) lines, and you're there. In the
rare case when you don't find at least 20 newlines, progressively double
the number of bytes to grab until either (1) you get 20 lines or (2) you
exceed your sanity checks by either hitting the beginning of the file
without finding 20 newlines or grabbing some preset maximum number of
bytes without finding 20 newlines.
---------
Matthew.Healy@yale.edu
http://paella.med.yale.edu/~healy
"But I thought it was pointed at the rabbit *between* my feet!"
------------------------------
Date: 27 Mar 1997 19:21:46 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: LWP:UserAgent hangs at runtime on NT
Message-Id: <5hehca$msf@fridge-nf0.shore.net>
Jim Balkwill (balkwill@viennasys.com) wrote:
: Note: I was unable to make libwww. To work around resulting lack of the
: auto load files, I removed the __END__'s from the necessary modules.
This will be very helpful to you:
ftp://cogen.mit.edu/software/perl/libwww-win32-fix.zip
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: Thu, 27 Mar 1997 19:16:10 +0000
From: Douglas Seay <seay@absyss.fr>
To: ab20@tntvax.ntrs.com
Subject: Re: Parsing file problem
Message-Id: <333AC77A.6C28@absyss.fr>
ab20@tntvax.ntrs.com wrote:
>
> I have a file with the following record:
>
> |1997-02-13 00:00:00:000|N|NULL |NULL |XYZ |NULL|JKL |NULL |123
>
> My output should look like this:
>
> |1997-02-13 00:00:00:000|N|||XYZ ||JKL ||123
>
> Basically I'm just stripping the word "NULL" and any trailing spaces before
> the next delimiter "|". Is there a way using awk or perl to accomplish this?
>
> thanks in advance....
perl: s/NULL[ ]+|/|/g
sed: s/NULL[ ]+|/|/g
Can't say that I remember how to do this in awk.
My guess is that it would be like the other two.
After learning Perl, I haven't found that much
use for awk.
- doug
------------------------------
Date: 27 Mar 1997 18:36:40 GMT
From: kevin@ti.com (Kevin Earls)
Subject: Re: Parsing file problem
Message-Id: <5heeno$65t$1@tilde.csc.ti.com>
ab20@tntvax.ntrs.com writes:
>I have a file with the following record:
>
>|1997-02-13 00:00:00:000|N|NULL |NULL |XYZ |NULL|JKL |NULL |123
>
>My output should look like this:
>
>|1997-02-13 00:00:00:000|N|||XYZ ||JKL ||123
>
>Basically I'm just stripping the word "NULL" and any trailing spaces before
>the next delimiter "|". Is there a way using awk or perl to accomplish this?
>
>
>thanks in advance....
~% awk 'BEGIN {FS="|";OFS="|";} \\
{for (x=1;x<=NF;x++) { if ($x ~/NULL/) {$x="";}}}' file
_/_/_/_/_/ _/_/_/ Kevin Earls "If you want to truly
_/ _/ kevin@ti.com understand something,
_/ _/ Product Engineering try to change it."
_/ _/ Texas Instruments -Kurt Lewin
_/ _/_/_/ Sherman, TX
------------------------------
Date: Thu, 27 Mar 1997 20:15:02 +0100
From: Cubasch <cubasch@nrw-online.de>
Subject: password-verification
Message-Id: <333AC5D0.774A@nrw-online.de>
Hi folks!
I'm totally new to perl, but I'm looking for a possibility to check a
user's name and password - the key is that the password is always the
same, that is, it will work for everyone. But how can I manage to check,
wether the user has typed the right password, while he/she surfs deeper
into the site. There are the top-level html-pages that should be
readable for everyone and only some pages, that are readable for people
who know the password. So first: How can I automatically show the
'restricted' Document, after the user has entered the right password?
The cgi-script should not generate the whole document, but there should
be a way to load the existing document automatically, after the user has
entered the correct password,
and second: How can the server 'remember', that the user (you see: there
is no database with usernames nor passwords, since there is only one
'fake'-password) already has entered the correct password, so that
he/she must not type it in each time, he/she wants to view a restricted
site.
Awaiting lots of answers,
best regards, Roman.
------------------------------
Date: Wed, 26 Mar 1997 12:55:43 -0500
From: Matthew.Healy@yale.edu (Matthew D. Healy)
Subject: Re: Perl Data Structures Cookbook. Wher did it go?
Message-Id: <Matthew.Healy-2603971255430001@pudding.med.yale.edu>
In article <5gvabb$i9e@srv13s4.cas.org>, lvirden@cas.org wrote:
> According to Tom Christiansen <tchrist@mox.perl.com>:
> :In comp.lang.perl.misc,
> : Jerome O'Neil <joneil@is.ssd.k12.wa.us> writes:
> ::The requested URL /perl/nmanual/html/pod/perldsc.html was not found on
>
> :Try again without the 'n'.
> : http://www.perl.com/perl/manual/html/pod/perldsc.html
> :Although both should work.
>
> I still get failures regardless of the number of times that I've
> tried this all day.
Methinks Tom C's redirector robot must be slightly hosed at the moment,
or else the mirror site ftp trees are NOT organized the same way as
they used to be anymore!
Every time I point lynx at either of the above URLs, It goes to a
different ftp site -- as it should -- but then complains "unable
to access document." I get the same results with such portions of
this URL as, say, http://www.perl.com/perl/manual/
However, if I go to http://www.perl.com/perl/ and navigate from
THERE by selecting on links, I get bounced back and forth between
various ftp sites and www.perl.com and eventually I *do* reach
the "data structures cookbook."
But I cannot, in repeated tries, ever get there by either of the
URLs Tom mentions above. Period.
---------
Matthew.Healy@yale.edu
http://paella.med.yale.edu/~healy
"But I thought it was pointed at the rabbit *between* my feet!"
------------------------------
Date: Thu, 27 Mar 1997 20:01:59 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: print "Content type: text/html\n\n";
Message-Id: <Pine.HPP.3.95a.970327205902.2932C-100000@hpplus08.cern.ch>
On Tue, 25 Mar 1997, Brian Lorraine wrote:
> print "Content type: text/html\n\n";
This isn't a perl language question, it's a CGI (or HTTP protocol)
question. And the answer is
print "Content-type: text/html\n\n";
There are some useful CGI tutorials at http://hoohoo.ncsa.uiuc.edu
and of course some excellent FAQs on comp.infosystems.www.authoring.cgi
where this kind of issue is discussed.
------------------------------
Date: Thu, 27 Mar 1997 10:44:31 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Ernie Dunbar <grimm@vortex.netbistro.com>
Subject: Re: Same syntax, different result.
Message-Id: <Pine.GSO.3.96.970327104214.13866W-100000@kelly.teleport.com>
On 27 Mar 1997, Ernie Dunbar wrote:
> open (MAILIT,"|mail -s Test grimm@netbistro.com -b $addresses") || die
Chances are good that you don't really want to interpolate @netbistro into
that string. And Perl should have told you so. Didn't it?
-- Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.lightlink.com/fors/
------------------------------
Date: 27 Mar 1997 12:52:46 -0500
From: Mark Atwood <zot@ampersand.com>
Subject: TPJ: Nukes
Message-Id: <v67mitz0gh.fsf@colon.dev.ampersand.com>
Please tell me this story was a joke...
(In TPJ #5, "Perl and Nuclear Weapons Don't Mix", Ray F. Piodasoll
relates that he had written real nuclear missile guidance software in
Perl, that ultimately ended up burned into the ROMs of real nuclear
missiles...)
--
Mark Atwood | Cuius testiculos habes,
zot@ampersand.com | habeas cardia et cerebellum.
------------------------------
Date: 27 Mar 1997 19:23:57 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: TPJ: Nukes
Message-Id: <5hehgd$msf@fridge-nf0.shore.net>
Mark Atwood (zot@ampersand.com) wrote:
: (In TPJ #5, "Perl and Nuclear Weapons Don't Mix", Ray F. Piodasoll
: relates that he had written real nuclear missile guidance software in
: Perl, that ultimately ended up burned into the ROMs of real nuclear
: missiles...)
I wouldn't be surprised. I have one version of Perl that works as an
alarm clock, another that feeds the cat, and yet another that is holding
up the dining room table. Perl does everything. :-)
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: 27 Mar 1997 18:25:37 GMT
From: tommy@best.com (Tom Vaughan)
Subject: trouble with pipes
Message-Id: <5hee31$4ln$1@nntp2.ba.best.com>
I guess this is really more a matter of trouble with shells, yet I digress...
The following script will not work unless I remove the shbang token, "#!".
Is there anyway around this? I would like to leave what constitutes
$SHELLSCRIPT unmodified if at all possible.
script follows:
#!/usr/bin/perl
$SHELLSCRIPT = << 'END_OF_SHELLSCRIPT';
#!/usr/bin/perl
while (<DATA>) {
print $_;
}
__DATA__
one fish
two fish
blue fish
END_OF_SHELLSCRIPT
open(PIPE, "|/bin/sh") || die "unable to open pipe: ";
print PIPE $SHELLSCRIPT;
close(PIPE);
--
Tom Vaughan <tommy@best.com>
"I am down with the slow jams."
------------------------------
Date: 27 Mar 1997 19:57:23 GMT
From: alphonso@ncs-ssc.com (Keith Alphonso)
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <5hejf3$aa6@osh2.datasync.com>
In article <333A9099.5364@corder.com>, jimcor@corder.com says...
>
>USUARIO wrote:
>>
>> In article <1387.7010T977T2070@canit.se>, Iggy Drougge <optimus@canit.se>
wrote:
>> >John Lockwood (johnl@calweb.com) skrev:
>> >>"Terje A. Bergesen" <terjeber@eunet.spm-protect.no> wrote:
>> >
>> >>>> Unix appeals more to me and is more advanced technically, but I am
>> >>>> afraid that it is losing the market share to Windows 95.
>> >
>> >>Unix is more advanced technically? That's interesting. The last time
>> >>I installed a modem on Windows NT the OS found it for me. The last
>> >>time I tried it on Unix I read about the nine files one had to edit,
>> >>then gave up.
>
> As Personal Computers gain the desk tops employers can
>pay employees less...
>
> However, UNIX is gaining and controling the the Server enviroment.
>TSO and AS400 is losing that one. Personal Computers never had it.
>Case
>in point:
>
> I want to run a 2TB database with 2,000 simultaneous users and
>reload the operating system durring business hours without takeing the
>system down,... Yes UNIX Can, No Personal Computers can't:-)
>
> Now for the plug and pray cards of the Personal computers...
>I have purchased a modem, soundblaster card, and a snappy... none
>of them work. The Support people's suggestion was to erase and reload
>the operating system... Get a life.
>
> boot -r
>
> What a nice command:-)
>
>--
>James D. Corder When should you tell your wife
>jimcor@corder.com you love her?
>http://post369.columbus.oh.us Before someone else does!
I have yet to find an operating system that I would consider acceptable! They
all suck!
Sure the UNIX developers (K&R) actually went to their operating systems class
and passed it, but they didn't even take software engineering! UNIX has
probably the best kernel of any OS out there today, but nobody can use it
because the pinheads didn't make any attempt at making it usable!
Microsoft, on the other hand, flunked all of their CS classes, but did great in
their marketing classes (straight A's). They have no idea what makes an
operating system work (NT STILL doesn't have most of the stuff you learn in Op.
Sys. 101!).
Apple on the other hand figured they didn't even need an operating
system...hell a set of ROM routines and a request that everyone use them is
enough right! Well they been trying to patch around that for about 10 years.
I've heard NEXT is cool, but constricted to a proprietary language (Objective
C). Can't really make too many comments about that though!
The question is...
When will something decent come along! Something that actually does the stuff
you learn about in Op. Sys. class, but yet still has an easy to use interface!
Something that has used some good software engineering principles to make
developing software on the platform easy. Quite frankly something that doesn't
SUCK!!
Have a nice day!
------------------------------
Date: 27 Mar 1997 20:02:35 GMT
From: "Wen Ting" <ting@platinum.com>
Subject: Xsubpp part of Win32 distribution
Message-Id: <01bc3aea$04e02d10$1e2611ac@tingw>
Is Xsubpp part of Perl Win32 distribution?
wt
------------------------------
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 192
*************************************