[7855] in Perl-Users-Digest
Perl-Users Digest, Issue: 1480 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 16 04:07:28 1997
Date: Tue, 16 Dec 97 01:00:35 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 16 Dec 1997 Volume: 8 Number: 1480
Today's topics:
Re: find and replace (Tad McClellan)
ftp a file PETER@yalevm.ycc.yale.edu
getting the pid from a system call <David.Leach@dpie.gov.au>
Re: getting the pid from a system call <zenin@best.com>
Re: help me <$_=qq!fearless\@NOSPAMio.com!;y/[A-Z]//d>
Re: help- newbie stuck in hash (again) <rhodri@wildebst.demon.co.uk>
how to clear terminal screen <russ@laker.net>
Re: How to get everything in between <pre>....</pre> ta (Michael Budash)
Re: how to send entire script code to STDOUT if STDIN e <rjk@coos.dartmouth.edu>
Kerberos authentication PETER@yalevm.ycc.yale.edu
Looking to work with Perl for Master's Thesis (Bradley M. Kuhn)
Re: NEED: Fast, Fast string trim() <ajh@rtk.com>
Re: newbie = ? on executing OS/2 commands via system(), <rjk@coos.dartmouth.edu>
newbie file input question <phurd@teleport.com>
Re: newbie file input question (brian d foy)
Re: Pass variables to Unix command? (Tad McClellan)
perldb: Undefined subroutine &Carp::longmess <kra@pobox.com>
Re: pgp encrypion via perl script (Michael Budash)
Re: post your dynamic IP address to a web page-cant be <blakem@seas.upenn.edu>
Problem with Wais 2.304 <kjones@aims.gov.au>
Re: Q on fcntl <tchrist@mox.perl.com>
Re: Rewinding a file back to the first line (Michael Budash)
Re: Which language pays most 17457 -- C++ vs. Java? (Tad McClellan)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 16 Dec 1997 01:12:27 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: find and replace
Message-Id: <rk9576.l55.ln@localhost>
Mark S. Reibert (reibert@mystech.com) wrote:
: Andreas Kraska wrote:
: > I need a script to find a paricular word or phrase in files of a given directory, then replace all at once by another word or phrase.
: > Its to get a word referenced by an explanation in another file (html).
: > Is there such a script (perl) or easy to make?
: > Any suggestions are wellcomed.
: How about the simple script outlined below:
[snip code that does do the "find" part, but does not do the "replace" part]
perl -p -i.bak -e 's/referenced word/explanation/g' *.html
[ s/\.bak// if you are a brave sort of person ]
I think mine is simpler ;-)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 15 Dec 97 22:47:41 EST
From: PETER@yalevm.ycc.yale.edu
Subject: ftp a file
Message-Id: <17C451408DS86.PETER@yalevm.ycc.yale.edu>
Hello. Would anyone be so kind as to post an example of "ftp"ing a file
from within Perl? Thanks.
------------------------------
Date: Tue, 16 Dec 1997 12:16:41 +1100
From: David Leach <David.Leach@dpie.gov.au>
Subject: getting the pid from a system call
Message-Id: <3495D679.E740E58E@dpie.gov.au>
Hi there,
I'm fairly new to perl - and I'm having some trouble working out how I
should go about grabbing the pid of a program I've (exec/system) called.
The program that the script is calling puts itself into the background
and continues running.
I want to keep monitoring the pid of that program to make sure it is
still running.
Any suggestions as to how I might do this?
(The program is ssh for anyone who's interested, I'm running it with -f
)
Thanks in advance for any help..
Kind Regards,
David.
------------------------------
Date: 16 Dec 1997 04:56:48 GMT
From: Zenin <zenin@best.com>
Subject: Re: getting the pid from a system call
Message-Id: <882248418.120584@thrush.omix.com>
David Leach <David.Leach@dpie.gov.au> wrote:
: I'm fairly new to perl - and I'm having some trouble working out how I
: should go about grabbing the pid of a program I've (exec/system) called.
Use a fork()/exec() pair manually. -You get the pid from fork().
See:
perldoc -f fork
perldoc -f exec
: The program that the script is calling puts itself into the background
: and continues running.
This could be *much* harder. If the program is "putting itself into
the background", it's actually doing a fork() || exit() type of
call. You'll need the pid from that second fork(), which may not be
the easiest thing to get. -Some programs will make a "pid file" you
can check, but that's about it. You can get *some* control from
creating your own process group, but most most programs (daemons)
that like to fork themselfs into the background also like to make
themselfs their own process group leader (and thus walk right out
of your process group...and control).
: I want to keep monitoring the pid of that program to make sure it is
: still running.
: Any suggestions as to how I might do this?
: (The program is ssh for anyone who's interested, I'm running it with -f)
Luckily, sshd (I'm assuming (danger!) you're talking about the ssh
daemon, right?) stores a pid file in a known location. On most
systems this is /etc/sshd.pid or /var/run/sshd.pid, but you can set
this in the config file. See man sshd.
--
-Zenin
zenin@best.com
------------------------------
Date: Mon, 15 Dec 1997 21:35:06 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/[A-Z]//d>
Subject: Re: help me
Message-Id: <67544r$qje@news.microsoft.com>
Rhodri James wrote in message <47f91202b0rhodri@wildebst.demon.co.uk>...
>> next unless $file =~ /secret$/i;
>Tsk. You surely mean
> next unless $file =~ /\.secret$/i;
That will work just as well, in fact better if you happen to have files with
names like "This_file_is_a_big_old_secret".
------------------------------
Date: Tue, 16 Dec 1997 02:51:05 +0000 (GMT)
From: Rhodri James <rhodri@wildebst.demon.co.uk>
Subject: Re: help- newbie stuck in hash (again)
Message-Id: <47f929d5dcrhodri@wildebst.demon.co.uk>
In article <3495C8C6.54B0@ibm.net>,
<ushere@ibm.net> wrote:
> hi,
> how can I access the $temp array elements
> after I'm out of the foreach loop? Have
> tried lots (except the right way I guess).
Lots of ways :-) ${$hash{$index}}[0] for one. $hash{$i}->[1] for two.
I'm sure we can think of more given enough time.
> Is it possible to create a multi-dim array
> the first field of which is hash indexed
> while the others are keyed so that any field
> might later be accessed by such as
> $field[hashindex][1] or in real terms
> $field[r2f1][25]?
You just did! Close enough for most purposes, anyway. I think I'd
recommend studying the perlref man page a bit more closely, or (for
preference) Chapter 4 of the Blue Camel which has example code for dealing
with Hashes of Lists.
--
Rhodri James *-* Wildebeeste herder to the masses
If you don't know who I work for, you can't misattribute my words to them
... Worse things happen in C
------------------------------
Date: Tue, 16 Dec 1997 02:15:23 -0500
From: Russ Brewer <russ@laker.net>
Subject: how to clear terminal screen
Message-Id: <34962A8B.68DA5099@laker.net>
I am just beginning to study perl. I want clear the screen, something a
shell script does with the "clear" command. What is the perl command to
simply clear the screen?
In several books I do not see a reference to a perl "clear" command in
the indexes. Obviously it is called something else.
Russ Brewer
Perl Newbie
------------------------------
Date: Mon, 15 Dec 1997 22:39:48 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: How to get everything in between <pre>....</pre> tags in html
Message-Id: <mbudash-1512972239490001@d124.pm3.sonic.net>
In article <hl0176.cs.ln@localhost>, tadmc@metronet.com (Tad McClellan) wrote:
>> That seems like an unrealistic expectation...
i got a million of 'em...
>> : open (FILENAME) or die("oops!"); # open the file (duh!)
>> : @lines = <FILENAME>; # get all the records at once
>> : close (FILENAME); # close the file
>> : $lines = join ('', @lines); # make one big scalar
>>
>>
>> That is an inefficient way to get an entire file into a string.
>>
>> I would stick with the conventional idiom:
>>
>> undef $/;
>> $lines = <FILENAME>; # slurp
so will i from now on...thank you (nice trick - hadn't thought of using
undef $/...)
>> : $lines = lc($lines); # make it lower case
>>
>> He did not give us license to change the data that he wants to extract.
ouch! he sure didn't, did he? ... i really had meant to do it only to the
<pre>'s and </pre>'s, but i can already see that even that idea was lame
and should've been handled by an "i" modifier on the match...
>> : $tokeep = $1 if ($lines =~/<pre>(.*)<\/pre>/); # find the pair and only
>> : save what's between 'em
>>
>> That only works if the start and end tags are on the same line.
>>
>> That seems like an unrealistic expectation...
_another_ one? this is getting damned embarrassing... of course, you're
right since "." matches anything _except_ a newline, unless the "s"
modifier is used on the match...
>> : You get to keep any newlines...
>>
>> I don't understand what you mean here as the regex above cannot match
>> any newlines...
ok, i'm hosed, i'm off to read "Pattern Matching" in the camel book (p.57-76)...
>> : If there's more than one pair of <pre>'s, it' be harder, considering the
>> : possibilites of things like:
>>
>> : <pre>Here's some pre-text
>> : and some more.</pre><hr><pre>Here's some more pre-text without starting
>> : a new line.
>> : Darn! That makes it harder...</pre>
>>
>>
>> That is no problem (if slurping the whole file is OK):
>>
>> ----------------------
>> #!/usr/bin/perl -w
>>
>> undef $/;
>> $_ = <DATA>; # slurp
>>
>> print "==>$1<==\n\n" while m#<pre>(.*?)</pre>#gsi;
>>
another nice one, that (.*?) trick. i know you didn't make 'em up, they're
right there in the camel book, but let's face it - I WROTE TOO SOON!
(sorry to shout, it's only at myself...)
"today, i've learned ... tomorrow, more, i hope, but with a less-red face..."
Thanks, Tad,
Michael
--
_____________________________
Michael Budash, Owner
Michael Budash Consulting
707-255-5371
707-258-7800 x7736
http://www.sonic.net/~mbudash
mbudash@sonic.net
_____________________________
------------------------------
Date: Tue, 16 Dec 1997 02:02:13 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: "E. Brian Depenbrock" <ebd@sunline.net>
Subject: Re: how to send entire script code to STDOUT if STDIN eq "help"
Message-Id: <34962775.43A14945@coos.dartmouth.edu>
E. Brian Depenbrock wrote:
>
> I have a perl script I wrote and used perl2exe to convert it to an
> executable. I did this because the boneheads I wrote it for are nosey and
> like to look at stuff, then they break it.
> However, I want them to be able to see the code so someone else can modify
> it later if need be.
>
> So, what I want is a way to have the script print itself to STDOUT if the
> STDIN value is equal to help or something like that. I can get it to send
> segments of text, but not the show thing.
If you have a compiled executable, then the obvious solution of having your
script read itself in won't work.
As far as I can see, the only solution is to have your script contain a copy
of itself in a string, i.e.:
#!/local/bin/perl
# My script
while (<>) {
chomp;
if ($_ eq "help") {
&print_myself;
} else {
print "You said: $_\n";
}
}
sub print_myself {
print <<EndOfMyself;
#!/local/bin/perl
# My script
while (<>) {
chomp;
if ($_ eq "help") {
&print_myself;
} else {
print "You said: $_\n";
}
}
EndOfMyself
}
Of course, if you want to include sub print_myself {...} itself
in the output, then you've got problems....
Chipmunk
------------------------------
Date: Mon, 15 Dec 97 22:49:04 EST
From: PETER@yalevm.ycc.yale.edu
Subject: Kerberos authentication
Message-Id: <17C45140E0S86.PETER@yalevm.ycc.yale.edu>
Hello. Can anyone post an example of doing Kerberos authentication from
within a Perl script? Thanks in advance.
------------------------------
Date: 15 Dec 1997 22:33:37 -0500
From: bmk@agnostic.ebb.org (Bradley M. Kuhn)
Subject: Looking to work with Perl for Master's Thesis
Message-Id: <674sqh$jm0$1@agnostic.ebb.org>
I am currently looking for Master's Thesis topic in a computer science
graduate program. I have a strong dedication to free (and in particular,
GPL'ed) software, and I also like to find ways to "bridge the gap" between
computer science theory and implementation. Plus, I love Perl.
Consequently, I hope to find a Master's Thesis topic that will result in the
implementation of something useful for the free software community. I enjoy
Perl, so I was thinking I might be able to do something with Perl.
However, I don't know what to do. I need to find something that is
theoretical and research-y enough to pass off on my advisor (who loves Scheme
and Java, BTW, which means Scheme-Java-Perl cross-over stuff might be good),
but still make it implementable in my short 1.25 years of work on my thesis.
Any suggestions would be greatly appreciated.
--
* Bradley M. Kuhn *
* The address in the From: line above will send an autoreply with my *
* real email address. Or, check out my WWW site at: *
* http-colon-slash-slash-www-dot-ebb-dot-org-slash-bkuhn *
------------------------------
Date: Mon, 15 Dec 1997 20:36:57 -0800
From: "Aaron Harsh" <ajh@rtk.com>
Subject: Re: NEED: Fast, Fast string trim()
Message-Id: <6750gi$l4r$1@brokaw.wa.com>
Matthew Cravit wrote in message <673se4$307$1@shell3.ba.best.com>...
>In article <34956B42.E8B2DD13@mystech.com>,
>Mark S. Reibert <reibert@mystech.com> wrote:
>>Mike Stok wrote:
>
>>> $string =~ s/^\s+//;
>>> $string =~ s/\s+$//;
>>
>>I usually shorten this to
>>
>>$string =~ s/^\s*(.*?)\s*$/$1/;
> ...
> Benchmark: timing 1000 iterations of OneExp, TwoExp...
> OneExp: 4 secs ( 3.76 usr 0.00 sys = 3.76 cpu)
> TwoExp: 1 secs ( 0.99 usr 0.00 sys = 0.99 cpu)
>
>So, your version executes almost 4 times slower than the other.
Someone else pointed out the one-liner is slowed down by the nongreedy
quantifier. Here's a one-liner that's 4 times faster on Matthew's test (but
slower on smaller strings), and keeps the backreference:
$string =~ s/^\s*(|.*\S)?\s*$/$1/;
This looks even more cryptic than the original one-liner, so Mark should be
happy :-)
Aaron Harsh
ajh@rtk.com
------------------------------
Date: Tue, 16 Dec 1997 01:52:57 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Carl Lucio Marino <cl_marino@cls.e-mail.com>
Subject: Re: newbie = ? on executing OS/2 commands via system(), ++regexp
Message-Id: <34962549.67258073@coos.dartmouth.edu>
Carl Lucio Marino wrote:
>
> Hello all,
>
> I'm relatively new to Perl and I've run into to some problems, er uh,
> opportunities. I want to execute some OS/2 commands stored in a file,
> form my perl program. No problem, I'll use system().
>
> For example, I want to read a file with a command like:
> xcopy \admin\stuff\*.dat %home%\data
>
> problem: the environment variable %home% isn't expanded, but taken
> literally!
>
> Unless someone has a better idea, I'll have to expand the environment
> variable myself, but I not sure how to do it.
> What I'm looking for is a regexp that takes whatever is between a pair
> of %'s, say $x, evaluate that with $ENV{$x}, and then update itself.
First, I want to mention a few improvements that could be made to your
existing code.
> right now I'm splitting on % - which assumes I'll have at most one
> environment variable (which isn't a good assumption), and move the
> string into
> another array
> (please excuse my inefficiency)
>
> @args = split/\s+/;
> @cmd = @args;
You rebuild @cmd from scratch below, so there's no need to set it here.
> $i = 0;
> for (@args)
> {
> # only concerned with strings containing percent signs?
> $count = tr/%/%/;
> if($count > 0)
> {
You don't care how many %'s there are, just whether there are any, so
replace those lines with:
if (/%/) {
> ($a, $b, $c) = (split /%/)[0, 1, 2];
This has the same effect as:
($a, $b, $c) = split /%/;
Either way, as you said, this assumes you have only one environment
variable. Although not because you are using split, but because of
the way you are using split. But there's an easier way, so I won't
worry about split.
> $cmd[$i++] = $a . $ENV{$b} . $c; # $b better
> be all caps, or fails
If it has to be all caps, make it all caps:
$cmd[$i++] = $a. $ENV{uc($b)} . $c;
Or don't, but verify that it is all caps:
$cmd[$i++] = $a;
$cmd[$i++] .= ($b eq uc($b) ? $ENV{$b} : "%$b%");
$cmd[$i++] .= $c;
> }
> else
> {
> # no percent signs, keep original string
> $cmd[$i++] = $_;
Alternatively, iterate over @cmd to begin with, and replace this line with:
$i++;
But since you go to all the trouble of manipulating an index variable, you
might as well make it a C-style for loop above:
for ($i=0; $i<=$#cmd; $i++) {
if ($cmd[$i] =~ /%/) {
....
> }
> }
>
> # execute command
> $rc = 0xffff & system(@cmd);
All that said, here is my suggestion for solving your problem:
s/%([^%]*)%/$ENV{$1}/ge;
And in commented form:
s/
% # opening %
([^%]*) # multiple non-% characters
% # closing %
/
$ENV{$1} # replace with value of environment variable
/xge;
Again, you can add in code to handle the need for all uppercase characters.
This code assumes that %'s appear *only* to mark names of environment variables.
(But your code does that too, so I assume it's okay. :-)
One check you could do is to make sure there is an even number of %'s in the string.
Chipmunk
------------------------------
Date: Mon, 15 Dec 1997 14:25:10 -0800
From: Pete Hurd <phurd@teleport.com>
Subject: newbie file input question
Message-Id: <3495AE44.7B82866A@teleport.com>
Hello World,
I'm having a frustrating time getting started with perl, I've got the
llama and the FAQs, but...
I cannot seem to read in a file, composed of lines (records) of
space-separated words (fields),
I want to access these words as items in a list, one list per line,
something like awk's
$1 through $NF.
Now I've been trying things like:
open(INFILE,"./foo.bar") || die "blah blah $!";
while (@line = qw(<INFILE>)) {
$first=$line[0];
...
and
open(INFILE,"./foo.bar") || die "blah blah $!";
while ($linein = <INFILE>) {
@line=qw($linein);
$first=$line[0];
...
to no avail.
Surely this must be a very frequent operation, but I cannot find it in
the FAQs, or the llama book.
Please help, TIA.
--
Peter L. Hurd,
phurd@BOGUSteleport.com <- remove BOGUS to reply
http://toaster2.zool.su.se/pete.html
------------------------------
Date: Tue, 16 Dec 1997 02:47:03 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: newbie file input question
Message-Id: <comdog-ya02408000R1612970247030001@news.panix.com>
In article <3495AE44.7B82866A@teleport.com>, Pete Hurd <phurd@teleport.com> wrote:
>I cannot seem to read in a file, composed of lines (records) of
>space-separated words (fields),
>I want to access these words as items in a list, one list per line,
>something like awk's
>$1 through $NF.
>while (@line = qw(<INFILE>)) {
[snip]
> @line=qw($linein);
qw() isn't used in either of those ways. compare the results of your
method with some alternatives:
#!/usr/bin/perl -w
$line = q<just another new york perl hacker>;
#your method
print "Your Method\n";
@words = qw($line);
foreach( 0 .. $#words )
{
print "$_: $words[$_]\n"
}
#an alternative based on your method
print "\nEval Method\n";
eval("\@words = qw($line)");
foreach( 0 .. $#words )
{
print "$_: $words[$_]\n"
}
#a totally different approach
print "\nSomething Completely Different\n";
@words = split /\s+/, $line;
foreach( 0 .. $#words )
{
print "$_: $words[$_]\n"
}
__END__
Your Method
0: $line
Eval Method
0: just
1: another
2: new
3: york
4: perl
5: hacker
Something Completely Different
0: just
1: another
2: new
3: york
4: perl
5: hacker
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: Mon, 15 Dec 1997 22:31:44 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Pass variables to Unix command?
Message-Id: <g70576.1j4.ln@localhost>
[ comp.lang.perl is not a newsgroup. I have removed it from all
headers
]
[ I also removed comp.lang.perl.modules because there is no use
of modules here (though there REALLY should be use of one
particular module for doing CGI stuff...
]
Paul Heindselman (webmaster@realvision-inc.com) wrote:
: Heres a script I have so far:
: ---------------------------------------------------
: #!/usr/bin/perl -w
: print "Content-type:text/html\n\n";
[ snip reinvention of wheel code ]
: $logintext = $FORM{'loginText'};
: $testvar = `egrep $logintext callsign.txt`;
: print "This should be Helmet $testvar\n";
: ----------------------------------------------------------------------------------------------
: What I'm trying to do here is search a text file for a name that comes
: from a web page form.
If it is a constant string (sure does sound like it is), why use
egrep over fgrep?
: It will search the file fine when I specify a name instead of
: $logintext, but it wont pass the value of the $logintext variable to
: the command line. Is there some special syntax to pass the variable?
No, that syntax looks fine to me.
The problem is somewhere else.
What does
print "'$logintext'\n";
show?
Might $logintext contain characters that have a meta-meaning to egrep?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Dec 1997 05:45:30 +0000
From: Karl Anderson <kra@pobox.com>
Subject: perldb: Undefined subroutine &Carp::longmess
Message-Id: <m367opsux1.fsf@pobox.com>
I am having problems using the perl debugger. I get the error:
Undefined subroutine &Carp::longmess called at /usr/lib/perl5/perl5db.pl line 1361.
The error occurs in code from libwww-perl-0.40 (yes, I know it's
ancient), specifically, stepping into 'require "wwwhttp.pl"', line 38,
will do it. Running perldb on wwwhttp.pl doesn't generate an error.
My /usr/lib/perl5/perl5db.pl is requiring carp, & carp is supplying
longmess, so I don't see the problem. Both files came from the
perl-5.003-8 rpm (red hat package), & both verify fine with rpm -V.
--
Karl Anderson kra@pobox.com <URL:http://www.pobox.com/~kra/>
------------------------------
Date: Mon, 15 Dec 1997 04:23:10 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: pgp encrypion via perl script
Message-Id: <mbudash-1512970423110001@d56.pm.sonic.net>
In article <m3wwh7uiax.fsf@windlord.Stanford.EDU>, Russ Allbery
<rra@stanford.edu> wrote:
>> Correct me if I'm wrong, but it seems like he uses echo to pass the
>> encrypted data into PGP and then reads the unencrypted data off a pipe
>> from PGP. Under that system, there's no way for the unencrypted data to
>> show up in the output of ps.
Er ... in my example, I use echo to pass the _unencrypted_ data _to_ pgp
via a pipe, then simply capture the _encrypted_ data from pgp's stdout via
perl's backtick facility.
>> ps cannot see the contents of pipes.
Based on what I just said, in your opinion, am I still OK? Looks like it
to me...
>> That being said, the right way to do this is IPC::Open3, and it really
>> isn't that hard. The only real trick is that you have to be careful about
>> blocking.
I'm still not clear why Open3 is the "right" way, and not just "another"
way, unless there are real and immediate security concerns, which there do
not appear to be, or noticable performance hits to the machine, which no
one has mentioned at all. So why?
>> (I should note, however, that after having gone through all of this while
>> writing my PGP::Sign module, I ended up going back to using a temporary
>> file. Not because of any of the issues surrounding IPC, but rather
>> because PGP 2.6.2 has one of the worst handlings of piped data that I've
>> ever seen. It doesn't appear to be capable of generating detached
>> signatures correctly when used as a filter, and it does all sorts of
>> strange munging to your data if you try to work around it.)
FYI to all, I'm using PGP 5.0 for Irix Unix, not 2.6.2. PGP 5.0 is much,
much better. Also, in the arena I used the example, my singular concern
was the encryption of data prior to emailing it. Signatures were not
necessary, nor were any of pgp's other functions.
BTW, Thanks to all contributors to this thread thus far!
Michael
--
_____________________________
Michael Budash, Owner
Michael Budash Consulting
707-255-5371
707-258-7800 x7736
http://www.sonic.net/~mbudash
mbudash@sonic.net
_____________________________
------------------------------
Date: 16 Dec 1997 03:24:44 GMT
From: "Blake D. Mills IV" <blakem@seas.upenn.edu>
Subject: Re: post your dynamic IP address to a web page-cant be done, right?
Message-Id: <674s9s$d8l$1@netnews.upenn.edu>
Dana Ludwig <dana@medical-info.com> wrote:
: I'm trying to use my permanent (static IP) web site as a sort-of
: personal ICQ server, to let other web browser users find out whether I'm
: on-line and what my current dynamic IP address is.
: Does anyone know whether/how this might be done?
Though this solution has nothing to do with perl, you might look at the
dynamic DNS project at:
http://www.ml.org/ml/support/faq-4.html
Basically, it allows you to create a hostname such as:
dana_ludwig.dyn.ml.org
You can then dynamically change the IP address that dana_ludwig.dyn.ml.org
points to. Thus:
% finger dana@dana_ludwig.dyn.ml.org
will tell people if you are logged in or not.
-Blake
------------------------------
Date: Tue, 16 Dec 1997 14:29:51 +1000
From: Kerry Jones <kjones@aims.gov.au>
Subject: Problem with Wais 2.304
Message-Id: <349603BE.81FCC300@aims.gov.au>
Hi,
I have perl 5.004.01 installed and am trying to add the Wais 2.304
module but keep getting the following error message.. .Does anyone know
how I can fix this?
root on sea [/sysman/work/Wais-2.304] > make install
Installing
/usr/local/lib/perl5/site_perl/sun4-solaris/./auto/Wais/Wais.so
Skipping /usr/local/lib/perl5/site_perl/sun4-solaris/./auto/Wais/Wais.bs
(unchanged)
Skipping /usr/local/lib/perl5/site_perl/./Wais/Dict.pm (unchanged)
Skipping /usr/local/lib/perl5/site_perl/./Wais.pod (unchanged)
Skipping /usr/local/lib/perl5/site_perl/./Wais.pm (unchanged)
Skipping /usr/local/man/man1/./inspect.1 (unchanged)
Skipping /usr/local/lib/perl5/man/man3/./Wais.3 (unchanged)
Skipping /usr/local/bin/./inspect (unchanged)
Writing /usr/local/lib/perl5/site_perl/sun4-solaris/auto/Wais/.packlist
Appending installation info to
/usr/local/lib/perl5/sun4-solaris/5.00401/perllocal.pod
Can't load
'/usr/local/lib/perl5/site_perl/sun4-solaris/auto/Wais/Wais.so' for
module Wais: ld.so.1: /usr/local/bin/perl: fatal: relocation error:
symbol not found: scandir: referenced in
/usr/local/lib/perl5/site_perl/sun4-solaris/auto/Wais/Wais.so at
/usr/local/lib/perl5/sun4-solaris/5.00401/DynaLoader.pm line 155.
at -e line 1
BEGIN failed--compilation aborted at -e line 1.
*** Error code 2
make: Fatal error: Command failed for target `register'
root on sea [/sysman/work/Wais-2.304] >
------------------------------
Date: 16 Dec 1997 03:22:44 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Q on fcntl
Message-Id: <674s64$76g$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, ronald@cs.ust.hk (Chan Pui Nang) writes:
: I have tried the following in Solaris, but not work.
: open(THELOCK, "temp.lock");
: fcntl(THELOCK, F_SETFL, O_RDWR);
: $temp=fcntl(THELOCK, F_GETFL, $temp2);
Did you
use strict;
use Fcntl;
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
Emacs is a fine programming language, but I still prefer perl. -me
------------------------------
Date: Mon, 15 Dec 1997 22:01:06 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: Rewinding a file back to the first line
Message-Id: <mbudash-1512972201060001@d207.pm6.sonic.net>
In article <6713ck$fr1@camel18.mindspring.com>, "Eric Phillips"
<e.phillips@mindspring.com> wrote:
>> Hello, I have a script that will check a login and a password. The problem
>> is, when I try to log in via a form, the script only accepts the login and
>> password on the last line of the file?
>>
>> How do I take the "$_", or the current line that the script is reading, back
>> to the very first line and character of the file?
>>
...code, please... can't debug what we can't see...
"rewinding", btw, is done via seek(). see the camel book for particulars...
michael
--
_____________________________
Michael Budash, Owner
Michael Budash Consulting
707-255-5371
707-258-7800 x7736
http://www.sonic.net/~mbudash
mbudash@sonic.net
_____________________________
------------------------------
Date: Mon, 15 Dec 1997 22:22:56 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Which language pays most 17457 -- C++ vs. Java?
Message-Id: <0nv476.vh4.ln@localhost>
[ followups trimmed to the group that my comment applies to ]
Peter Seebach (seebs@plethora.net) wrote:
: In article <3491E8B7.3E2@hal-pc.org>,
: Michael D. Kersey <mdkersey@hal-pc.org> wrote:
: >Well then, it's too late: you should have asked us when you _entered_
: >college! But, even at this late date, my recommendation would be the
: >same: you should learn Chinese, probably the Mandarin dialect.
: While he's probably joking, let me be the first to point out that knowing
: *any* second or third natural language will help you program effectively.
Yeah.
I think I have heard of some guy with linguistic experience creating
some programming language or other (note followups).
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
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 1480
**************************************