[10462] in Perl-Users-Digest
Perl-Users Digest, Issue: 4054 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 23 13:04:14 1998
Date: Fri, 23 Oct 98 10:00:20 -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 Fri, 23 Oct 1998 Volume: 8 Number: 4054
Today's topics:
Re: *Why* does clpm attract non-perl posts? (Nathan V. Patwardhan)
Re: += operator produces error, = operator doesn't? <uri@fastengines.com>
Re: End of File..... <jdf@pobox.com>
Great Script--won't work <bschroe1@nycap.rr.com>
Re: Great Script--won't work <jdf@pobox.com>
Re: How to modify argv? (Russell)
How to tell if a file is already open without flock()? <jkternes@domain-tech.com>
Re: How to yield processor time? (Andrew M. Langmead)
Re: How to yield processor time? (Joergen W. Lang)
Re: How to yield processor time? <rootbeer@teleport.com>
Re: Interpolated, squared? <jdf@pobox.com>
Re: Interpolated, squared? (Tad McClellan)
Re: Interpolated, squared? (Greg Bacon)
Re: Locking files under windows 98 <rootbeer@teleport.com>
Re: looking for a perl interpreter for NT (David Annis)
Re: Marrying S-Lang and Perl -- boon or blasphemy? (James Palmer)
Need some guidance w/script baillie@my-dejanews.com
Opening a newly created file. (STEPHEN REINGOLD)
Re: Perl & Y2K - booby trap code (Richard S. Holmes)
Re: Perl, dynamic loading, SCO OS 5 <knutens@masi.com>
PerlCtrl <ts@cape.com>
Re: Problem with perl scripts... droby@copyright.com
re-installing perl to like aix machine once built tbhanson@startribune.com
Re: re-installing perl to like aix machine once built (Clinton Pierce)
Sockets <minich@globalnet.co.uk>
strip sendmail headers <shjmoore@sprynet.com>
Re: strip sendmail headers (Greg Bacon)
Re: Wanted: programming (humor?) <Russell_Schulz@locutus.ofB.ORG>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 23 Oct 1998 14:36:44 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: *Why* does clpm attract non-perl posts?
Message-Id: <0w0Y1.40$dP4.7076@news.shore.net>
David Alan Black (dblack@pilot.njin.net) wrote:
: Is there something going on I don't know about? Is everyone but me
: receiving, say, one dollar for every post to clpm? Raffle tickets?
: Reduced time in purgatory?
Heh.
: really about Perl, but anyway..." or words to that effect. It may well
: be kind-hearted and good to field these questions - but I wonder whether
: perhaps such fielding could be confined to email. Otherwise, once past
Sadly it can't be confined to email since barely anyone is using a
correct address anymore. *ducking*
Seriously, although I agree with your posting, I've got to add that
most "clpmisc experts" started expressing these sentiments on clpmisc
in 1995 (or so) when "webbing" really took off. I can't stand tell
you about the number of "familiar names" I see on code and doc on CPAN
-- who no longer show their faces in clpmisc. And I do recall a time
when people here answered questions (in a friendly) manner about hit
counters and HTTP_USER_AGENTS and "redirection" but I just think that
they ran out of steam and gave up.
That's evidence of the epidemic.
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: 23 Oct 1998 12:59:48 -0400
From: Uri Guttman <uri@fastengines.com>
Subject: Re: += operator produces error, = operator doesn't?
Message-Id: <sarlnm7kyd7.fsf@camel.fastserv.com>
>>>>> "RJK" == Ronald J Kimball <rjk@coos.dartmouth.edu> writes:
RJK> Uri Guttman <uri@fastengines.com> wrote:
>> other posts show it with list operators too. and i saw it with
>>
>> print( $n += 4 );
>>
>> where $n cannot be mistaken for an indirect file handle.
RJK> Umm... Why can't it?
RJK> print (STDOUT "hello world\n");
RJK> certainly works. And so does
RJK> $fh = 'STDOUT'; print ($fh "hello world\n");
true but it fails for other operators than print so i suspect it is
deeper than just indirect handles.
here is another one which fails:
perl -e 'join( $n ++, 4)'
i think it is a bigger parser bug than anyone realizes or it is a simple
check for whitespace fix.
uri
--
Uri Guttman Fast Engines -- The Leader in Fast CGI Technology
uri@fastengines.com http://www.fastengines.com
------------------------------
Date: 23 Oct 1998 16:14:59 +0200
From: Jonathan Feinberg <jdf@pobox.com>
To: "PERL ROCKS!" <emills@harris.com>
Subject: Re: End of File.....
Message-Id: <m3emrz8ivw.fsf@joshua.panix.com>
"PERL ROCKS!" <emills@harris.com> writes:
> of course you can use it in other contexts as well, such as
>
> if (!<F>) {}
>
> unless (<F>) {}
Sure, you can use the diamond operator that way, but why would you
want to throw away a file chunk? I think eof() might be better.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Fri, 23 Oct 1998 10:26:12 +0000
From: "William Schroeder" <bschroe1@nycap.rr.com>
Subject: Great Script--won't work
Message-Id: <2k0Y1.1003$H9.168482@proxye1.nycap.rr.com>
I downloaded a small "Unix" program that is a "Internet Phone Book". I can't
get the program to work (spent many hours tweeking and fooling with it).
I E-mailed the originator of the program but he hasn't replied.
The program was obtained from a CGI Collection on the web at:
http://www.itm.com/cgicollection/index.cgi?/page=1&=11&e=20
The program is called "Internet Phone Book"
Try the "demo" out see what you think. It's at:
http://www.selah.net/pbook.html
It's a great little program--not just for E-mail addys, you can be creative
with this puppy!!!
So, I have two pages I made with the code that won't work if you want to
view the source code, please E-mail me.
If you can't help "What would you do?"
iMac Zone : Website : http://willy1235.cjb.net
For faster, simple ways to make the iMac
Work with you:Shortcuts, search help, tips, books.
------------------------------
Date: 23 Oct 1998 17:07:09 +0200
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: Great Script--won't work
Message-Id: <m3btn38ggy.fsf@joshua.panix.com>
"William Schroeder" <bschroe1@nycap.rr.com> writes:
> I downloaded a small "Unix" program that is a "Internet Phone Book". I can't
> get the program to work (spent many hours tweeking and fooling with it).
> I E-mailed the originator of the program but he hasn't replied.
> If you can't help "What would you do?"
I would "hire a programmer".
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
You "break" it, you "buy" it.
------------------------------
Date: 23 Oct 1998 15:15:41 GMT
From: c9415019@alinga.I.newcastle.HATE.edu.UCE.au (Russell)
Subject: Re: How to modify argv?
Message-Id: <slrn7317e8.5kb.c9415019@bezout.newcastle.edu.au>
On Fri, 23 Oct 1998 10:34:18 +0100, Wolfgang Lux <lux@coo.mts.dec.com> wrote:
+ I have the following question:
+ In a C program, I can modify the arguments in a way that ps prints the
+ modified
+ arguments (e.g. argv[1][2] = 'a').
+
+ In Perl, modifications to @ARGV have no effect to ps. @ARGV seems to be
+ a copy
+ of argv.
+
+ Can anybody tell me, how to modify argv from Perl?
Sounds like you're after the information found in perlfaq8 under
subsection,
'Is there a way to hide perl's command line from programs such as ""ps""?'
In future, you may want to check the perlfaq before posting here.
HTH,
r.
------------------------------
Date: Fri, 23 Oct 1998 10:45:43 -0400
From: Kevin Ternes <jkternes@domain-tech.com>
Subject: How to tell if a file is already open without flock()?
Message-Id: <36309697.F0AA8757@domain-tech.com>
Here's my environment:
I've a Perl script that periodically scans a spooling area for
new text files. If it finds any files, it moves them out of the
spool to an archive and then does further processing on them.
The files may be delivered to the spooling area by a number of
methods. The delivering scripts we have written all open the
files with an flock. And my scanning script will only attempt
to move a spooled file if it can get an exclusive lock on it.
The problem is that certain other delivery methods, like FTPD
and RCPD, that feed the spool do not seem to put put locks on
files they are writing.
Does anyone know a means for determining if another process has
a file open without making a system() call?
One idea we had was to have the FTP users deposit files by doing
something like:
ftp> put filename _filename
ftp> rename _filename filename
and have the scan script ignore files named with leading "_". But
that's the hardest thing to implement of all: user training!
Thanks.
-kt
--
Kevin Ternes mailto:jkternes@domain-tech.com
------------------------------
Date: Fri, 23 Oct 1998 14:33:29 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: How to yield processor time?
Message-Id: <F1AB3t.Cqz@world.std.com>
Bernie <bfb@att.net> writes:
>Is there a way in perl to limit the amout of CPU usage
>a script uses? I'm aware I can use nice, but was wondering
>if perl itself was capable of this.
There is POSIX::nice() in the standard perl distribution (I assume
that you count the standard perl modules as "perl itself").
BSD::Resouce on CPAN. BSD::Resouce gives you access to getrlimit() and
setrlimit() for a more draconian limitation on CPU usage.
--
Andrew Langmead
------------------------------
Date: Fri, 23 Oct 1998 17:09:37 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: How to yield processor time?
Message-Id: <1dhd2ww.1n2zrvjtv44ceN@host026-210.seicom.net>
Walter Tice USG <tice@hunch.zk3.dec.com> wrote:
> In article <362FFB22.43E22C84@att.net> Bernie <bfb@att.net> writes:
> >Is there a way in perl to limit the amout of CPU usage
> >a script uses? I'm aware I can use nice, but was wondering
> >if perl itself was capable of this.
>
> >-Thanks
>
> I don't recall ever reading that there is. Personally I'm always
> trying to maximize the amount of server CPU I use! Although on
> my own mangy box, nice -20 really does bog things down.
>
> W
>From perfaq8
=head2 How do I set CPU limits?
Use the BSD::Resource module from CPAN.
hth, HANW,
Joergen
--
To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
"Everything is possible - even sometimes the impossible"
HOELDERLIN EXPRESS - "Touch the void"
------------------------------
Date: Fri, 23 Oct 1998 15:13:56 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to yield processor time?
Message-Id: <Pine.GSO.4.02A.9810230813220.5534-100000@user2.teleport.com>
On 23 Oct 1998, Bernie wrote:
> Is there a way in perl to limit the amout of CPU usage
> a script uses?
See whether the BSD::Resource module works with your system. If it
doesn't, send a patch to its author. :-) Good luck!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 23 Oct 1998 16:10:22 +0200
From: Jonathan Feinberg <jdf@pobox.com>
To: "Bill Steer" <bsteer@gwi.net>
Subject: Re: Interpolated, squared?
Message-Id: <m3hfwv8j3l.fsf@joshua.panix.com>
"Bill Steer" <bsteer@gwi.net> writes:
> How can I perform interpolation on variables in a nested fashion?
It seems like you're asking for the /e regex modifier. Check out
perlop, where you will read in detail about /e. Here's a highlight:
A /e will cause the replacement portion to be
interpreted as a full-fledged Perl expression and
eval()ed right then and there.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: Fri, 23 Oct 1998 08:30:16 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Interpolated, squared?
Message-Id: <8d0q07.dos.ln@flash.net>
Bill Steer (bsteer@gwi.net) wrote:
: I've just started reading this newsgroup,
: so apologize if this is a repeat question...
http://www.dejanews.com is an archive of Usenet posts.
Very handy for finding out if your question has been answered
before you ask it ;-)
: How can I perform interpolation on variables in a nested fashion? That is,
: suppose I have a variable, say $var, that contains a string that contains
: yet other variables (in my case, $1 and $2 after a match operation). So
: my $var variable may look like "$1something$2". And now I want to use
: $var in a substitute operation, like s/<something>/$var/, and want the
: $1 and $2 variables to be used.
: I've read the FAQs and can't find this, nor can I find it in my books.
I answered this question just a couple of days ago.
Try out Dejanews to find:
Subject: Re: Help: string variable $patTar in s/$patSrc/$patTar
Author: Tad McClellan
Date: 1998/10/20
Forums: comp.lang.perl.misc
Message-ID: <53nj07.uta.ln@flash.net>
References: <70jf5a$45h$1@nnrp1.dejanews.com>
You can get it done with s///ee;
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 23 Oct 1998 14:07:19 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: Interpolated, squared?
Message-Id: <70q2in$66v$1@info.uah.edu>
In article <01bdfe1f$0c71fc80$0e00a8c0@zaphod>,
"Bill Steer" <bsteer@gwi.net> writes:
: How can I perform interpolation on variables in a nested fashion? That is,
: suppose I have a variable, say $var, that contains a string that contains
: yet other variables (in my case, $1 and $2 after a match operation). So
: my $var variable may look like "$1something$2". And now I want to use
: $var in a substitute operation, like s/<something>/$var/, and want the
: $1 and $2 variables to be used.
This is a FAQ. Section 4, "How can I expand variables in text strings?"
Greg
--
Cartman: Moooooom! Kitty's being a dildo!
Mom: Well, I know a certain kitty-kitty who's sleeping with Mommy tonight!
------------------------------
Date: Fri, 23 Oct 1998 15:10:05 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Locking files under windows 98
Message-Id: <Pine.GSO.4.02A.9810230808510.5534-100000@user2.teleport.com>
On Thu, 22 Oct 1998, E Unpingco wrote:
> Has anyone figured out how to lock files under windows 98?
If it can be done at all, it should be done transparently by Perl's
built-in flock function.
If it can't be done, you should install Linux. :-)
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 23 Oct 1998 15:43:39 GMT
From: dave.annis@kohlerco.com (David Annis)
Subject: Re: looking for a perl interpreter for NT
Message-Id: <36309ca0.174260683@news1.norlight.net>
On Fri, 23 Oct 1998 11:02:50 +0100, "Chris Lee"
<lammie_pie@hotmail.com> wrote:
>I need I perl interpreter for NT
>does anyone one know where I can down load this??
>
>chris
>
Go to www.microsoft.com and find the recently released beta 2 of NT
Support For Unix (SFU). It includes Perl (and a few other goodies).
It's still a little buggy (the native NFS client and/or server messes
up the NT desktop), but the shell stuff seems workable.
***************************************************************
** Dave Annis * With age comes wisdom, **
** Kohler Co. * if you stay awake along the way. **
***************************************************************
------------------------------
Date: 23 Oct 1998 16:14:40 GMT
From: james@tiger-marmalade.com (James Palmer)
Subject: Re: Marrying S-Lang and Perl -- boon or blasphemy?
Message-Id: <slrn730pf3.442.james@ns.tiger-marmalade.com>
In article <slrn72voqg.9be.davis@aluche.mit.edu>, John E. Davis wrote:
>a perl program? For example, the latest slang snapshot
>(ftp://space.mit.edu/slang/snapshots) contains a module directory that
>implements an SLsmg module suitable for dynamically linking into a
>slang interpreter. Of course, you would want to create perl bindings.
Cool. So slang 1.3 will definitely support modules then? (A rhetorical
question, since I just downloaded it :-)
There is a perl-style regular expression library called PCRE that is
written by Philip Hazel (it has a freshmeat entry). It seems like
this might be a great library to bind into a slang module, if anyone
was interested in using perl style regular expressions in slang.
Ah, but then the possibility for module extensions are endless..
James
------------------------------
Date: Fri, 23 Oct 1998 15:41:05 GMT
From: baillie@my-dejanews.com
Subject: Need some guidance w/script
Message-Id: <70q82h$iep$1@nnrp1.dejanews.com>
Could someone tell me if this script looks ok, and some of the things I could
do to make it better/more effecient. I'm pretty new to this and I really
want to establish good programming habits from the start. I am aware of "use
strict;", but I have a lot of problems when I use it (I don't know how
basically), I have read the faq's on it, but ... I don't know, maybe I'm just
dense. Here's the script:
#!/usr/local/bin/perl -w
#################################################################
# #
# Name: pChange_control #
# Date Created: 10/18/98 09:00 #
# Purpose: A somewhat silly program to get #
# the user name and comments about #
# a change that's been made, and #
# write that info to a file. #
# Usage: pChange_control #
# #
#################################################################
use Fcntl qw(:flock);
use diagnostics;
$logfile = "/tmp/blah";
print <<End_Of_Menu;
\nPlease choose a menu item:\n
\t\t1) Add a record
\t\t2) View a record
\t\t3) Edit a record
\t\t4) Quit\n
End_Of_Menu
print "Choice: ";
chomp($choice = <STDIN>);
if($choice == 1) {
&add_entry;
} elsif($choice == 2) {
&view_entry;
} elsif($choice == 3) {
&edit_entry;
} elsif($choice == 4) {
exit;
} else {
print "\nNot a valid choice, exiting\n";
}
sub add_entry {
print "\nPlease enter your login name: ";
chomp($name = <STDIN>);
print "\nPlease enter some info about the change\n";
print "End input by typing <RETURN> & ^D: ";
while(defined($_ = <STDIN>)) {
push(@comment_array, $_);
}
open(LOG, ">>$logfile") or die "Couldn't open file: $!";
flock(LOG, LOCK_EX);
seek(LOG, 0, 2);
print LOG ('-' x 80), "\n";
print LOG "$name ", scalar localtime, "\n";
print LOG ('-' x 80), "\n";
print LOG @comment_array, "\n";
flock(LOG, LOCK_UN);
close(LOG) or die "Can't close the file: $!";
}
sub view_entry {
print "\nEnter keyword to search (i.e. name, date, etc)\n";
print "or type ALL to see the entire file\n\n";
print "KEYWORD: ";
chomp($keyword = <STDIN>);
if($keyword eq 'ALL') {
system "more $logfile";
} else {
open(LOG, $logfile) or die "Couldn't open file: $!";
while(<LOG>) {
$/ = '';
print if /\Q$keyword/s;
}
close(LOG) or die "Couldn't close file: $!";
}
}
sub edit_entry {
open(LOG, ">>$logfile") or die "Couldn't open file: $!";
flock(LOG, LOCK_EX);
system "vi $logfile";
flock(LOG, LOCK_UN);
close(LOG) or die "Couldn't close file: $!";
}
This last part (system "vi...") is definitely not staying, it's just there
temporarily. I would like to get rid of the system "more $logfie" also at
some point. Thanks for the help.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 23 Oct 1998 18:40:34 GMT
From: sreingol@interlog.com (STEPHEN REINGOLD)
Subject: Opening a newly created file.
Message-Id: <70q84t$d3c$1@news.interlog.com>
I can have my Perl CgI create and write to a new file, but can't read
it unless I chmod the new file through telnet. Can I have my Perl CGI
create AND allow me to read the file?
Thanks much.
Stephen (sreingol@interlog.com)
------------------------------
Date: 23 Oct 1998 11:21:40 -0400
From: rsholmes@rodan.syr.edu (Richard S. Holmes)
Subject: Re: Perl & Y2K - booby trap code
Message-Id: <xzcemrznw1n.fsf@rodan.syr.edu>
In article <ubtn3wype.fsf@jimbosntserver.soundimages.co.uk> Jim Brewer <jimbo@soundimages.co.uk> writes:
>Whatever happened to the 'RTFM, HTH.' posters? Suddenly its okay for
>Perl programmers not to read the bloody thing. TFM, that is.
I *did* RTFM. The pink one -- the blue one didn't exist at the time.
It left the question of what is returned by localtime after 31 Dec
1999 undefined, except that it made reference to the C documentation
and then said not to bother worrying about it.
TFM was part of the problem, not the solution.
Sheesh, it's amazing how much hoohaw over nothing we have here. I'd
venture to guess about 90% agreement on the following:
- The blue Camel book documents the behavior of localtime well
- The pink Camel book did not document the behavior of localtime well
- The original tm structure was poorly designed
- It's too late to change localtime
About the only thing one can really argue over here is who to blame
when your scripts fail. Faulty documentation or no, the reality is
that, if your scripts had to behave after 12 Dec 1999, then it was
your responsibility to find out how localtime works --
>perl -e 'print ((localtime(time+10*365*24*60*60))[5])'
108>
would have been a good start, if the documentation was for whatever
reason unavailable or unuseful.
--
- Rich Holmes
Syracuse, NY / We have more important things to do...
Newport News, VA Censure and move on! Sign the petition at
rsholmes@mailbox.syr.edu <http://www.moveon.org>
------------------------------
Date: Fri, 23 Oct 1998 09:11:22 -0700
From: "Knute Snortum" <knutens@masi.com>
Subject: Re: Perl, dynamic loading, SCO OS 5
Message-Id: <70q9mh$lo$1@supernews.com>
This is interesting. It seems that even the Skunkware version of Perl has
problems at /lib/odbm. When I do a 'make test' I get a core dump at this
test (see thread Perl 5.005_02, make test fails at /lib/odbm). Does this
function work on OS5?
--- Knute Snortum
knutens@masi.com (remove the "ns" from the address when replying by e-mail)
"The three principle virtues of a programmer are: laziness, impatience, and
hubris."
Mike Hopkirk(hops) wrote in message ...
>In article <70fb87$6g2$1@sunhub-tulsa.onenet.net> Bill Walker
<bw@cs3.ecok.EDU> writes:
>
>>
>>In comp.unix.sco.misc Peter Eckhardt <Peter.Eckhardt@transcom.de> wrote:
>>> Dynamic Loading works nicely. I will send you an e-mail
>>> with the config.
>>
>>Would you consider just posting it ? I doubt it is very long, and I
>>suspect there is a lot of interest.
>
>
>Theres prebuilt binaries for perl5.004_04 that support dynamic loading at
>http://www.sco.com/skunkware/whatsnew.html#OSR5
>
>heres the build notes for that version (5.0.4)
[huge snip]
>lib/ndbm............ok
>lib/odbm............Bad free() ignored at lib/odbm.t line 63.
>Bad free() ignored at (eval 4) line 2.
>ok
>lib/opcode..........ok
------------------------------
Date: Fri, 23 Oct 1998 11:59:20 -0400
From: Tony Sadera <ts@cape.com>
Subject: PerlCtrl
Message-Id: <3630A7D8.4154C1C7@cape.com>
Has anyone ever gotten PerlCtrl to work properly?
I haven't.
--
Anthony Sadera
Web Development, Cape.Com
mailto:ts@cape.com
http://web.cape.com
------------------------------
Date: Fri, 23 Oct 1998 13:58:38 GMT
From: droby@copyright.com
Subject: Re: Problem with perl scripts...
Message-Id: <70q22e$chd$1@nnrp1.dejanews.com>
In article <1dhbqpx.1850i2e4jafhuN@bay2-265.quincy.ziplink.net>,
rjk@coos.dartmouth.edu (Ronald J Kimball) wrote:
> <droby@copyright.com> wrote:
>
> > Another error: This being imbedded in HTML without <PRE> and </PRE>, the
> > newlines are quite irrelevant.
>
> I know I'm thrilled when I view the source of an HTML document, and find
> ridiculously long lines with the parts I'm interested in way off to the
> right.
>
> Newlines may not affect the display of a page any more than other
> whitespace, but they are certainly not irrelevant.
>
I stand corrected. They're pretty irrelevant in the particular instance, as
'Hello World' doesn't stretch way to the right, and their omission is not a
technical error as regards use by a browser, but it's polite to throw them in
occasionally for us humans.
--
Don Roby
droby@copyright.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Fri, 23 Oct 1998 13:54:22 GMT
From: tbhanson@startribune.com
Subject: re-installing perl to like aix machine once built
Message-Id: <70q1qe$cbp$1@nnrp1.dejanews.com>
I have perl 5.004_01 installed and running on an aix4.2.1 rs6000. I'd like to
copy it to another rs6000 running aix4.2.1 without re-building it there from
scratch (I don't have gcc there, for example, and the build process was
somewhat involved as I recall.)
Q1: Is there an easy way to copy it to the new box (a relatively small list of
directories and/or files, for example)?
Q2: Phrased another way, is there a concept along the lines of "make remote
install", which uses rcp/rdist/whatever to install to the other box instead of
the one I've built perl on?
I'd be grateful for any hints.
--Tim Hanson
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 23 Oct 1998 14:11:13 GMT
From: cpierce1@cp500.fsic.ford.com (Clinton Pierce)
To: tbhanson@startribune.com
Subject: Re: re-installing perl to like aix machine once built
Message-Id: <70q2q1$8e34@eccws1.dearborn.ford.com>
In article <70q1qe$cbp$1@nnrp1.dejanews.com>,
tbhanson@startribune.com writes:
>I have perl 5.004_01 installed and running on an aix4.2.1 rs6000. I'd like to
>copy it to another rs6000 running aix4.2.1 without re-building it there from
>scratch (I don't have gcc there, for example, and the build process was
>somewhat involved as I recall.)
>
>Q1: Is there an easy way to copy it to the new box (a relatively small list of
>directories and/or files, for example)?
>
>Q2: Phrased another way, is there a concept along the lines of "make remote
>install", which uses rcp/rdist/whatever to install to the other box instead of
>the one I've built perl on?
When you built the perl originally, there was a "prefix" directory
selected during configuration. (Check out the config.sh file, for
"prefix="). Lift that whole directory up, and copy it to the other
machine.
Perl also guessed about the location of the man pages, and asked you
what extension you wanted. (man1, mann, manfoo, whatever.) Under AIX
it might have placed them in /usr/share/man. Check "config.sh" and see
where it put them, and copy from there to the remote machine.
Perl also offered to make a symlink in /usr/bin for you to the real
perl in $prefix/bin. You will have to re-make that symlink. (Or,
put $prefix/bin in your PATH).
Big hint: once you figure out all of the filenames, directories, symlinks,
manpages, etc... make a tar archive of them, and put them in a safe place.
Then it's handy for re-installation.
--
+------------------------------------------------------------------------+
| Clinton A. Pierce | "If you rush a Miracle Man, | http://www. |
| | you get rotten miracles" | dcicorp.com/ |
| fubar@ameritech.net |--Miracle Max, The Princess Bride| ~clintp |
+------------------------------------------------------------------------+
GCSd-s+:+a-C++UALIS++++P+++L++E---t++X+b+++DI++++G++e+>++h----r+++y+++>y*
------------------------------
Date: Thu, 22 Oct 1998 21:09:51 +0100
From: "Martin" <minich@globalnet.co.uk>
Subject: Sockets
Message-Id: <70q41a$jgl$1@newnews.global.net.uk>
I've been reading the posts in this group for quite a while now, and
haven't seen this problem pop up yet. I'm having problems with
sockets. The following:
#! \perl\bin\perl
use Socket;
my ($remote,$port, $iaddr, $paddr, $proto, $line);
$remote = shift || 'localhost';
$port = shift || 2345; # random port
if ($port =~ /\D/) { $port = getservbyname($port, 'tcp') }
die "No port" unless $port;
$iaddr = inet_aton($remote) || die "no host: $remote";
$paddr = sockaddr_in($port, $iaddr);
$proto = getprotobyname('tcp');
socket(SOCK, PF_INET, SOCK_STREAM, $proto) || die "socket: $!";
#####
connect(SOCK, $paddr) || die "connect: $!";
print SOCK "GET /main.html HTTP/1.0\n\n";
$returned = <SOCK>;
print $returned;
close (SOCK) || die "close: $!";
exit;
and the line just after the ##### always dies with "Unknown Error:
0x0000274d
regardless of what site I use. I'm running Windows 95 and Perl 5.003_07. Has
anyone else come across this?
Martin
------------------------------
Date: Fri, 23 Oct 1998 11:13:27 -0400
From: Jay Moore <shjmoore@sprynet.com>
Subject: strip sendmail headers
Message-Id: <36309D16.A014487B@sprynet.com>
I want to process some mail files. I need to strip out the sendmail,
SMTP headers and just get the meat of the message. Is there any modules
that have this capability. I have not seen any on CPAN.
Jay
------------------------------
Date: 23 Oct 1998 15:32:50 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: strip sendmail headers
Message-Id: <70q7j2$97j$1@info.uah.edu>
In article <36309D16.A014487B@sprynet.com>,
Jay Moore <shjmoore@sprynet.com> writes:
: I want to process some mail files. I need to strip out the sendmail,
: SMTP headers and just get the meat of the message. Is there any modules
: that have this capability. I have not seen any on CPAN.
Well, there's the Mail::Internet module that's part of Graham Barr's
MailTools distribution ($CPAN/modules/by-module/Mail/). However, if
you just want to separate header and body, use
my $header;
my $body;
{
local $/ = "";
$header = <MESSAGE>;
$/ = undef;
$body = <MESSAGE>;
}
Greg
--
Cop: I can put you in Queens on the night of the hijacking.
Hockney: Really? I live in Queens. Did you put that together yourself?
------------------------------
Date: Fri, 23 Oct 1998 10:48:14 -0400
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: Wanted: programming (humor?)
Message-Id: <19981023.104814.1F0.rnr.w164w@locutus.ofB.ORG>
stevenjm@olywa.net writes:
> I have encrypted my email address with a secret process I
> developed. I have done this to ensure only the best and
> brightest will be able to reply.
>
> Reply to:
>
> teveSay ayMay
> tevenmsay@lackwaterbay-acificpay.omcay
that address bounces! could it be encrypted somehow? you didn't say!
--
Russell_Schulz@locutus.ofB.ORG Shad 86c
------------------------------
Date: 12 Jul 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 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4054
**************************************