[12120] in Perl-Users-Digest
Perl-Users Digest, Issue: 5720 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 19 02:15:50 1999
Date: Tue, 18 May 99 23:00:22 -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, 18 May 1999 Volume: 8 Number: 5720
Today's topics:
Re: _Please_ improve localtime! (I R A Aggie)
about: use strict; (Austin Ming)
Re: Accents Sensitivity (Larry Rosler)
Re: Appending a simple form to end of Search results in (Ronald J Kimball)
Calling perl cgi from another cgi acisconsulting@my-dejanews.com
Re: Creating FIle with a predeterminated Size (Larry Rosler)
Re: DBI not thread safe. Another way? <sugalskd@netserve.ous.edu>
Re: FAQ 4.15: How do I find yesterday's date? (Martien Verbruggen)
How to catch the return value in Perl? <peary@ms1.url.com.tw>
Re: IRIX and Perl Menu (I R A Aggie)
Need help on pattern matching tvn007@my-dejanews.com
Re: Need help on pattern matching (Tad McClellan)
Re: Need help on pattern matching (Andrew Allen)
Re: Need help on pattern matching (Larry Rosler)
Re: Perl "constructors" armchair@my-dejanews.com
Re: Perl "constructors" armchair@my-dejanews.com
Re: PM Question (Ronald J Kimball)
search engine <spalmer@c031.aone.net.au>
Re: Simple Time Manipulation (Sam Holden)
Re: Sorting problem (Arjun Ray)
TCL to Perl conversion (ike j norton)
test tvn007@my-dejanews.com
Re: The Vi Lovers Home Page <mpersico@erols.com>
things that make you go ICK! <sstarre@my-dejanews.com>
Re: things that make you go ICK! (Tad McClellan)
Re: Tie Fighter (Chris Nandor)
Re: using gethostbyaddr? (Larry Rosler)
Re: XML::XQL (Arved Sandstrom)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 19 May 1999 05:19:52 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: _Please_ improve localtime!
Message-Id: <slrn7k4il1.1qh.fl_aggie@thepentagon.com>
On Tue, 18 May 1999 21:41:05 GMT, Daniel Pfeiffer <occitan@esperanto.org>, in
<7hsmpi$r6q$1@nnrp1.deja.com> wrote:
+ Going from 2 to 3 digits in the year returned by localtime is hardly a
+ feature, though it should mostly avert the Y2k headaches. This likely
+ means touching a lot of proggies before year's end.
What is so FSCKing hard about:
$year=1900+(localtime)[5]; #add back the offset!
Laziness is a virtue, but there's no virtue in not consulting the docset.
+ So, hey, give us poor programmers a break.
And to do so, you'll be breaking hundreds, if not thousands of other
programs. No thanks.
James
------------------------------
Date: 19 May 1999 04:58:34 GMT
From: austin95002887@yahoo.com (Austin Ming)
Subject: about: use strict;
Message-Id: <7htgdq$1ui$2@justice.csc.cuhk.edu.hk>
Why it is a good recomendation to use "use strict;" after "#!/usr/bin/perl" ?
------------------------------
Date: Tue, 18 May 1999 19:19:07 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Accents Sensitivity
Message-Id: <MPG.11abbf6ee2c81eb9989a98@nntp.hpl.hp.com>
In article <7hs12r$47mi$1@www.univie.ac.at> on 18 May 1999 15:30:35 GMT,
Peter Marksteiner <pm@univie.ac.at> says...
...
> tr /[A@Ba`bIHJihjMLNmlnSRTsrtZY[zy{Qq/[aaaaaaeeeeeeiiiiiioooooouuuuuunn]/;
> tr /[A-Z]/[a-z]/;
This is reasonable. Why not do it all in one tr///?
But there is little reason to translate '[' to '[' and ']' to ']'. :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 19 May 1999 00:56:28 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Appending a simple form to end of Search results in pearl
Message-Id: <1ds0u38.d3axhdt968g0N@p65.block2.tc1.state.ma.tiac.com>
Twarren10 <twarren10@aol.com> wrote:
> I would like to append this simple search again box to end of my search
> results.
> Does anyone know how this can be done?
print <<EOHTML;
> <FORM METHOD=POST ACTION="http://mydomain.com/cgi/search.cgi">
> <INPUT NAME="searchstring" SIZE="30" MAXLENGTH="30">
> <INPUT TYPE=SUBMIT VALUE="Search Again">
> </FORM>
EOHTML
Enjoy!
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Wed, 19 May 1999 04:16:22 GMT
From: acisconsulting@my-dejanews.com
Subject: Calling perl cgi from another cgi
Message-Id: <7htdul$ais$1@nnrp1.deja.com>
I am trying to call a perl cgi program 'B.cgi'
from within another cgi program 'A.cgi'.
I would like to pass FORM name-value pairs to cgi
B from cgi A. CGI B would them process the data as
if an HTML submit button has been clicked.
CGI A resides in a secure server, CGI B in my
regualr cgi-bin directory.
I am rather new to perl programming, would very
much appreciate a code fragment example.
cheers,
Efrem
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Tue, 18 May 1999 20:15:50 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Creating FIle with a predeterminated Size
Message-Id: <MPG.11abccc37596effe989a99@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <3741ACF4.ADBE04C5@hp.com> on Tue, 18 May 1999 20:09:56
+0200, Pep Mico <"Pep Mico"@hp.com> <Pep Mico <"Pep Mico"@hp.com>>
says...
> How can I create a file with a predeterminated file? or for example, how
> Can I create a file with a size of 10Mbytes?
I think everyone else who answered this question by printing 10 Mbytes
of garbage missed the boat completely. truncate() can be used to grow a
file as well as to shrink it.
The following program works on both HP-UX and Windows 95 (with
appropriate values for $file, of course, and enough file space).
#!/usr/local/bin/perl -w
use strict;
my $file = '/home/lr/test/foo';
open OUT, ">$file" or die "Couldn't open '$file'. $!\n";
truncate OUT, 10 * 1024 * 1024 or die "Couldn't truncate. $!\n";
close OUT;
print -s $file, "\n";
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 19 May 1999 03:57:04 GMT
From: Dan Sugalski <sugalskd@netserve.ous.edu>
Subject: Re: DBI not thread safe. Another way?
Message-Id: <7htcqg$s2f$1@news.NERO.NET>
Darrel Davis <darreld@his.com> wrote:
: Excellent. After looking through the Perl Cookbook I was going
: to use a separate process and communicate via pipes. I know
: how to create the DBI thread but how would I communicate with
: the BDI thread from the other threads? via a global hash?
Depends. If you're using multiple processes, then I'd go with a pipe or socket
connection. If you want to use threaded perl, then check out the docs for
Thread::Queue. Set up a queue to communicate with the DBI thread, and pass
requests down it. The DBI thread will take those requests off the queue, process
them, and return the info to the calling thread. (Probably via a queue, though
there are other ways too)
Dan
------------------------------
Date: Wed, 19 May 1999 02:10:08 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: FAQ 4.15: How do I find yesterday's date?
Message-Id: <44p03.362$bB5.986@nswpull.telstra.net>
In article <7hrm6l$2sn$1@news.auaracom.net>,
"Jim The Perl Guy" <news@thebeaches.to> writes:
> No matter what day of the week, month, year, decade or century, there are
> only 86,400 seconds unless it's a daylight savings switch. In that case,
> you'll have to write a rather large sub to recognize those dates. Doable but
> it only makes a difference twice a year. Is it that much of a difference?
This is the sort of attitude that has created many of the Y2K problems..
Martien
--
Martien Verbruggen |
Interactive Media Division | 75% of the people make up 3/4 of the
Commercial Dynamics Pty. Ltd. | population.
NSW, Australia |
------------------------------
Date: Wed, 19 May 1999 10:07:37 +0800
From: "peary" <peary@ms1.url.com.tw>
Subject: How to catch the return value in Perl?
Message-Id: <7ht9no$j5r$1@news1.sinica.edu.tw>
Hi, all,
I have asked the following problem for a few days, and someone ever
answered me. But the problem still not solved.
Does anyone know how to solve the problem?
And I found the web seems can't find the path of C execution file,
and don't execute it. But I have put the pl and C in the same path, WHY?
Could anyone tell me ?
Thanks!!
Peary
Here is my problem,
I use the Linux system with informix & perl,
We know we can use the perl statement " qx (ls -al) "
to capture the output of "ls -al" , and it really works.
Then I tried to write a C program and compiled to execution file as
"add".
the code is as following....
/*--add.c--*/
#include <stdio.h>
main(int argc, char *argv[]){
printf("%s",argv[1]);
return;
}
and my perl example code :
#!/usr/bin/perl
#--tt.pl
use CGI;
use CGI::Carp;
$|=1;
print "Content-type:text/html\n\n";
$p="123abc";
#--this is where i call the C program and want to capture the output value
$val=qx(./add $p);
print "<h1>return value--$val</h1>";
When I execute the perl program under the linux command mode,
"perl tt.pl", it really print out the result as
"<h1>return value--123abc</h1>".
But when i run it on BROWSER and submit to call the tt.pl ,
the result(123abc) won't print out on browser(the result is "return
value--"), why?
Is somewhere wrong? or
Is there anyother method to catch the output or the return value
of the C program ?
------------------------------
Date: 19 May 1999 05:11:16 GMT
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: IRIX and Perl Menu
Message-Id: <slrn7k4i4t.1qh.fl_aggie@thepentagon.com>
On Wed, 19 May 1999 00:03:04 GMT, Alastair <alastair@calliope.demon.co.uk>, in
<slrn7k43gl.5o.alastair@calliope.demon.co.uk> wrote:
+ Marco Radaelli <radaelli@digipoint.it> wrote:
+ >
+ >
+ >I tried the perl version 5.00503 in the tardist format and no problems in
+ >installing and using it.
+
+ Maybe a newer (prebullt) Perl will help. Doesn't 6.5 come with Perl 5.005?
5.00503 *is* the latest, stable release.
James - I just installed it on my new linux box at work within the last
24 hours...
------------------------------
Date: Wed, 19 May 1999 03:06:04 GMT
From: tvn007@my-dejanews.com
Subject: Need help on pattern matching
Message-Id: <7ht9qr$7qn$1@nnrp1.deja.com>
Hi,
Would someone help me on this ?
I come up with the solution to solve the following problem.
However, my solution was not robust and very lengthy.
Here is the problem:
I have some data as follow ( this is just small sample,
The real data could expand more than 200 columns and thousand of rows)
A B C D E F G I
0 0 1 0 H L H 1
1 0 1 0 H L H 1
1 1 1 0 L L H 1
0 1 1 0 H L H 1
The output should be as follow:
As you can see from the small sample input file above,
I would like to print out:
1) "column D stuck at 0" ( since all rows in column D remain 0 all the
time).
2) "column F stuck at L" (since all rows in column G remain at L all
the time).
3) "column G stuck at H" (since all rows in colun H remain at H all
the time).
4) "column I stuck at 1"
Thanks in advance for your help,
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Tue, 18 May 1999 19:56:46 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Need help on pattern matching
Message-Id: <unush7.d9b.ln@magna.metronet.com>
tvn007@my-dejanews.com wrote:
: Here is the problem:
: I have some data as follow ( this is just small sample,
: The real data could expand more than 200 columns and thousand of rows)
[snip data]
: The output should be as follow:
: As you can see from the small sample input file above,
: I would like to print out:
: 1) "column D stuck at 0" ( since all rows in column D remain 0 all the
: time).
-------------------------
#!/usr/bin/perl -w
use strict;
my @heads = split ' ', <DATA>; # column headers (names)
<DATA>; # skip blank line
my %values;
@values{@heads} = split ' ', <DATA>; # store initial values in hash
while (<DATA>) {
my @row = split;
for (my $i=0; $i<@row; $i++) {
$values{$heads[$i]} = '--unstuck--' if $row[$i] ne $values{$heads[$i]};
}
}
foreach (@heads) {
print "column $_ stuck at $values{$_}\n" unless $values{$_} eq '--unstuck--';
}
__DATA__
A B C D E F G I
0 0 1 0 H L H 1
1 0 1 0 H L H 1
1 1 1 0 L L H 1
0 1 1 0 H L H 1
-------------------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 19 May 1999 05:12:36 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: Need help on pattern matching
Message-Id: <7hth84$d7m$1@fcnews.fc.hp.com>
tvn007@my-dejanews.com wrote:
: Hi,
: Would someone help me on this ?
: I come up with the solution to solve the following problem.
: However, my solution was not robust and very lengthy.
Perhaps you should post it anyways. Learning by being picked
to death by perl pontificators can be valuable (if not ego-
destroying ;)
: Here is the problem:
: I have some data as follow ( this is just small sample,
: The real data could expand more than 200 columns and thousand of rows)
: A B C D E F G I
: 0 0 1 0 H L H 1
: 1 0 1 0 H L H 1
: 1 1 1 0 L L H 1
: 0 1 1 0 H L H 1
: The output should be as follow:
: 1) "column D stuck at 0" ( since all rows in column D remain 0 all the
: time).
(etc., etc.) <snip>
how about:
#!/opt/perl5/bin/perl -w
use strict;
my @fields=split(' ',$_=<>);
my @x;
while(<>)
{
my @vals=split(' ');
$x[$_]->{$vals[$_]}=1 foreach 0..$#vals;
}
print "column $fields[$_] stuck at @{[keys %{$x[$_]}]}\n"
foreach grep keys(%{$x[$_]})==1,0..$#fields;
__END__
Andrew
------------------------------
Date: Tue, 18 May 1999 22:38:17 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Need help on pattern matching
Message-Id: <MPG.11abee2758373958989a9b@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <7ht9qr$7qn$1@nnrp1.deja.com> on Wed, 19 May 1999 03:06:04
GMT, tvn007@my-dejanews.com <tvn007@my-dejanews.com> says...
...
> I have some data as follow ( this is just small sample,
> The real data could expand more than 200 columns and thousand of rows)
>
> A B C D E F G I
>
> 0 0 1 0 H L H 1
> 1 0 1 0 H L H 1
> 1 1 1 0 L L H 1
> 0 1 1 0 H L H 1
>
> The output should be as follow:
>
> As you can see from the small sample input file above,
> I would like to print out:
>
> 1) "column D stuck at 0" ( since all rows in column D remain 0 all the
> time).
> 2) "column F stuck at L" (since all rows in column G remain at L all
> the time).
> 3) "column G stuck at H" (since all rows in colun H remain at H all
> the time).
> 4) "column I stuck at 1"
#!/usr/local/bin/perl -w
use strict;
my @data = map { [ $_, { } ] } split ' ', <DATA>;
while (<DATA>) {
next unless (my @vals = split) == @data;
++$_->[1]{shift @vals} for @data;
}
for (@data) {
next unless (my @keys = keys %{$_->[1]}) == 1;
print "column $_->[0] stuck at $keys[0]\n"
}
__END__
A B C D E F G I
0 0 1 0 H L H 1
1 0 1 0 H L H 1
1 1 1 0 L L H 1
0 1 1 0 H L H 1
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 19 May 1999 02:17:04 GMT
From: armchair@my-dejanews.com
Subject: Re: Perl "constructors"
Message-Id: <7ht6uv$64l$1@nnrp1.deja.com>
In article <7hrn8j$5q6$1@nnrp1.deja.com>,
John Porter <jdporter@min.net> wrote:
>
> The NON-difference is that they are both pointers. Pointers hold
> one thing: an address. So let's hope your original complaint
> that "objects can hold only one thing" has been laid to rest.
Both you and Russ Allberry misunderstood my complaint to thing that I
didn't know a hash or array could hold references to other hashes and
arrays. My complaint was that I had a hierchary of data that starts out
at one variable at the highest level. In C++ I can have more than one
variable at the highest level. But as what stated before: it's not a
brick wall.
> I'm sorry if I lost you on that -- I might have assumed too much
> about your understanding of the inner workings of perl scalars.
> Put simply, each has a 'numeric' part, a 'string' part, a
> 'reference' part, and others. If the numeric part has a value,
> but the string version is needed by the current operation, perl
> converts automatically and stores the result, so that both the
> numeric and string parts are "current", and any use of either one
> of them proceeds without any conversions being necessary.
> If, say, a new string value is assigned to the scalar, the numeric
> part is marked as invalid. And at such time as the numeric part
> is needed, the conversion is done and the result cached, as before.
>
> If the only role a scalar ever plays is numeric, no conversion of
> its value to a string is ever done. It's all handled for you
> automatically by the interpreter.
Thanks, that's very helpful.
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 19 May 1999 02:28:28 GMT
From: armchair@my-dejanews.com
Subject: Re: Perl "constructors"
Message-Id: <7ht7kc$6hi$1@nnrp1.deja.com>
In article <7hsloe$qd1$1@nnrp1.deja.com>,
armchair@my-dejanews.com wrote:
> In article <7hrkov$4ah$1@nnrp1.deja.com>,
> > You seem to have missed my point.
> > Since it's possible that the A passed in is actually B or C, in
> > which case I would like to call foo or bar, respectively, some
> > kind of "type testing" must be done, so that I only call foo or
> > bar in the legal cases (i.e. where a is a B or a C, respectively).
> > So you can't really escape "type testing" even in C++.
> > And it's rather more work than the simple 'exists' in Perl.
> >
>
In the case of where you had a reference to a base class A, and it was a
B, you would normally just call functions in both A and B, but yes, if
you were able to determine it was a B, and then cast it to a reference
to a B, you could call B functions that were not a part of A. So you
need a IsA type function to determine is a derived class is possibly
being referred to by a base class reference (or pointer).
If ( A.IsA() == "B" )
{
B & r= (B&) A;
r.bar();
}
So even though C++ records don't need to be checked for fields being
present, unlike hashes, if presented with a C++ base class in a
hierarchy, you may have to check it's type in some occasions.
The real question is, what is a Perl programmer doing with Meyer's book?
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 19 May 1999 00:56:30 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: PM Question
Message-Id: <1ds10u8.5fkf8c11jnfyN@p65.block2.tc1.state.ma.tiac.com>
[posted and mailed]
Neil Edwards <neiled@clara.net> wrote:
> Hi there, before I continue any further with this post I want to ask
> if it is alright to post stuff about PerlMongers in here?
What kind of stuff?
If you want to post an announcement about your Perl Mongers group having
a meeting, several other PM groups are already doing that. Go ahead!
If you want to ask if there are people interested in starting a Perl
Mongers group in your area, that's how several other PM groups were
created. Go ahead!
If you want to say that Perl Mongers are idiots, well, we'd rather you
didn't. :)
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
perl -e 'print "Just another Boston Perl Monger\n"'
------------------------------
Date: Wed, 19 May 1999 12:54:57 +1000
From: "Scott Palmer" <spalmer@c031.aone.net.au>
Subject: search engine
Message-Id: <7ht9le$1ac$1@news.mel.aone.net.au>
could someone please point me in the right direction in regards to apply a
search facility on a 'virtual web-site' I am developing on CD. Should I be
thinking about learning Perl? or Java? or is it possible for me to obtain a
plug-in search engine???
Any advice or suggestions would be greatly appreciated
Thanks in advance
Scott
------------------------------
Date: 19 May 1999 03:14:30 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Simple Time Manipulation
Message-Id: <slrn7k4b4m.kth.sholden@pgrad.cs.usyd.edu.au>
David Cassell <cassell@mail.cor.epa.gov> wrote:
>hymie! wrote:
>>
>> In our last episode, the evil Dr. Lacto had captured our hero,
>> Jonathan Stowe <gellyfish@gellyfish.com>, who said:
>> >Newsworthy <hannum@ohio.edu> wrote:
>> >> Hello,
>> >>
>> >> I want to be able to add 24 hours to the (timelocal) funciton. Could
>> >> somebody tell me how I can best do this?
>> >>
>> >
>> >I assume you mean localtime ?
>> >
>> >$time = localtime(time + 86400);
>> >
>> >Which of course might fail at some places at certain times of the year but
>> >its usually good enough ;-}
>>
>> Why will this fail? Daylight savings time doesn't change the fact that
>> 24 hours is 86,400 seconds.
>
>But daylight savings time *does* change the 'fact' that days
>are 24 hours. In the non-pathological cases [:->] in the U.S.,
>you have one day of 23 hours and one day of 25 hours each year.
But the question was how to add 24 hours to the timelocal function.
It wasn't how to get the next day.
Thus it will never fail even during those wonderful 2 hours of the
year...
--
Sam
The most exciting phrase to hear in science, the one that heralds new
discoveries, is not "Eureka!" (I found it!) but "That's funny ..."
--Isaac Asimov
------------------------------
Date: 18 May 1999 23:34:02 -0500
From: aray@nmds.com (Arjun Ray)
Subject: Re: Sorting problem
Message-Id: <37da3cac.2776432989@news1.newscene.com>
In <m1wvy6lapi.fsf@halfdome.holdit.com>,
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
| I had considered making an arrayref instead of a single string, and
| then realized I'd be building a data structure with no purpose, since
| the next stage just wraps the whole thing anyway. I mean, to get a
| little weirder, I could have done this:
|
| print
| map { local $" = ""; "<tr>@$_</tr>" }
| map { [map "<td>$_</td>", map { /^$/ ? "-" : $_ } @$_] }
| [...]
| That'd be much more APL-like. :)
Good point:)
But there could be a more general issue in these situations: whether
it's better (or worse?) to build (sub)strings to be interpolated into
other strings. The alternative would be to build a list of stuff and
just pass the lot to 'print' to process seriatim - assuming that's
what it will do. Something like this
print
map { ('<tr>',
map { ('<td>', /^$/ ? '-' : $_, '</td>') } @$_,
"</tr>\n") }
sort { $b->[2] <=> $a->[2] }
grep { $_->[1] =~ m/$FORM{'TNSET'}/i }
map { chomp; [ split /;/, $_, 9 ] }
@techlines;
At which point, we'd have a canonical ST were it not for that pesky
grep (surely the nested map is allowed?.) Should we petition Mr.
Christiansen to allow the canonical form to have an optional grep?
:ar
------------------------------
Date: Wed, 19 May 1999 03:59:45 GMT
From: ike@world.std.com (ike j norton)
Subject: TCL to Perl conversion
Message-Id: <FByoFL.7CI@world.std.com>
We have a number of TCL scripts to convert to Perl. Anyone know of a conversion routine?
Ike
------------------------------
Date: Wed, 19 May 1999 03:52:58 GMT
From: tvn007@my-dejanews.com
Subject: test
Message-Id: <7htciq$9na$1@nnrp1.deja.com>
x
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Tue, 18 May 1999 22:17:20 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: "Randal L. Schwartz" <merlyn@stonehenge.com>
Subject: Re: The Vi Lovers Home Page
Message-Id: <37421F30.6DB4C871@erols.com>
Well, at least I've credited you... Only 99 left to go.
"Randal L. Schwartz" wrote:
>
> >>>>> "Thomer" == Thomer M Gil <tmgil@cs.vu.nl> writes:
>
> Thomer> Please visit the Vi Lovers Home Page. Vi is *the* editor under Unix, Windows
> Thomer> 95/98/NT and many other operating systems.
>
> Them's fighting words. Don't make me come over there. Better yet, I
> just write an elisp macro to fight you. If you look like a Tower of
> Hanoi, I've already won.
>
> You'll have to pry my Emacs from my cold dead oversized
> control-pressing left pinky finger.
>
> (I can hear the sounds of 100 people putting that in their .sigs tomorrow. :)
>
> --
> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
> Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
> Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
> Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
> Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
--
Matthew O. Persico
http://www.erols.com/mpersico
You'll have to pry my Emacs from my cold dead oversized
control-pressing left pinky finger.
-- Randal L. Schwartz
------------------------------
Date: Wed, 19 May 1999 02:27:51 GMT
From: S Starre <sstarre@my-dejanews.com>
Subject: things that make you go ICK!
Message-Id: <7ht7j6$6h5$1@nnrp1.deja.com>
Oh I love this...
Illegal character \015 (carriage return) at ..//CGI.pm line 1.
(Maybe you didn't strip carriage returns after a network transfer?)
BEGIN failed--compilation aborted at ./mpost.cgi line 30.
I tried to take your advice (Larry R & Tom C) and use CGI.pm- and I get
this sucky result.. As usual, the unix sysadmin, in true unix sysadmin
form, says "it's no problem just turn off warnings"...
I'm going to take my chances with read( STDIN, $a,$ENV{CONTENT_LENGTH});
for now, not that I don't value your advice, but arguing with this
sysadmin is futile..
Making modules out of the programmer's control is both annoying and
obstructive..
GRRR
-S
Thought for the day: Write your Congressman and see if we can pass a
bill to make harpooning Makah Indians legal.
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Tue, 18 May 1999 19:36:23 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: things that make you go ICK!
Message-Id: <nhtsh7.d9b.ln@magna.metronet.com>
S Starre (sstarre@my-dejanews.com) wrote:
: Oh I love this...
: Illegal character \015 (carriage return) at ..//CGI.pm line 1.
: (Maybe you didn't strip carriage returns after a network transfer?)
: BEGIN failed--compilation aborted at ./mpost.cgi line 30.
: I tried to take your advice (Larry R & Tom C) and use CGI.pm- and I get
: this sucky result.. As usual, the unix sysadmin, in true unix sysadmin
: form, says "it's no problem just turn off warnings"...
: I'm going to take my chances with read( STDIN, $a,$ENV{CONTENT_LENGTH});
: for now, not that I don't value your advice, but arguing with this
: sysadmin is futile..
: Making modules out of the programmer's control is both annoying and
: obstructive..
Can't you just install your own version of the module?
Perl FAQ, part 8:
"How do I keep my own module/library directory?"
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 19 May 1999 02:45:33 GMT
From: pudge@pobox.com (Chris Nandor)
Subject: Re: Tie Fighter
Message-Id: <pudge-1805992245370001@192.168.0.77>
In article <3744083a.88294931@news.oz.net>, tgy@chocobo.org wrote:
# Instead of returning the tied scalar, return a reference to it. Then assign
# the reference to a typeglob.
A solution requiring the use of global variables is no solution at all.
--
Chris Nandor mailto:pudge@pobox.com http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6'])
------------------------------
Date: Tue, 18 May 1999 20:41:12 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: using gethostbyaddr?
Message-Id: <MPG.11abd2afad9e1ded989a9a@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <3741E75B.7F6E41C4@infonet.ee> on Wed, 19 May 1999 01:19:07
+0300, Gleb Ekker <globus@infonet.ee> says...
> I use free hosting service where CGI/Perl is allowed but they do not
> give $ENV{REMOTE_HOST}, it is empty. I have only $ENV{REMOTE_ADDR} with
> numerical address, but I need to have server's name too.
>
> I heared that it is possible to modify it by using gethostbyaddr, to
> resolve the host address into a host name. Please give me an example how
> I can do this thing.
There is an example in the Perl documentation of the function.
perldoc -f gethostbyaddr
If you can't get a short test program o run correctly, come back here
with the code and the symptoms.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 18 May 1999 23:24:17 -0300
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: XML::XQL
Message-Id: <Arved_37-1805992324170001@dyip-118.chebucto.ns.ca>
In article <3741C660.258048D7@mindspring.com>, Steve Farris
<nlymbo@mindspring.com> wrote:
> Does anyone have some code samples using the XML::XQL module.
> Having trouble building queries and accessing element contents.
> Thanks!
I think you must have overlooked Enno's tutorial on the use of same.
Arved
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 5720
**************************************