[12698] in Perl-Users-Digest
Perl-Users Digest, Issue: 107 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 11 04:07:14 1999
Date: Sun, 11 Jul 1999 01:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 11 Jul 1999 Volume: 9 Number: 107
Today's topics:
Re: beginner's sorting problem (BLUESRIFT)
Re: Changing case local-specifically (Larry Rosler)
Re: Changing case local-specifically (Larry Rosler)
Re: Changing case local-specifically <uri@sysarch.com>
Re: Changing case local-specifically (Larry Rosler)
Re: Changing case local-specifically (Abigail)
Re: Changing case local-specifically (Abigail)
Re: Changing case local-specifically (Larry Rosler)
Re: DNS question then sorting by values (Michael Fuhr)
extracting domains from whois query webmaster@inlandpac.com
Re: Help -- Weird Increments (MacPerl) (Larry Rosler)
help me pl.....I can not open the perl (to return the s <kent7777@hutchcity.com>
help me pl.....I can not open the perl (to return the s <kent7777@hutchcity.com>
help me pl.....I can not open the perl (to return the s <kent7777@hutchcity.com>
Re: I need to hide the source <dwb1@home.com>
Re: Ignoring the first line of a file <uri@sysarch.com>
Re: Ignoring the first line of a file <uri@sysarch.com>
Re: Microsoft Word -> TXT? chriskm@empirenet.com
Re: Quest: pingecho for Linux. chriskm@empirenet.com
Thoughts on my new game <bie@connect.ab.ca>
Re: Use a Perl Module w/o Installing It? (Abigail)
Waiting to exhale...actually for user to hit a key... <streaking_pyro@my-deja.com>
Re: Waiting to exhale...actually for user to hit a key. (Eric Bohlman)
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 11 Jul 1999 04:05:53 GMT
From: bluesrift@aol.com (BLUESRIFT)
Subject: Re: beginner's sorting problem
Message-Id: <19990711000553.20727.00002728@ng-fb1.aol.com>
I had an error in the source data which was causing the problem. Using sort
was new for me and I had suspected my understanding of its use to be the cause.
Thank you very much for helping me by reinforcing my understanding
(reassurance I was doing it correctly).
Rob
------------------------------
Date: Sat, 10 Jul 1999 21:40:14 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Changing case local-specifically
Message-Id: <MPG.11f1c000c923bec3989c9d@nntp.hpl.hp.com>
In article <MPG.11f19e74e1b458c989c9b@nntp.hpl.hp.com> on Sat, 10 Jul
1999 19:17:02 -0700, Larry Rosler <lr@hpl.hp.com> says...
...
> Never having interpolated an array in that context, I was curious about
> the same thing. This is a "double-quoteISH" context, but does that mean
> that the implicit join is with $" or with ""?
>
> I decided that it didn't matter at all. The tr/// may be longer, but
> after compilation that ends up as a 256-character lookup table no matter
> what the contents of the tr/// look like. Every one of the spaces (if
> they are there, and I'm not sure how to find out whether they are or
> not) ends up creating one entry in the table, namely that for " ". So
> there is no effect on the execution time whatever.
Here is the experiment and the results. The value of $" is indeed used
for the 'join'.
#!/usr/local/bin/perl -w
use strict;
my @left = ('A', ' ', 'B');
my @right = ('a', 'z', 'b');
do_it();
$" = "";
do_it();
sub do_it {
eval "sub Tr { \$_[0] =~ tr/@left/@right/ }";
$@ and die $@;
$_ = "A B\n";
print;
Tr($_);
print;
}
__END__
A B
a b
Subroutine Tr redefined at (eval 2) line 1.
A B
azb
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Sat, 10 Jul 1999 22:13:39 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Changing case local-specifically
Message-Id: <MPG.11f1c7dd54d97c4a989c9e@nntp.hpl.hp.com>
In article <378815CF.31C99873@home.com> on Sun, 11 Jul 1999 03:56:42
GMT, Rick Delaney <rick.delaney@home.com> says...
> Larry Rosler wrote:
> >
> > > >> eval "sub TR { \$_[0] =~ tr/@left/@right/ }";
> >
> > Never having interpolated an array in that context, I was curious about
> > the same thing. This is a "double-quoteISH" context, but does that mean
> ^^^
> huh?
>
> > that the implicit join is with $" or with ""?
>
> You've never interpolated an array inside double-quotes?
The strings inside a regex or a translation are "double-quoteISH"
because some semantics differ from those of the ordinary double-quote.
For example, "\b" means backspace in double-quotes and translate, but
word-boundary in regex; "\l" means lower-case the next character in
double-quotes and regex, but 'l' in translate; ... But you knew all
that, so why are you playing dumb or trying to make me seem dumb?
The question was whether the 'join' string was $" in the translate
environment. As this isn't documented, an experiment would be necessary
to find out.
> > I decided that it didn't matter at all. The tr/// may be longer, but
> > after compilation that ends up as a 256-character lookup table no matter
> > what the contents of the tr/// look like. Every one of the spaces (if
> > they are there, and I'm not sure how to find out whether they are or
> > not) [snip]
>
> @list = 1 .. 3;
> $" = ':';
> $_ = "@list\n";
> eval "tr/@list/a|b|c/;";
> print;
Yes. I published my own little experiment before I saw yours. So now
we all know the answer. But it isn't documented, and therefore in some
sense shaky.
I have been criticized here for relying on the results of experiments
even though no one has counter-examples. Specifically, whether the
value of a 'true' Boolean expression in numeric context is reliably 1
for further computation. I claim it is reliable and use it all the
time. Others say that one must use (BOOL_EXPR ? 1 : 0). Barf...
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 11 Jul 1999 01:38:22 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Changing case local-specifically
Message-Id: <x7g12vpwz5.fsf@home.sysarch.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
LR> The strings inside a regex or a translation are "double-quoteISH"
LR> because some semantics differ from those of the ordinary double-quote.
LR> For example, "\b" means backspace in double-quotes and translate, but
LR> word-boundary in regex; "\l" means lower-case the next character in
LR> double-quotes and regex, but 'l' in translate; ... But you knew all
LR> that, so why are you playing dumb or trying to make me seem dumb?
LR> The question was whether the 'join' string was $" in the translate
LR> environment. As this isn't documented, an experiment would be necessary
LR> to find out.
larry,
i am sorry to say, you are very lost here. remember that you are first
creating a single double quote string with @left and @right in it. tr
has NOTHING to do with it other than as plain text in the string. so $"
is most definitely involved as the separator of the implicit join. then
that string with the space separated letters in the tr/// is evaled to
give the sub. so tr/// will see the spaces and probably build a table
with only one entry for space but the compilation will take longer (not
by much but for you perl golfers out thers, it is a lot. :-). and by
perl golf standards it sucks as you are creating useless extra space
chars!
LR> Yes. I published my own little experiment before I saw yours. So
LR> now we all know the answer. But it isn't documented, and
LR> therefore in some sense shaky.
who needs to experiment? the double quote context is all that initially
exists. the tr context doesn't come until the eval is executed. case
closed.
sorry, buddy and co-author, you really blew it this time.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Sat, 10 Jul 1999 23:58:28 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Changing case local-specifically
Message-Id: <MPG.11f1e06e5066ee59989c9f@nntp.hpl.hp.com>
In article <x7g12vpwz5.fsf@home.sysarch.com> on 11 Jul 1999 01:38:22 -
0400, Uri Guttman <uri@sysarch.com> says...
...
> sorry, buddy and co-author, you really blew it this time.
Yes, you are right. I finally understand. I saw only:
tr/@left/@right/
and reasoned poorly from there about double-quotISH context caused
somehow by the 'tr///'. What I should have seen was the entire string
being eval'ed:
"sub TR { \$_[0] =~ tr/@left/@right/ }"
which as you say has no mystical properties -- it is just double-quoted,
so obviously $" is used for the two implicit joins.
A Russian proverb (poorly rendered here in translITERation, then in
translation) applies:
Vyek zhivi, vyek uchis'; no durak umeryosh.
Live a century, learn a century; nevertheless you'll die a fool.
Fortunately I still have a long way to go.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 11 Jul 1999 01:59:20 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Changing case local-specifically
Message-Id: <slrn7ogg5c.h7.abigail@alexandra.delanet.com>
Larry Rosler (lr@hpl.hp.com) wrote on MMCXL September MCMXCIII in
<URL:news:MPG.11f1c7dd54d97c4a989c9e@nntp.hpl.hp.com>:
:: In article <378815CF.31C99873@home.com> on Sun, 11 Jul 1999 03:56:42
:: GMT, Rick Delaney <rick.delaney@home.com> says...
:: > Larry Rosler wrote:
:: > >
:: > > > >> eval "sub TR { \$_[0] =~ tr/@left/@right/ }";
:: > >
:: > > Never having interpolated an array in that context, I was curious about
:: > > the same thing. This is a "double-quoteISH" context, but does that mean
:: > ^^^
:: > huh?
:: >
:: > > that the implicit join is with $" or with ""?
:: >
:: > You've never interpolated an array inside double-quotes?
::
:: The strings inside a regex or a translation are "double-quoteISH"
:: because some semantics differ from those of the ordinary double-quote.
:: For example, "\b" means backspace in double-quotes and translate, but
:: word-boundary in regex; "\l" means lower-case the next character in
:: double-quotes and regex, but 'l' in translate; ... But you knew all
:: that, so why are you playing dumb or trying to make me seem dumb?
No. You are confused. First thing that happens is evaluation of the
argument of the function, in this case 'eval'. The argument is a double
quoted string, which is an operator. It will do variable interpolation of
@right and @left, *putting in $"*. Then the function is called with the
argument and the function hands the argument to the compiler, because the
argument is a string, and only then the interpolation of tr/// happens.
But the compiler never sees the @right and @left. For the sake of
the argument, assume @left contains 'a', 'b', 'c', 'd' and @right
contains 'A', 'B', 'C', 'D'. Then the compiler sees:
sub TR { $_[0] =~ tr/a b c d/A B C D/ }
At this moment, there're no variables to interpolate (which tr/// doesn't
even do).
:: The question was whether the 'join' string was $" in the translate
:: environment. As this isn't documented, an experiment would be necessary
:: to find out.
I think it's documented what happens with interpolated arrays in double
quoted strings. And I think it's documented that tr/// doesn't do
interpolation of variables.
Abigail
--
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 11 Jul 1999 02:21:29 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Changing case local-specifically
Message-Id: <slrn7oghf1.h7.abigail@alexandra.delanet.com>
Abigail (abigail@delanet.com) wrote on MMCXL September MCMXCIII in
<URL:news:slrn7ogg5c.h7.abigail@alexandra.delanet.com>:
==
== At this moment, there're no variables to interpolate (which tr/// doesn't
== even do).
Here's a short proof that tr/// doesn't interpolate variables:
#!/opt/perl/bin/perl -wl
my @larry = 'a' .. 'z';
my $larry = uc join $" => @larry;
$_ = '@@@@@';
tr/@larry/$larry/;
print;
__END__
$$$$$
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 11 Jul 1999 00:26:16 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Changing case local-specifically
Message-Id: <MPG.11f1e6ee69ebbb5989ca1@nntp.hpl.hp.com>
In article <x7g12vpwz5.fsf@home.sysarch.com> on 11 Jul 1999 01:38:22 -
0400, Uri Guttman <uri@sysarch.com> says...
...
> sorry, buddy and co-author, you really blew it this time.
Yes, you are right. I finally understand.
Remember, I didn't write that variation; I adopted it from 'Neko |
tgy@chocobo.org', who adapted it from my original -- in which I did the
join with an explicit "" and then interpolated strings, not arrays.
In reading the adopted code, I saw only:
tr/@left/@right/
and reasoned poorly from there about double-quotISH context caused
somehow by the 'tr///'. What I should have seen was the entire string
being eval'ed:
"sub TR { \$_[0] =~ tr/@left/@right/ }"
which as you say has no mystical properties -- it is just double-quoted,
so obviously $" is used for the two implicit joins.
A Russian proverb (poorly rendered here in translITERation, then in
translation) applies:
Vyek zhivi, vyek uchis'; no durak umeryosh.
Live for a century, learn for a century; nevertheless you'll die a fool.
Fortunately I still have a long way to go.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 10 Jul 1999 23:13:21 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: DNS question then sorting by values
Message-Id: <7m995h$cd5@flatland.dimensional.com>
kevin@prism.ig.utexas.edu (Kevin Johnson) writes:
> I downloaded the Net::DNS package and can get some basic things
> to work. What I would like to do though, is search by IP address
> and pick up the reverse name lookup (ip.in-addr.arpa) When I
> try this, though I get
>
> ***
> *** WARNING!!! The program has attempted to call the method
> *** "address" for the following RR object:
> ***
> *** xxx.xxx.xxx.xxx.in-addr.arpa. 86400 IN PTR xxx.xxx.xxx.xxx
>
> <I've cut my IP address and replaced with x's here.>
As the warning says, you've called the "address" method for a DNS
record type (PTR) that doesn't have an address method. See the
Net::DNS::RR::PTR manual page for the method you should be calling (a
future release of Net::DNS will have an example of doing this on the
Net::DNS manual page).
[snip]
> Also, is this a dumb way to do this? I was planning on creating
> a lookup file to speed things a bit, but it may be there is a
> better way to do this?
>
> (The motivation is to generate statistics from a web server and
> print information about various domains.)
If you just need to convert IP addresses to names, then gethostbyaddr
will probably be easier to use than Net::DNS. However, I posted a
script a few months ago that does fast DNS lookups by sending multiple
queries to the nameserver and handling responses as they arrive instead
of blocking on each query:
http://www.deja.com/getdoc.xp?AN=455581292
The script may need some tweaking to meet your needs but it should
give you a good start.
Hope this helps.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
------------------------------
Date: Sun, 11 Jul 1999 06:46:35 GMT
From: webmaster@inlandpac.com
Subject: extracting domains from whois query
Message-Id: <7m9eka$nbe$1@nnrp1.deja.com>
OK. I am trying to perform a whois '$name.' and extract the domains
that are output as $results.
I am going to take $results, extract all domains set as @domains
and perfom a foreach type output.
For example, if I do the query for 'pepsi.', I get this (shortened
version):
PEPSI-LACROSS.COMPepsi-Cola (PEPSI-LACROSSE-DOM) PEPSI-LACROSSE.COM
Pepsi-Cola (PEPSI-MANKATO-DOM) PEPSI-MANKATO.COM
Pepsi-Cola (PEPSI-ROCHESTER-DOM) PEPSI-ROCHESTER.COM
Pepsi-Online.com (PEPSI-ONLINE3-DOM) PEPSI-ONLINE.COM
Pepsi-Online.net (PEPSI-ONLINE-DOM) PEPSI-ONLINE.NET
Pepsi-Online.org (PEPSI-ONLINE2-DOM) PEPSI-ONLINE.ORG
I want to extract only the list on the right hand side (the domains).
Can anyone please help me with this?
Thanks,
Chad.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Sat, 10 Jul 1999 21:27:01 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Help -- Weird Increments (MacPerl)
Message-Id: <MPG.11f1bcecefe5b704989c9c@nntp.hpl.hp.com>
[Posted and a courtesy copy sent.]
In article <7m8sj2$g2h@dfw-ixnews21.ix.netcom.com> on 11 Jul 1999
01:38:42 GMT, Tom Mornini <tmornini@netcom9.netcom.com> says...
> johnny99 <john@your.abc.net.au> wrote:
> : Can someone
> : instead tell me in a little more detail how to do the
> : equivalent of this:
>
> : data.txt consists of a number
> : I get the number from data.txt
> : I do stuff to it in Perl and get a new number
> : I replace the entire contents of data.txt with the new
> : number
>
> open (IN,'file.txt') || die "Cannot open file for input";
Where is the $! in the error message?
> $number=<>;
Having gone to the trouble of opening IN, it might be nice to read from
it instead of from God-knows-what!
> close IN;
>
> $number=chomp($number)+1; # Add 1 to $number
This would be great if one wanted $number always to have the same value:
2. Hint: `perldoc -f chomp` and read the last sentence.
> open (OUT,'>file.txt') || die "Cannot open file for output";
Where is the $! in the error message?
> print OUT $number;
It might be nice to throw a newline on, so the output would be a valid
text file.
> close OUT;
>
> : I'm a little bemused that this task is so hard -- that I
> : have to do all this "rewind the file to the right place"
> : stuff. As soon as I've read the file, it's history. I want
> : to trash it and write a new one, or do the equivalent of a
> : "save as". Was the writer of this script being extra careful
> : for some reason to do with UNIX, or am I missing something
> : obivous because it's late?
>
> That's not so hard, is it?
>
> The person who wrote the script either:
>
> 1) Had more requirements than you do
> 2) Did not have a clue
You could use some clues yourself.
Clue 1. Write and test whatever you offer, even if it is as trivial as
you seem to think.
Clue 2. Refer questions like this to the FAQ, in this case perlfaq5:
"How do I change one line in a file/delete a line in a
file/insert a line in the middle of a file/append to the
beginning of a file?" Many people with much more experience than you or
I have put a lot of effort into getting the answers right.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 6 Jul 1999 15:32:42 +0800
From: "kent" <kent7777@hutchcity.com>
Subject: help me pl.....I can not open the perl (to return the source code)..How do it ...
Message-Id: <7m9hbn$l5i2@rain>
------------------------------
Date: Tue, 6 Jul 1999 15:38:10 +0800
From: "kent" <kent7777@hutchcity.com>
Subject: help me pl.....I can not open the perl (to return the source code)..How do it ...
Message-Id: <7m9hlu$l5j1@rain>
------------------------------
Date: Tue, 6 Jul 1999 15:39:20 +0800
From: "kent" <kent7777@hutchcity.com>
Subject: help me pl.....I can not open the perl (to return the source code)..How do it ...
Message-Id: <7m9ho5$l4q1952@rain>
------------------------------
Date: Sun, 11 Jul 1999 04:59:45 GMT
From: "Daniel W. Burke" <dwb1@home.com>
Subject: Re: I need to hide the source
Message-Id: <Pine.LNX.3.96.990711010139.18563A-100000@cc569157-a.warn1.mi.home.com>
On 7 Jul 1999, Tom Christiansen wrote:
> [courtesy cc of this posting mailed to cited author]
>
> In comp.lang.perl.misc, Arne Jamtgaard <arnej@fc.hp.com> writes:
> :Have you considered compiling your decrypter in C and calling it
> :from within your perl script?
>
> That's going to do nothing to stop someone who isn't a complete idiot --
> and the bad guys aren't.
>
Just remember:
"A lock is only there to keep an honest man honest."
Dan.
------------------------------
Date: 11 Jul 1999 01:22:51 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Ignoring the first line of a file
Message-Id: <x7k8s7pxp0.fsf@home.sysarch.com>
>>>>> "REW" == Robert E Webb <bwebb@fred.net> writes:
REW> #!/usr/bin/perl -i -p
why no -w? it would have caught your error.
REW> next if $.=1;
do you know what the = operator does? do you know why it is the wrong
operator to use to test a value? read perlop and look for another
operator which is correct for this statement.
REW> Also, the last 4 lines in the file are also unwanted data, but the file
REW> itself is variable in length, so I am not sure how to get rid of those
REW> lines.
that is harder. you have to buffer up 4 lines and keep printing the
oldest line when a new line comes in. this is easily done with an array
and the push and unshift operators. i leave the rest as an exercise for
you.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: 11 Jul 1999 01:41:10 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Ignoring the first line of a file
Message-Id: <x7d7xzpwuh.fsf@home.sysarch.com>
>>>>> "DC" == David Cassell <cassell@mail.cor.epa.gov> writes:
>> next if $.=1;
>> tr/\cM//d;
DC> These look good, subject to my comments above.
are you wearing funny glasses? the next statement looks good to you? i
am ashamed that you hang around in this group. go program in python, you
perl hacker wannabe!
:-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
"F**king Windows 98", said the general in South Park before shooting Bill.
------------------------------
Date: Sat, 10 Jul 1999 10:48:28 -0700
From: chriskm@empirenet.com
Subject: Re: Microsoft Word -> TXT?
Message-Id: <c118m7.b7h.ln@oogabooga.worldhq.org>
Of course, the best solution is not to use Word documents, but
when rude people email me those pigs I usually just
'strings < piggy.txt > foo.txt'. A bit of formatting with
perl can finish it up if needed.
-ckm
------------------------------
Date: Sat, 10 Jul 1999 10:53:16 -0700
From: chriskm@empirenet.com
Subject: Re: Quest: pingecho for Linux.
Message-Id: <ca18m7.b7h.ln@oogabooga.worldhq.org>
ping -c1 hostname and test if $? returns "0" or "1".
-ckm
------------------------------
Date: Sun, 11 Jul 1999 00:08:34 -0600
From: Tim <bie@connect.ab.ca>
Subject: Thoughts on my new game
Message-Id: <378834E2.620A@connect.ab.ca>
Hello,
I just finished making this game, Can you tell me what you think of it.
It's done in perl, it's my first perl game, but I think it's pretty
good.
Go to: http://tbe.virtualave.net/chatters/dealin/
Tim
--
-------------------------------------------------------
| TBE: http://tbe.virtualave.net |
| * 3:2 Ratio + 100 Free credits! * |
| Tim's Chat Doors: http://www.connect.ab.ca/~mundy/ |
-------------------------------------------------------
------------------------------
Date: 11 Jul 1999 02:05:02 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: Use a Perl Module w/o Installing It?
Message-Id: <slrn7oggg7.h7.abigail@alexandra.delanet.com>
nkaiser@my-deja.com (nkaiser@my-deja.com) wrote on MMCXL September
MCMXCIII in <URL:news:7m8s0s$iaj$1@nnrp1.deja.com>:
{}
{} I have a Perl program which will be installed on many Unix machines. It
{} uses the "Storable" Perl module. However, many of these machines will
{} not have this module installed...and I will not have root access. Is
{} it possible to somehow bundle this module and reference it that way?
You don't need root to install modules.
Go read the documentation and FAQ. Or deja, as this misconcept is
raised at least 3 times a week.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Sun, 11 Jul 1999 04:07:45 GMT
From: R.Joseph <streaking_pyro@my-deja.com>
Subject: Waiting to exhale...actually for user to hit a key...
Message-Id: <7m95ad$kuf$1@nnrp1.deja.com>
In C you can use the function getch() to wait for a user to hit a key,
then do something. In perl I have been using:
unless (<STDIN>) { }
but I realize this a stupid way to do it because the could hit anything
but ENTER and it will not do what it is supposed to. Is there another
way of doing this? (hopefully a function) Thanks!!
--
R.Joseph
http://www.24-7design.com
http://bowdown.to
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 11 Jul 1999 07:35:54 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Waiting to exhale...actually for user to hit a key...
Message-Id: <7m9hgq$rnp@dfw-ixnews19.ix.netcom.com>
R.Joseph (streaking_pyro@my-deja.com) wrote:
: In C you can use the function getch() to wait for a user to hit a key,
: then do something. In perl I have been using:
:
: unless (<STDIN>) { }
:
: but I realize this a stupid way to do it because the could hit anything
: but ENTER and it will not do what it is supposed to. Is there another
: way of doing this? (hopefully a function) Thanks!!
use Term::ReadKey;
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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 V9 Issue 107
*************************************