[6724] in Perl-Users-Digest
Perl-Users Digest, Issue: 348 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Apr 22 23:07:20 1997
Date: Tue, 22 Apr 97 20:00:29 -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, 22 Apr 1997 Volume: 8 Number: 348
Today's topics:
Re: -Niki Cox Nude (Tad McClellan)
2-way sockets: what's wrong with this? (PETROS MICHALIS)
5.003 on Solaris 2.5 fails 8 tests (Peter Leopold)
Re: [Q] How to capitilize beginning of words (David Combs)
Re: About Win32::ODBC with Oracle (PO7) <rootbeer@teleport.com>
article: web search <bslesins@hotwired.com>
Re: Back References (David Alan Black)
check command line options? (Jason Yutao Li)
Find something in a string <dharber@bitstream.net>
Re: Find something in a string (David Alan Black)
Re: Find something in a string (Tad McClellan)
Re: Getting it back OUT again! (Chipmunk)
Re: help: find pattern, then go down 3 lines <rootbeer@teleport.com>
Re: help: find pattern, then go down 3 lines (Chipmunk)
HELP: perl5 and Solaris 2.5.1 (Weihan Chang)
How do I create an array of sockets <axmishra@ewwmis1.cnf.com>
I/O on serial device? <jwz@netscape.com>
Intel v. Randal: How to unlearn Perl in 41 days (Jeffrey Kegler)
multiple STDOUT formats <fxrsg@Camelot.acf-lab.alaska.edu>
Re: Name that OS(unix,nt,?) question. <rootbeer@teleport.com>
Re: No syntax errors, but still the thing won't run <rootbeer@teleport.com>
Re: Ousterhout and Tcl lost the plot with latest paper <thant@nospam.acm.org>
Perl and EBCDIC (Chris Brown)
Re: Perl and EBCDIC (Bob Shair)
Re: PERL Programmer Needed for Small Project (Tad McClellan)
Re: Perl Telnet Web CGI HELP! <minaret@sprynet.com>
POD Question: Self Documenting Programs Not Supported? <flan@cs.wustl.edu>
Re: print <<THIS_PART; won't work <mark@backlash.net>
Re: print <<THIS_PART; won't work (Tad McClellan)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 22 Apr 1997 18:24:48 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: -Niki Cox Nude
Message-Id: <0chjj5.b54.ln@localhost>
Eryq (eryq@enteract.com) wrote:
: This spam apparently originated from earthlink.net.
: I went to their contact page:
:
: http://www.earthlink.net/company/contact_info.html
: and sent mail regarding this incident to:
: abuse@earthlink.net
: sales@earthlink.net
: kfitzsim@earthlink.net (public relations)
: I probably should have sent it to root as well.
: Legal or not, I think it's pretty clear that we're looking
^^^^^^^^^^^^
: at net abuse, and I want to stomp this kind of thing before
: we're all hip-deep in spam.
I saw individual postings advertising the same place in the SGML
and Scheme newsgroups as well...
: I suggest that anyone else who feels strongly about this
: abuse of c.l.p.misc, please feel free to send a CALM, SHORT EMAIL
: regarding this incident to any of the above addresses...
Already did it yesterday ;-)
: DO NOT MAILBOMB EARTHLINK OR THE SUSPECTED CULPRIT, OKAY?
^^^^^^^^^^^^^^^^^
I NEVER email directly to the spammers. I ALWAYS complain to their
providers instead. One spammer mailbombed me and added me to a bunch
of mailing lists, so I don't try to contact them at all any more...
: The WORST thing you can do is sink down to that level.
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 22 Apr 1997 21:40:45 -0400
From: michalis@interport.net (PETROS MICHALIS)
Subject: 2-way sockets: what's wrong with this?
Message-Id: <5jjpat$rqn@interport.net>
Hello,
this piece of code is driving me nuts...What I want to do is connect to
a server process, send a request to retrieve a filename and get that
specific filename back from the server through the same connection...
I'm establishing the socket connection successfully, I send in the
request, it gets processed (btw, I'm flushing the socket buffer), the server
sends back the file but the client just sits there waiting for something...
server sample:
for ( ; $paddr = accept(Client,Server); close Client) {
my($port,$iaddr) = sockaddr_in($paddr);
my $name = gethostbyaddr($iaddr,AF_INET);
select(Client); $!=1; select(STDOUT);
$request=<Client>;
open(LS,"$request") || die "can't open $request: $!";
while(<LS>) { print Client $_ }; close(LS);
print "transfer complete";
}
^^^^^^
This gets successfully executed including the "transfer complete"
client sample:
connect(SOCK,$paddr) or die "connect error: $!";
print "Connection Established\n\n";
select(SOCK); $!=1; select(STDOUT);
print SOCK $file; #####Request $file from server, this works
@stuff=<SOCK>; #####I'm stuck here, this never exits
Any help greatly apreciated.
Thanks,
Peter
------------------------------
Date: 23 Apr 1997 00:32:08 GMT
From: peter@diamond.harvard.edu (Peter Leopold)
Subject: 5.003 on Solaris 2.5 fails 8 tests
Message-Id: <5jjla8$lhf$1@news.fas.harvard.edu>
Dear Perl community
I have been able to build *but unable to test successfully*
5.003 on Solaris 2.5. I build with "sh ./Configure -des". The
following eight tests fail:
lib/anydbm
lib/filehand
lib/ndbm
lib/odbm
lib/posix
lib/safe
lib/sdbm
lib/socket
lib/soundex
The failed tests all have the same test diagnostics:
lib/anydbm.....Can't load '../lib/auto/Fcntl/Fcntl.so' for module
Fcntl: ld.so.1: ./perl: fatal: relocation error: symbol not found:
main: referenced in ../lib/auto/Fcntl/Fcntl.so at ../lib/DynaLoader.pm
line 140.
at ../lib/Fcntl.pm line 67
BEGIN failed--compilation aborted at ./lib/anydbm.t line 11.
FAILED on test 0
A basic reading of the error message suggests that the
function main() wasn't inserted in the module code or interface. I am
used to seeing this error while debugging my own modules. But in this
case, the error is ridiculous since modules are libraries and do not
contain main()s. The real problem seems to lie far away from the
content of the diagnostic.
Here is the output of 'myconfig':
Summary of my perl5 (5.0 patchlevel 3 subversion 0) configuration:
Platform:
osname=solaris, osver=2.5, archname=sun4-solaris
uname='sunos yorick 5.5 generic sun4m sparc sunw,sparcstation-4 '
hint=recommended, useposix=true, d_sigaction=define
Compiler:
cc='cc', optimize='-O', gccversion=2.7.2.2
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=0, d_casti32=define, d_castneg=define
intsize=4, alignbytes=8, usemymalloc=y, randbits=15
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lposix -lcrypt
libc=/lib/libc.so, so=so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fpic', lddlflags='-G -L/usr/local/lib'
And here is what I've tried:
- followed all instructions in the hints directory regarding
building perl on Solaris 2.5 (no GNU binutils, etc.)
- deinstalled all sorts of potentially conflicting Sun
packages
-WABI
-GPIB device drivers
-several proprietary packages produced by my company
-including a perl5.002 package
-several GNU utilities (not apparently
related to binutils)
- rebuilt/retested/reinstalled gcc 2.7.2.2
- read all recent postings to this group that matched "sol"
I am *about* to reinstall Solaris 2.5 if I really have to, but
that seems excessive.
Does anyone have any advice? I've put two days (and the good
will of a lot of people) into this rebuild project. The real estimate
of lost productivity is several weeks.
Thanks for any hints,
Peter Leopold
pel@bruker.com
------------------------------
Date: Wed, 23 Apr 1997 01:18:15 GMT
From: dkcombs@netcom.com (David Combs)
Subject: Re: [Q] How to capitilize beginning of words
Message-Id: <dkcombsE92GyG.5nL@netcom.com>
TOM C:
Please keep up the good work.
Please keep up the good writing.
Please DO NOT get pissed off and leave. PLEASE!
And thanks for a SUPER JOB!
------------------------------
Date: Tue, 22 Apr 1997 17:39:02 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "Patrick C. K. Wu" <ckwu6@iesun21>
Subject: Re: About Win32::ODBC with Oracle (PO7)
Message-Id: <Pine.GSO.3.96.970422173646.14200H-100000@kelly.teleport.com>
On Tue, 22 Apr 1997, Patrick C. K. Wu wrote:
> Is there any information about accessing Oracle Database using
> Win32::ODBC?
Isn't there good documentation within the Win32::ODBC module itself? Any
good module should have pod documentation within 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: Tue, 22 Apr 1997 18:20:02 -0700
From: Brian Slesinsky <bslesins@hotwired.com>
Subject: article: web search
Message-Id: <335D63C2.2A19@hotwired.com>
I got an article about writing a search engine in Perl published on the
web and just thought I'd toot my own horn. Comments welcome...
http://www.webmonkey.com/webmonkey/code
Brian Slesinsky - bslesins@hotwired.com
------------------------------
Date: 23 Apr 1997 01:31:00 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Back References
Message-Id: <5jjook$9oa@pirate.shu.edu>
Hello -
mc4650@mclink.it (Stefano Barbato) writes:
>I would like to print from a HTML file all html tags needed to create a Form.
>Then I would like to use a unique regular expression to do this work:
>
>undef($/)'; # all file
>$_ = <HTMLFILE>;
>/(<form.*?>).*?(<input.*?>).*?(<\/form>)/i
>print $1, $2, $3;
>This work but only for one <INPUT> field...to print all present input field I
>tried to use di expr:
>/(<form.*?>).*?(<input.*?>.*?)*.*?(<\/form>)/i
>print $1, ?????????
>- How can I refer to the 3rd, 4th, 5th, etc. <input> field (if any, of course)
> to print them out?
>- I need to include (<input.*?>.*?)* to match all input field but what I need
> is only the complete INPUT tag not text between INPUTs field (.*?). How I
>include nested ()s like ((<input.*?>).*?)* to back reference only important
>chars.
Here's one possibility:
my $form = '
<form method="whatever" action="yeah">
This is some stuff.
<input type="whatever" name="something">
<input type="another" name="something else">
<input type="encore_un" name="other thing">
Gee, I\'ve gotten used to CGI.pm :-)
<Something else in brackets>
</form>
';
@inputs = $form =~ m!(</?(?:form|input)[^>]*>)!gi;
print join "\n", (@inputs, "");
Output:
<form method="whatever" action="yeah">
<input type="whatever" name="something">
<input type="another" name="something else">
<input type="encore_un" name="other thing">
</form>
This approach is based on the fact that the form and input tags are
structurally rather similar, so you can use essentially the same pattern
for them. The only important difference is the possible occurrence of a
single '/' (in </form>).
Note the ?: operator, which causes the matches corresponding to that
parenthetical subexpression *not* to be returned as separate matches,
but still allows the parentheses to function, in other respects, as
they normally would. Thus we can step through the form-or-input choice
without getting a lot of interspersed matches consisting of the words
"form" and "input". (Remove ?: and you'll see what I mean.)
David Black
dblack@icarus.shu.edu
------------------------------
Date: 23 Apr 1997 02:09:39 GMT
From: jyli@PROBLEM_WITH_INEWS_GATEWAY_FILE (Jason Yutao Li)
Subject: check command line options?
Message-Id: <5jjr13$2a0@post.gsfc.nasa.gov>
Hi,
I am writting a Perl script which has an -device option. It allows
users to specify their own tape device name if different than
the default name:
readtape -device=<tape_device_name>
Inside the script, it looks like this:
$tapeDevice="/dev/mt/tape" # default tape drive name
$tapeDevice=$device if($device) # user specified tape drive
The problem is, if I mistype the option keyword -device, this script
will use the default tape drive. In this case, as far Perl is concerned,
I've never specified -device option. This is NOT a disirable behavior.
How does one trap command-line-option typos ?
Thanks,
--
========================================================================
Jason Y. Li | Tel : (301) 286-1029
Climate and Radiation Branch | Fax : (301) 286-1759
NASA Goddard Space Flight Center | www : http://climate.gsfc.nasa.gov
Greenbelt, MD 20771, USA | email: jyli@climate.gsfc.nasa.gov
========================================================================
Beauty of style, harmony, grace and good rhythm depend on simplicity.
------------------------------
Date: 23 Apr 1997 00:14:53 GMT
From: "Dustin0123" <dharber@bitstream.net>
Subject: Find something in a string
Message-Id: <01bc4f7b$3c0d2f40$70ed90ce@dharber.bitstream.net>
How do you find characters within strings? For example, let's say:
$day = "A nice day today"
How would I find 'nice' in $day?
Dustin0123
dharber@bitstream.net
------------------------------
Date: 23 Apr 1997 00:50:19 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: Find something in a string
Message-Id: <5jjmcb$594@pirate.shu.edu>
Hello -
"Dustin0123" <dharber@bitstream.net> writes:
> How do you find characters within strings? For example, let's say:
> $day = "A nice day today"
> How would I find 'nice' in $day?
Get thee to a tutorial on regular expressions :-)
You would do something along the lines of:
($found) = $day =~ /(nice)/;
or
@found = $day =~ /(nice)/g; # if it's a REALLY nice day :-)
But don't cut-and-paste regular expressions from newsgroups into
your code, unless you really understand what's going on. Otherwise
you will be in for even more aggrevation than the amount which
awaits you in the course of really learning them :-)
David Black
icarus.shu.edu
------------------------------
Date: Tue, 22 Apr 1997 19:02:12 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Find something in a string
Message-Id: <4ijjj5.ia4.ln@localhost>
Dustin0123 (dharber@bitstream.net) wrote:
: How do you find characters within strings? For example, let's say:
: $day = "A nice day today"
: How would I find 'nice' in $day?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You would read the perlre and/or perlop man pages that are included
with the perl distribution.
Then you would try writing some code that does what you want.
If it still doesn't do what you want, then post again
and include the code that you tried.
There are many people here that are willing to help debug programs.
There are much fewer here who will read the man pages for you,
and write _your_ program for you too...
I'm also unclear on what you mean by 'find'.
Do you mean "know that nice is contained in $day"?
[ print "I found 'nice' if $day =~ /nice/; ]
Do you mean "what is the character postion where nice starts"?
[ print "'nice' starts at position ", index($day, "nice"), "\n"; ]
That last one is likely to give unsatisfying results if 'nice' is
not found in $day...
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 23 Apr 1997 00:40:58 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: Re: Getting it back OUT again!
Message-Id: <5jjlqq$b99$2@dartvax.dartmouth.edu>
In article <5jdj58$1b2$1@demeter.omen.com.au>
ted@faroc.com.au (R.O. (Ted) Russ) writes:
> I made what I THINK is a HoH by doing this:
>
> dbmopen (%hoh, "/filename");
> for $name (@listofnames)
> {
> $hoh{$name, "Value1"} = "first";
> .....
> $hoh{$name, "Value10} = "tenth";
> }
> dbmclose (%hoh);
>
> But when I reopen it and try to read it with
>
> for $name (keys, %hoh)
>
> I get a list of the names with a high-ASCII appended, and then the
> second field appended to that
What you have there is a list consisting of whatever 'keys' returns
with no argument, followed by the hash array %hoh.
Change it to:
for $name (keys %hoh)
which is a list consisting of the keys of %hoh.
Hope that helps.
Chipmunk
------------------------------
Date: Tue, 22 Apr 1997 17:24:38 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: David Penney <david@penney.mv.com>
Subject: Re: help: find pattern, then go down 3 lines
Message-Id: <Pine.GSO.3.96.970422172118.14200E-100000@kelly.teleport.com>
On Tue, 22 Apr 1997, David Penney wrote:
> I have a file that I want to read and look for a pattern. When I find
> the pattern, I would like to go down 3 lines in the file and read in
> the value (actually the 5th and 6th character on that line but I
> think I can figure that one out) on that line and continue reading in
> the file. I'm pretty sure it's straightforward but am having trouble.
Well, if you know that your pattern will only occur once in the file and
that you're not interested in the two intervening lines, it's simple to do
something like this.
$third_line = undef;
while (<IN>) {
next unless /matchme/;
for (1..2) { <IN> } # Skip two lines
$third_line = <IN>;
}
die "Pattern not found, or another error"
unless defined $third_line;
Is that the sort of thing you're looking for? 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: 23 Apr 1997 01:00:26 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: Re: help: find pattern, then go down 3 lines
Message-Id: <5jjmva$b99$3@dartvax.dartmouth.edu>
In article <335c56d6.16884616@news.inetw.net>
niksun@lconn.net (Niksun) writes:
> open(FILE,"filename goes here");
> @lines = <FILE>;
> close(FILE);
>
> foreach ($i = 0; $i <= @lines; $i++) {
> if ($lines[$i] =~ /pattern/i) {
> $my_value = substr($lines[$i+3], 4, 2);
> }
> }
Note that this is the only solution suggested so far which would work
if the pattern appears twice within 3 lines.
For example:
pattern1
abc
pattern2
my_value1
def
my_value2
All the other proposed solutions would skip the second occurence of
pattern (pattern2) in their rush to reach the first my_value
(my_value1).
Chipmunk
On Tue, 22 Apr 1997 03:30:56 GMT, david@penney.mv.com (David Penney)
wrote:
>Hi,
>
>I have a file that I want to read and look for a pattern. When I find
>the pattern, I would like to go down 3 lines in the file and read in
>the value (actually the 5th and 6th character on that line but I
>think I can figure that one out) on that line and continue reading in
>the file. I'm pretty sure it's straightforward but am having trouble.
------------------------------
Date: Tue, 22 Apr 1997 20:33:08 GMT
From: dpwc@dprmpt.dataprompt.com (Weihan Chang)
Subject: HELP: perl5 and Solaris 2.5.1
Message-Id: <335d1eb9.24969974@192.133.97.103>
Hi,
I have been using perl's IPC functions under UTS without problem. I
started to write perl5 script under Solaris 2.5.1 with IPC function
calls. These are the error messages I got from 'require' ipc.ph and
msg.ph.
Number found where operator expected at (eval 13) line 1, near ")0"
(Missing operator before 0?)
Scalar found where operator expected at (eval 60) line 3, near "*($p"
(Missing operator before $p?)
Number found where operator expected at (eval 66) line 1, near ")0"
(Missing operator before 0?)
Is there a problem with h2ph ? Or, something I should do?
This is my code
#************
#!/usr/local/bin/perl
$| = 1;
# set perl library path
$INC[0] = "/usr/local/lib/perl5/sun4-solaris/5.003";
require "sys/ipc.ph";
require "sys/msg.ph";
#**********************
# The ipc.ph file
if (!defined &_SYS_IPC_H) {
eval 'sub _SYS_IPC_H {1;}';
require 'sys/types.ph';
if (defined &__cplusplus) {
}
if (defined( &_KERNEL) || defined( &_KMEMUSER)) {
}
eval 'sub IPC_ALLOC {0100000;}';
eval 'sub IPC_CREAT {0001000;}';
eval 'sub IPC_EXCL {0002000;}';
eval 'sub IPC_NOWAIT {0004000;}';
eval 'sub IPC_PRIVATE {( &key_t)0;}';
eval 'sub IPC_RMID {10;}';
eval 'sub IPC_SET {11;}';
eval 'sub IPC_STAT {12;}';
if (defined( &_KERNEL) || defined( &_KMEMUSER)) {
eval 'sub IPC_O_RMID {0;}';
eval 'sub IPC_O_SET {1;}';
eval 'sub IPC_O_STAT {2;}';
}
if (defined( &__STDC__) && !defined( &_KERNEL) && !defined(
&_XOPEN_SOURCE))
{
}
if (defined( &_KERNEL)) {
}
if (defined &__cplusplus) {
}
}
1;
------------------------------
Date: Tue, 22 Apr 1997 16:37:16 -0700
From: Aditya Mishra <axmishra@ewwmis1.cnf.com>
Subject: How do I create an array of sockets
Message-Id: <335D4BAC.725A@emeryworld.com>
How do I create an array of file descriptors in perl.
When I use hard references to store the file descriptors
in an array I end up with the same glob .
For example
sub get_fd{
local *S;
return \*S;
}
sub open_socket {
$fd = &get_fd;
socket($fd,etc
connect($fd, etc
$filedescs[$conn]=$fd;
$conn++;
..etc
}
sub create_desc_array
{
$conn=0;
for ($i =0;$i<10;$i++)
{
&open_socket();
}
..
...etc
}
When I call open_socket in the loop I get the same glob
reference everytime.
What I need is a new reference.
I have tried othe ways to create glob references like
sub get_fd
{
my $desc = shift;
return \*desc
}
and called in open_socket as
$fd = get_fd(\*S);
but it doesn't seem to help.
Please help
Thanks
Adi
------------------------------
Date: Tue, 22 Apr 1997 18:52:32 -0700
From: Jamie Zawinski <jwz@netscape.com>
Subject: I/O on serial device?
Message-Id: <335D6B60.3976B227@netscape.com>
I want to have a Perl script that talks to my modem. This doesn't
work:
open(DEV,"</dev/ttyf1");
print DEV "AT\n";
while(<DEV>) {
print "<== " . $_;
}
I tried \r and \r\n as well.
It works fine if instead of /dev/ttyf1, I use some other device that
is in use by a shell (what "tty" returns for that shell.)
crw-rw-rw- 1 uucp uucp 0, 97 Apr 22 18:45 /dev/ttyf1
Any suggestions? This is on Irix 6.2, if that matters.
--
Jamie Zawinski jwz@netscape.com http://www.netscape.com/people/jwz/
What the world needs now is killfiles that actually kill. -Craig Dickson
------------------------------
Date: 23 Apr 1997 01:44:52 GMT
From: cybersalem@algorists.com (Jeffrey Kegler)
Subject: Intel v. Randal: How to unlearn Perl in 41 days
Message-Id: <5jjpik$a1m@samba.rahul.net>
Letter from Cybersalem 6
Unlearn Perl in 41 days!
by Jeffrey Kegler
On June 13, 1995, Richard Cower, Intel Network Security
Specialist and State's Expert for the trial in Oregon v.
Schwartz, answers D.A. Tom Tintera's questions about Randal's
Perl scripts and their effects on Intel security with
considerable assurance:
Cower: "That program the way it was running at that moment,
the first time we found it, it was pretty wide open to
anybody on the Internet. If they had found it, they could
have accessed Intel computer systems."
Tintera: "If I was on the Internet with my computer and I
found that gate, I could just go through?"
Cower: "Yeah. Didn't have any safeguards on it."
Tintera: "What was -- In 1993 in October, were the safeguards
such that in your opinion Intel was secure from Internet
access on his Gate program?"
Cower: "I don't know without looking, without seeing the code
again, and I haven't looked at it in quite a while." [1]
However, by July 24, when Cower testifies as an expert witness at
the trial, a remarkable thing has happened.
Marc Sussman [Randal's attorney]: "You actually looked at --
did you actually examine the program script of each of the
door and the gate programs that Mr. Schwartz wrote to allow
access?"
Cower: "I've taken a very cursory look at those. I'm not a
Pearl programmer, so it wouldn't really make any sense for me
to examine it. I can't read the code." [2]
Richard Cower has unlearned Perl in 41 days! Not only this, but
he seems to have forgotten he ever could read it, or that there
was ever any point in his looking at Perl code.
===========================================================
The Friends of Randal Schwartz Web site archives the material on
all sides of this issue, including the trial transcripts:
<URL:http://www.lightlink.com/fors>.
Of the many opportunities to do something, three head the list:
1.) To sign a letter objecting to Intel's role in this sorry
matter, see <URL:http://www.lightlink.com/fors/us2intel>.
2.) To sign a letter to the Computer Law Committee of Oregon
State Bar, see <URL:http://www.lightlink.com/fors/us2oregon>.
3.) To get an auto-reply giving Randal's own statement, and
discussing how you can contribute to his Legal Defense Fund, send
an empty message to <URL:mailto:fund@stonehenge.com>
Permission is granted to freely copy the Cybersalem Letters in
electronic form, or to print them for personal use.
===========================================================
Note 1: <URL:http://www.lightlink.com/fors/court/6-13-95.txt>,
page 113, lines 7 to 20.
Note 2: <URL:http://www.lightlink.com/fors/court/7-24-95.txt>,
page 57, lines 7 to 14. "Pearl" is how the name of the Perl
language is given in the transcript. The transcripts regularly
butcher the technical language, sometimes into
incomprehensibility.
------------------------------
Date: Tue, 22 Apr 1997 16:18:50 -0800
From: "Richard S. Guse" <fxrsg@Camelot.acf-lab.alaska.edu>
Subject: multiple STDOUT formats
Message-Id: <335D556A.41C6@Camelot.acf-lab.alaska.edu>
How do I juggle multiple stdout formats? If there are more than 1, they
seem to eclipse each other. Also, how do I envoke them? THANKS, ->R
------------------------------
Date: Tue, 22 Apr 1997 17:34:22 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: "cssm.com" <mcdowell@magicnet.net>
Subject: Re: Name that OS(unix,nt,?) question.
Message-Id: <Pine.GSO.3.96.970422173107.14200G-100000@kelly.teleport.com>
On 22 Apr 1997, cssm.com wrote:
> How can one tell what Platform a perl script is being run on.
The quick-and-dirty test is to check $^O. On my system, that equals
'solaris'. Check out perlvar to read about it.
The more advanced way is to use Config.pm to see everything.
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: Tue, 22 Apr 1997 17:21:00 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Tammy Cotter <cottert@sonic.net>
Subject: Re: No syntax errors, but still the thing won't run
Message-Id: <Pine.GSO.3.96.970422171642.14200D-100000@kelly.teleport.com>
On 22 Apr 1997, Tammy Cotter wrote:
> if ($ENV{'REQUEST_METHOD'} eq 'POST') {
> # Get the input
> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
> @pairs = split(/&/, $buffer);
> foreach $pair (@pairs) {
> ($name, $value) = split(/=/, $pair);
> }
> }
> else {&error;}
Number one, you're doing this the wrong way. That's not a good way to
decode web input.
And, B, do you see that in your inner loop you're overwriting $name and
$value for each item? That's going to discard all but the last set.
Third, you should be using CGI.pm or another module from CPAN, which will
do all you need and more. (CGI.pm can even let you test your module
without the server, which is pretty handy.) In your attempt to reinvent
the wheel, you seem to have gotten a flat tire. :-)
IV. 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: Tue, 22 Apr 1997 18:23:51 -0700
From: Thant Tessman <thant@nospam.acm.org>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <335D64A7.167E@nospam.acm.org>
Bjarne Stroustrup wrote:
> [...] and I find it hard to think of something significant to say
> that applies to "Ousterhout and Stroustrup and Gates."
All three of you have a sign on your back that says "Kick me!"
[...]
> The furthest I go is to claim that unless C++ had at least some
> of the virtues I claim for it, it would have died during the
> early years where there were essentially no C++ marketing and
> alternatives languages with marketing dollars behind them existed.
I was one of those early adopters. At the time I and many others
were looking for a better C, and in our ignorance we thought C++ was
really great. Isn't it time to admit it was a mistake?
[...]
> I recommend "The Design and Evolution of C++" (Addison-Wesley) for people
> who are interested in what I actually claim for C++.
And I recommend folks learn *any* language that supports higher-order
functions, automatic memory management, and incremental compilation
to see how truly wretched C++ is, regardless of whatever claims
Stroustrup makes for it.
-thant
------------------------------
Date: 22 Apr 1997 00:19:54 GMT
From: cbrown@alaska.net (Chris Brown)
Subject: Perl and EBCDIC
Message-Id: <5jh07a$mml$1@byatt.alaska.net>
Looking for anything in Perl to help in converting
EBCDIC to ASCII. Any ideas?
Or better yet a Perl <-> DB2 interface.
Anyone?
Thanks
------------------------------
Date: 23 Apr 1997 02:40:32 GMT
From: rmshair@uiuc.edu (Bob Shair)
Subject: Re: Perl and EBCDIC
Message-Id: <5jjsr0$bpu@vixen.cso.uiuc.edu>
cbrown@alaska.net (Chris Brown) writes:
> Looking for anything in Perl to help in converting
>EBCDIC to ASCII. Any ideas?
>
The actual translation should be trivial, using the perl "tr" function
and specifying the searchlist as the EBCDIC character set you
want to translate, and the replacementlist as the ASCII characters
you want to convert them into.
Deciding how to translate the characters, with numerous code pages
available for EBCDIC and ASCII, is more difficult. If I were operating
in a vacuum, I'd start out with EBCDIC codepage 1037 going to ASCII
codepage iso8859-1, and see who complained.
DB2 is generally accessible via ODBC, DDCS, DRDA to the mainframe,
and it does all the code page translation for you (but you still have
to decide which ones to use!).
In my experience, getting the above running is quite difficult.
--
Bob Shair Open Systems Consultant
1018 W. Springfield Avenue rmshair@uiuc.edu
Champaign, IL 61821 217/356-2684
< Not employed by or representing the University of Illinois >
------------------------------
Date: Fri, 18 Apr 1997 21:22:57 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: PERL Programmer Needed for Small Project
Message-Id: <1aa9j5.r18.ln@localhost>
[ emailed and posted ]
Mike Reed (michael@freedomstarr.com) wrote:
: We have a small project that requires a skilled perl programmer to
: lookup via 'whois' the admininstrative contacts for a list of specific
: domains that we have, write the results to a file, then extract the
: first name, last name, and email address of that person from that file
: and output it in comma delimited form to a logfile, so we can contact
^^^^^^^^^^^^^^^^^
: these people.
^^^^^^^^^^^^
That sounds like Unsolicited Commercial Email to me.
I sure don't like that UCE stuff.
You're not doing _that_, are you?
I hope I'm wrong...
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 22 Apr 1997 23:55:32 GMT
From: "Geoff Mottram" <minaret@sprynet.com>
Subject: Re: Perl Telnet Web CGI HELP!
Message-Id: <01bc4f78$7880ad60$c56eafce@cactus>
> system ("find /mnt/web/guide
> /abcdefg/*.htm > t.dat");
>
> When I execute this program from telnet,
> it works, meaning, it creates a file, t.dat.
>
> But when I execute it from my web browser
> by a click of a button, the line is ignored.
Determine what the full path name of the "find" command is on your system
(run the "which find" command) and add the path to your script.
--
Geoff Mottram
minaret@sprynet.com
------------------------------
Date: 21 Apr 1997 18:51:50 -0700
From: Ian Flanigan <flan@cs.wustl.edu>
Subject: POD Question: Self Documenting Programs Not Supported?
Message-Id: <pi12083vn7t.fsf@famine.engwest.baynetworks.com>
Hi folks,
I'm trying to use POD to do document my Perl programs. I can use
pod2text (for example) to get all of the documentation from the
program, but what I *really* want is the source code and the
documentation to come out interleaved like this:
pack_prog
This is a silly package that calls its one function if it's run
as a program.
package pack_prog;
doit()
The doit() function just prints a silly message.
sub doit
{
print "I'm doin' it baby.\n";
}
return or don't
Now we return a 1 if this module is being *require*d . . .
return 1 if caller();
Or we call doit();
doit();
(Admittedly, the text version is hard to read, but the HTML version
should be much nicer.) Any ideas?
Thanks,
Ian Flanigan
------------------------------
Date: Tue, 22 Apr 1997 19:01:05 -0500
From: Mark Smith <mark@backlash.net>
Subject: Re: print <<THIS_PART; won't work
Message-Id: <335D5141.120C@backlash.net>
According to my PERL books, this is the way that you need to do it:
print <<'STOP';
HTML blah blah blah
STOP
hope that helps!
------------------------------
Date: Tue, 22 Apr 1997 18:46:56 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: print <<THIS_PART; won't work
Message-Id: <glijj5.s74.ln@localhost>
Mark Smith (mark@backlash.net) wrote:
: According to my PERL books, this is the way that you need to do it:
^^^^^^^
That is only one way. You don't *need* to do it that way.
The way you have it would be sub-optimal if you had:
print <<'STOP';
HTML $myvar blah blah
STOP
because $myvar will not be interpolated with those single quotes.
: print <<'STOP';
: HTML blah blah blah
: STOP
: hope that helps!
I think it confuses ;-)
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
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 348
*************************************