[6779] in Perl-Users-Digest
Perl-Users Digest, Issue: 404 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 1 10:07:09 1997
Date: Thu, 1 May 97 07:00:26 -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 Thu, 1 May 1997 Volume: 8 Number: 404
Today's topics:
@INC and . (Dan Niles)
aub (not: test :) (I R A Aggie)
Re: Avoid writing a temp file <minaret@sprynet.com>
Re: Avoid writing a temp file (Andrew M. Langmead)
Re: Built in Perl func to expand env vars??? (I R A Aggie)
Re: How can I email with Perl on NT using Blat <petri.backstrom@icl.fi>
Re: Information on PERL 5 (Simon Denvers)
Loosing clpm regulars (was Re: Perl auto-replier) (A. Deckers)
Re: Notice to antispammers (I R A Aggie)
Re: Novice to Perl and CGI (Clay Irving)
Re: NT port of Perl 5 <minaret@sprynet.com>
Re: NT port of Perl 5 <petri.backstrom@icl.fi>
Re: Object IDs are bad (was: Ousterhout and Tcl lost th <ludemann@inxight.com>
Re: Perl 5 under IRIX 6.2 <kistler@erdw.ethz.ch>
Re: Perl 5.003 bug??? <vlefevre@ens-lyon.fr>
Re: Perl auto-replier (Chipmunk)
Re: Perl auto-replier <flavell@mail.cern.ch>
Re: Perl auto-replier (Tad McClellan)
Re: pre-RFD: comp.lang.perl.{data-structure,inter-proce (Tung-chiang Yang)
Re: pre-RFD: comp.lang.perl.{data-structure,inter-proce (Tung-chiang Yang)
Re: question: how to trim a string passed via hard refe (David Alan Black)
Re: servers/chmod and stuff (A. Deckers)
Re: Syntax checking? <kevinl@casc.com>
tarring files in memory dellis@frycomm.com
Where does the share.exe load? <stan@meinc.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 30 Apr 1997 15:08:37 GMT
From: dan@more.net (Dan Niles)
Subject: @INC and .
Message-Id: <5k7n9l$n2c$1@news.more.net>
Why does perl stop printing if I remove '.' from @INC?
Dan
--
#--------------------------------#
# Dan Niles Signatures #
# dan@more.net should be small #
#--------------------------------#
------------------------------
Date: Wed, 30 Apr 1997 18:01:37 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: aub (not: test :)
Message-Id: <fl_aggie-ya02408000R3004971801370001@news.fsu.edu>
In article <5k7oma$o1o@lyra.csx.cam.ac.uk>, Paul A. Watters
<paw24@cam.ac.uk> wrote:
[posted && cc'd]
+ Does anyone have a version of aub (aka 'Assemble Usenet Binaries')
+ which is compatible with Perl 5? All the versions I have found on
+ FTP sites are 4.036....
It should run OK under v5. Have you tried it? You can always try:
perl -c aub
to see if it is syntactically correct. I suspect that it will pass this
test, and run OK.
aub probably should be written to make use of the NNTP module...
James - but who has the time?
--
Consulting Minister for Consultants, DNRC
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: 1 May 1997 13:09:56 GMT
From: "Geoff Mottram" <minaret@sprynet.com>
Subject: Re: Avoid writing a temp file
Message-Id: <01bc5630$c80019c0$74b0aec7@cactus>
> How do I circumvent the need to write that temporary file
> and do all the filtering (dos2unix, tr, sed, grep) to get
> the data into an array, in a more elegant way?
Read the output of the original shell commands into a Perl variable. The
equivalent in shell scripting is:
MY_VARIABLE=`ls -l *.c`
You should do something similar in Perl.
--
Geoff Mottram
minaret@sprynet.com
------------------------------
Date: Thu, 1 May 1997 13:36:59 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Avoid writing a temp file
Message-Id: <E9I8Hn.3Bn@world.std.com>
Scott Chapal <schapal@jonesctr.org> writes:
>In the example below, I created the subroutine with find2perl.
>I then concatanate the 100's of small files found with:
> print OUTFILE <IN>,"\n";
>to a temporary file.
Maybe you should pick up a perl tutrorial book and learn about the
basic array manipulation functions and operators.
push @collection, <IN>, "\n";
>Later, $rec is created by an ugly sequence of piped UNIX
>programs from the temporary file.
The important thing to notice, is that the unix shell commands are
looping through the file line by line. If the perl functions and
operators that you want to use work on scalars, you need to set up the
looping yourself. If they work on lists (especially if the take a list
as input, and return a list as output.) you can set them up in a way
similar to pipes. The big difference is the order is reversed. Instead
of:
cat file | tr ^ @ | grep 'key:'
you say:
print grep /key:/, tr/^/@/, @file;
So lets go over what the shell command does:
dos2unix is proably replacing dos formatted lines (each line
terminated by a carriage return/line feed) to unix ones (each line
terminated only by a linefeed.)
Obviously (well I hope obviously. Otherwise can I suggest the perl
tutorial again?), the way to do that on a scalar containing one line
of text would be to remove the carriage return with the operation
"s/\r//" or tr/\r//d;
The tr command maps fairly well between the shell command and perl.
tr/\t/;/;
The sed program deleted every line that begins with a dollar sign. The
regular expression look identical to the perl equivilent, and all you
need to know is that /d deletes the line if it matches. (If you didn't
know that, you could look it up in the sed man page.)
The grep commands, because they have the -v option, are removing lines
that match the specified pattern.
That makes the result:
foreach $line (@collection) { # or while(defined $line = shift @collection) {
$line =~ s/\r//; # remove dos carriage returns.
$line =~ tr/\t/;/; # replace tabs with semicolons
next if $line =~ /^\$/; # skip lines that start with dollar sign
next if $line =~ /Report/; # skip lines that contain the word "Report"
next if $line =~ /Pkno/; # skip lines that contain the word "Pkno"
next if $line =~ /Total/; # skip lines that contain the word "Total"
push @srec, $line; # add the result to the list of valid records.
}
Or a more shellish:
@srec = grep !/Total/, grep !/Pkno/, grep !/Report/, grep !/^\$/,
map { tr/\t/;/ } map { tr/\r//d } @collection;
(the tr/// commands operate on scalars. The map{} command repeats a
command for each element of a list. Essentially, it turns a scalar
operator into a list operator.)
You probably the first one.
Now once you have this loop done, you might want to start moving the
stuff from the loop on @srec, into the loop creating @srec. But I've
got to leave something for you to do, don't I.
--
Andrew Langmead
------------------------------
Date: Wed, 30 Apr 1997 17:54:25 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Built in Perl func to expand env vars???
Message-Id: <fl_aggie-ya02408000R3004971754250001@news.fsu.edu>
In article <3367B855.167E@cs.cmu.edu>, Eric Kischell <keesh@cs.cmu.edu> wrote:
+ I am currently learning Perl from the Camel book.
Would that be the blue camel?
+ Is there any built-in Perl functionality(non system calls) to expand
+ environmental variables?
You mean the contents of $ENV{'ENV_VAR_OF_CHOICE'} ?
James
--
Consulting Minister for Consultants, DNRC
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: Thu, 01 May 1997 15:01:29 +0200
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: How can I email with Perl on NT using Blat
Message-Id: <33689429.3D22@icl.fi>
Bruce Wernek wrote:
>
> Dear Perl Gurus,
>
> I've got a tough one for you. I have written a Perl script to pull data
> off a Web user feedback form and pipe this data to an email address. I
> am running the script on an NT platform which uses Microsoft's Internet
> Information Server (IIS) as the Web server software. The email server
> is provided by an Internet Service Provider (ISP). The script works
> except for the email portion. I am piping the data received from the
> feedback form using "Blat" (functions like "mail" in UNIX) to an email
> address. I have configured the NT registry to allow for multiple
> console windows which supposedly allows for I/O redirection. I have
> also fooled with the permissions, but I cannot get the "Blat" pipe to
> work. When I run the script locally on the NT server logged in as the
> administrator it works, but when I call it from the Web feedback form,
> it doesn't. I have tried everything, but I think I am fighting a "Bill
> Gates gotch ya" (the Microsoft way). Has anybody out there had a
> similar experience and if so how can I get this @#!! email to work. Any
> help would be greatly (I mean greatly) appreciated.
>
> Bruce
> bruce.wernek@mindspring.com
No gurus needed to answer your question. Here's enough to get
you going:
...
my $tempfile = '/temp/' . time . "$$" . '.tmp';
if ( open( TEMPFILE, ">$tempfile" ) ) {
print TEMPFILE $output; # or whatever you want to mail
close( TEMPFILE );
system "d:\\directory\\blat.exe $tempfile -t $toaddress -q"; #
email
unlink $tempfile;
}
else {
die "cannot create temporary file ($!)";
}
...
Make sure that the web server user ID is allowed to run
BLAT, and to write the temporary file(s) to whatever
location you decide to use.
regards,
...petri.backstrom@icl.fi
ICL Data Oy
Finland
------------------------------
Date: Mon, 28 Apr 1997 20:44:03 GMT
From: simon.denvers@virgin.net (Simon Denvers)
Subject: Re: Information on PERL 5
Message-Id: <336609c9.5740264@news.virgin.net>
On Sat, 26 Apr 1997 08:19:56 GMT, "Mark Allison"
<mark@markallison.demon.co.uk> wrote:
>My current contract requires me to learn PERL 5. After first glances at
>this language, I was absolutely horrified. Expressions like /([^ )*&
>$b)]{(~=} are normal!
>
>Please could someone direct me to a site that has an on-line PERL manual
>that I could download. One with examples would be useful.
>
>Thanks in advance.
www.perl.com is the best place to start. Try also the book 'Learning
Perl', which is a good introduction. Stear clear of 'Learn Perl in 21
Days' or similar books - apparently they're not so hot.
Perl's terse, for sure. I'm only just starting to learn it now, but
the expression you gave as an example doesn't look valid to me.
Regular expressions in Perl are basically a superset of the ones used
in awk, sed, grep etc. If you can understand those, you've got a head
start.
I think it's definitely a language worth the effort to master if you
work in a Unix environment. Good luck!
Cheers,
Simon
------------------------------
Date: 1 May 1997 11:08:19 GMT
From: I-hate-cyber-promo@man.ac.uk (A. Deckers)
Subject: Loosing clpm regulars (was Re: Perl auto-replier)
Message-Id: <slrn5mguco.mfu.I-hate-cyber-promo@nessie.mcc.ac.uk>
>In article <5k58aa$bg1$2@csnews.cs.colorado.edu>,
>Tom Christiansen <tchrist@mox.perl.com> wrote:
>>
>>When >90% of anything you read is dreck, you tire of suffering
>>fools gladly. This newsgroup is no longer worth wasting time
>>reading, or contributing to.
>>
>>It got to be too much for him. When something's too much for him,
>>he bails. I, on the other hand, got pissy and tried to stick with it.
>>I was wrong, twice, but I'm through with those mistakes. I go now to
>>join Larry in that great Perl heaven far removed from Usenet.
If we've lost Tom, this group has just taken a big hit in terms of
quality. Though I occasionally got pissed off by the silly fights he
chose to pick in clpm, he is IMHO the kind of person that makes a
newsgroup a usefull resource. It saddens me greatly to see him go.
As some of you know, I recently published a pre-RFD for some additional
(moderated) clp.* newsgroups.
I would like to know what regular readers of clpm think about adding a
comp.lang.perl.moderated to the pre-RFD. As I doubt we could find
enough human moderators willing to take on the job, I propose an
auto-moderated group. Articles would have to include a "magic cookie"
in a given header in order to be passed by the moderation script. IMHO,
this should cut down the noise level to almost zero, as anyone who
reads bofh will realise.
What do you think? Perhaps if we can create a group with a high signal to
noise ration, we can bring back some of the people like Tom, and who
knows, maybe Larry, who make these newsgroups really worthwhile.
Cheers,
Alain
--
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl archive: <URL:http://www.perl.com/CPAN/>
------------------------------
Date: Wed, 30 Apr 1997 17:38:19 -0500
From: fl_aggie@hotmail.com (I R A Aggie)
Subject: Re: Notice to antispammers
Message-Id: <fl_aggie-ya02408000R3004971738190001@news.fsu.edu>
In article <xnyafmggu5t.fsf@placebo.hr.lucent.com>, rsi@lucent.com wrote:
+ use. The moment you do this, you are using my resources. When Tom
+ hands my address on a platter to spambots, he's essentially saying
+ "use this computer's resource." Is it legal? Yes. Is it ethical? No
+ way in hell.
So, TomC is now responsible for spam? heheheheheh
It's no more or less ethical than publishing the "Anarchist Cookbook",
or selling nitrogen-based fertilizer. How many technological advances
has Lucent developed that can be abused? should Lucent be held responsible
for them?
James
--
Consulting Minister for Consultants, DNRC
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/perl/faq/idiots-guide.html>
------------------------------
Date: 1 May 1997 09:42:35 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: Novice to Perl and CGI
Message-Id: <5ka6kb$csf@panix.com>
In <33678655.68DB@flash.net> zonycat <zonycat@flash.net> writes:
>I do not want to waste people's time here but could you direct me to
>some place that has lots of examples of scripts for use with Win32 Perl.
>I am interested in building forms and getting data then building the
>results html page.
You might find the "Windows" and the "CGI" sections in the Perl Reference
helpful: http://www.panix.com/~clay/perl
--
Clay Irving See the happy moron,
clay@panix.com He doesn't give a damn,
http://www.panix.com/~clay I wish I were a moron,
My God! Perhaps I am!
------------------------------
Date: 1 May 1997 13:14:25 GMT
From: "Geoff Mottram" <minaret@sprynet.com>
Subject: Re: NT port of Perl 5
Message-Id: <01bc5631$68e8ba40$74b0aec7@cactus>
> I'm looking for the Windows NT 3.51 Resource kit containing an NT port of
> Perl 5. I need the later version which works on Windows 95 as well.
There is a Windows port of Perl done by activeware. Their www is:
http://www.activeware.com
--
Geoff Mottram
minaret@sprynet.com
------------------------------
Date: Thu, 01 May 1997 15:16:06 +0200
From: Petri Backstrom <petri.backstrom@icl.fi>
Subject: Re: NT port of Perl 5
Message-Id: <33689796.1D20@icl.fi>
Kevin Posen wrote:
>
> I'm looking for the Windows NT 3.51 Resource kit containing an NT port of
> Perl 5. I need the later version which works on Windows 95 as well.
>
> Anyone know of such a thing?
The Windows NT 4.0 Resource Kit has Perl 5 for Win32 build 110
(the 3.51 Resource Kit had, if my memory serves me right, build
106).
A newer one is build 306 that you can get from
http://www.activeware.com
regards,
...petri.backstrom@icl.fi
ICL Data Oy
Finland
------------------------------
Date: 30 Apr 1997 18:26:04 -0700
From: Peter Ludemann <ludemann@inxight.com>
Subject: Re: Object IDs are bad (was: Ousterhout and Tcl lost the plot with latest paper)
Message-Id: <wuju3kovv83.fsf@wistaria.i-have-a-misconfigured-system-so-shoot-me>
ark@research.att.com (Andrew Koenig) writes:
> In article <5k02gh$jhj@lyra.csx.cam.ac.uk> Tony Finch <fanf@lspace.org> writes:
>
> > In the tree example that you started with, what is wrong with just
> > passing round the whole subtree so that it can be compared with as
> > necessary? Any reasonable implementation will only be passing round a
> > pointer so you lose nothing.
>
> Because it will compare equal with any other subtree that happens to
> have the same structure, which is not what I want.
But in that case, they are not the *same* subtree; they are different
in some way that you haven't bothered to specify.
Unless, that is, you intend to modify the subtree. In my experience,
that is almost never a good thing; the potential confusion of updating
a complex structure in-place seldom is worth the small speed-up (some
years ago I talked with the people who built an optimizing compiler
with all kinds of live-dead analysis, reordering of statements, and
register coloring; and that was their opinion also).
--
Peter Ludemann +1.415.813.6806 (fax: +1.415.813.7499)
Software Architect ludemann@inxight.com
InXight Software, Inc. http://www.inxight.com
PAHV 105, 3400 Hillview Ave., Palo Alto, CA 94304
------------------------------
Date: Thu, 01 May 1997 14:12:09 +0200
From: Per Kistler <kistler@erdw.ethz.ch>
To: "Robert M. Cothren, PhD" <robert_cothren@out.trw.com>
Subject: Re: Perl 5 under IRIX 6.2
Message-Id: <33688899.8EBC8353@erdw.ethz.ch>
Hi Robert
perl5.003 did not propperly compile under IRIX6.2, but
perl5.003_96 did it perfectly:-))
Now there is even perl5.003.1 which then, I guess should work as well:-)
Here is perl5.003.1 if it's not on your ftp server:
http://www.dlr.de/fresh/unix/src/contrib/
Bye, Per.
---------------------------------------------------------------------
Per Kistler
Programmer (Unix/Perl/C++)
kistler@erdw.ethz.ch
http://www.erdw.ethz.ch/~kistler
Institute for Isotope Geology and Mineral Resources, ETH, Switzerland
---------------------------------------------------------------------
------------------------------
Date: 29 Apr 1997 13:40:33 GMT
From: Vincent Lefevre <vlefevre@ens-lyon.fr>
Subject: Re: Perl 5.003 bug???
Message-Id: <5k4toh$p1@cri.ens-lyon.fr>
I've just found the problem with my script. // seems to recall the last
regular expression. But
_ where is it written in the doc?
_ can one avoid this?
In fact, I have /$d/ in my real script, and I could add a
$d = '.' if ($d eq '');
here, but is there a general method (that also works with empty strings)?
--
Vincent Lefevre, vlefevre@ens-lyon.fr | Acorn Risc PC, StrongARM @ 202MHz
http://www.ens-lyon.fr/~vlefevre | 20+1MB RAM, Eagle M2, TV + Teletext
PhD in Computer Science, 1st year | Apple CD-300, SyQuest 270MB (SCSI)
-----------------------------------------------------------------------------
------------------------------
Date: 1 May 1997 04:11:04 GMT
From: Ronald.J.Kimball@dartmouth.edu (Chipmunk)
Subject: Re: Perl auto-replier
Message-Id: <5k954o$j26$1@dartvax.dartmouth.edu>
In article <slrn5mcscd.ba3.I-hate-cyber-promo@nessie.mcc.ac.uk>
I-hate-cyber-promo@man.ac.uk (A. Deckers) writes:
> In comp.lang.perl.misc,
> Ronald.J.Kimball@dartmouth.edu wrote:
> [...]
> >P.S. I'm afraid I've never seen a posting by Larry - that two week
> >thing, again.
>
> That's the point. Tom was trying to explain that the flood of stupid
> questions have driven Larry Wall, and others too, away from the
> newsgroup. This makes the newsgroup a poorer place than it would
> otherwise be, and all because a bunch of morons couldn't be bothered to
> do their homework before posting.
Yeah, I got that point.
My objection is that the newsgroup is also made a poorer place by the
rude responses some people post. I don't think such responses will do
anything at all to solve the problem of naive postings by newbies.
(And while I'm being self-righteous, why do some people have a bug up
their ass about people who request e-mail replies?)
> In the current circumstances, you will not see a post by Larry Wall in
> this group, no matter how long you hang out here.
If I had started hanging out here sooner, I might have seen a post by
Larry Wall. Unfortunately, I only got here two weeks ago.
Too late now. :-(
Chipmunk
------------------------------
Date: Thu, 1 May 1997 11:56:14 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Perl auto-replier
Message-Id: <Pine.A41.3.95a.970501135148.30388F-100000@sp061>
On 1 May 1997, Chipmunk wrote:
> (And while I'm being self-righteous, why do some people have a bug up
> their ass about people who request e-mail replies?)
There's a big difference between demanding a private consultation
from which no-one else will be allowed to benefit, and requesting
the courtesy of an email _copy_ of the reply that will, of course, be
_posted_ so as to leverage the answer to the wider audience.
Too often, people choose a form of words that seems to mean the
first rather than the second.
Oddly enough, we seem to be having much the same discussion on
c.i.w.authoring.html at the moment as you folks are having here
in this thread. Is it the time of year, something in the water? ;-))
------------------------------
Date: Thu, 1 May 1997 05:54:12 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Perl auto-replier
Message-Id: <kos9k5.vt5.ln@localhost>
Chipmunk (Ronald.J.Kimball@dartmouth.edu) wrote:
: (And while I'm being self-righteous, why do some people have a bug up
: their ass about people who request e-mail replies?)
It is troublesome to do it individually, so some set up their newsreaders
to autoCc.
Then they get a lot of bounced email from munged addresses.
Then they get so annoyed at the bounces that they post the unmunged
addresses on a web page.
Then they abandon the newsgroup...
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Thu, 1 May 1997 08:52:04 GMT
From: tcyang@netcom.com (Tung-chiang Yang)
Subject: Re: pre-RFD: comp.lang.perl.{data-structure,inter-process,porters,regex}
Message-Id: <tcyangE9HvAs.2nI@netcom.com>
Let me have my $0.02.
(1) Judging from the experience of soc.culture.xxx groups, unless you make
a moderated or robomoderated newsgroup, you will not be able to
avoid excessive crossposting. It is just a matter of time.
(Right now I killfile "Tcl" and "Outburst?" in CLPM. The effect
seems to be good).
(2) I understand someone posted that he/she would object to CLP.cgi
since that essentially duplicates an existing newsgroup. However,
you guys are Perl experts, and you should ask yourself:
"What group a newbie will choose to post his/her question about
CGI?"
Unfortunately, unless there is a CLP.cgi, most newbies will ask this
question in CLPM. In fact, if we create more subgroups under CLP,
the result could be worse -- newbies ask this kind of questions in
each of them.
I was once a newbie (and I am still one, I believe) for Perl, and you guys
must try to think what the newbies would think. Creating more subdirectories
is helpful for experts, but for newbies, you just add more groups for them
to ask questions. It will also load the human moderator's job because of
these newbies.
--
Tung-chiang Yang tcyang@netcom.com
soc.culture.taiwan, soc.culture.china (by SCC FAQ Team) FAQ's:
http://www.clever.net/tcyang/Taiwan_faq.shtml, China_faq.shtml
------------------------------
Date: Thu, 1 May 1997 10:37:11 GMT
From: tcyang@netcom.com (Tung-chiang Yang)
Subject: Re: pre-RFD: comp.lang.perl.{data-structure,inter-process,porters,regex}
Message-Id: <tcyangE9I060.CI2@netcom.com>
Russ from Stanford has said this was not possible for all platforms (to
alias one group to another).
But we can make them "pseudo alias" if we want.
(1) Create comp.lang.perl.cgi (or comp.lang.perl.www) and make it
robomoderated.
(2) The daemon does not have any robomoderation rule. Anything posted
there will pass through, but comp.infosystems.www.author.cgi(?) will
be added into Newsgroups: and Followup-To: lines.
In this way when a newbie posts something in CLP.cgi, actually his/her
post will also show up in CIWAC and gets answered there. He/she would
have a feeling that he/she got the answer in CLP.cgi. In this case,
it is not really a newsgroup alias, but effectively it is.
The problem is that some people in CIWAC would not read what CLP.cgi is
going on, so we cannot say CLP.cgi is aliased to CIWAC, but the former
is a subset of the latter, so people might miss CIWAC posts. We can
add the robomoderation rule so that anything posted in CLP.cgi will
be inserted a line in the very beginning, sayinb the post is also
crossposted in CLP.cgi and CIWAC.
This just introduce a "justified crossposting", so it would not take up
more hard disk space as it did.
Refinement:
(a) Add the robomoderation rule that CLP.cgi cannot be crossposted with
CLP.misc.
(b) Do CIWAC a favor by taking all their current charter restrictions
into the robomoderation rule of CLP.cgi.
Cons:
I am not sure how many people in news.groups will buy the story and
believe such a pseudo alias necessary and justified. We had better present
some statistics to convince people.
==========================================
Douglas Seay (seay@absyss.fr) wrote:
: Aye!
: Is it possible to make one usenet group an alias of another? Just make
: this new c.l.p.www be a "symbolic reference" to c.i.w.a.cgi might do the
: trick. I've never heard of such a thing, so I doubt if it is already in
: a RFC.
: (deleted)
--
Tung-chiang Yang tcyang@netcom.com
soc.culture.taiwan, soc.culture.china (by SCC FAQ Team) FAQ's:
http://www.clever.net/tcyang/Taiwan_faq.shtml, China_faq.shtml
------------------------------
Date: 1 May 1997 10:03:02 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: question: how to trim a string passed via hard reference?
Message-Id: <5k9pom$mv9@pirate.shu.edu>
Hello -
stampes@xilinx.com (Jeff Stampes) writes:
>Terrence M. Brannon (brannon@bufo.usc.edu) wrote:
>: sub trim {
>: chomp($$_[0]);
>: $$_[0] =~ s/^\s+//;
>: $$_[0] =~ s/\s+$//;
>: }
>: trim(\$x)
>: does not trim away leading and trailing whitespace. why?
>because you aren't properly dereferencing the reference. You're
>passing in a reference to a scalar. That reference is then in
>@_[0]. This is the value you need to dereference:
>sub trim {
> chomp(${@_[0]});
> ${@_[0]} =~ s/^\s+//;
> ${@_[0]} =~ s/\s+$//;
>}
Use ${$_[0]} rather than ${@_[0]}, though.
David Black
dblack@icarus.shu.edu
------------------------------
Date: 1 May 1997 12:42:25 GMT
From: I-hate-cyber-promo@man.ac.uk (A. Deckers)
Subject: Re: servers/chmod and stuff
Message-Id: <slrn5mh3t6.mfu.I-hate-cyber-promo@nessie.mcc.ac.uk>
In comp.lang.perl.misc,
Good.Luck@Finding.My.Address.Com wrote:
>Hello!
> Ok, I'm a newbie and I know I suck. But I need help. I am begining to
>do some perl programming for the web and need to know how to make it work
>online. I code it, upload it to my cgi-bin directory, issue the chmod nd
>am still stuck. Am I forgetting a step? Do I upload the script in the text
~~~~~~~~~~~~~~
>script format?
Yes.
>Do I need to compile it?
No.
>Help? Please?
Exactly how are you "stuck"? Does your script work from the command line?
If not, does it give out an error message? If so, what exact error
message? Can you include the _relevant_ section of you code in your post,
please?
Does your script work from the command line, but not when called
from your browser? If so, you're probably looking at a CGI-related
problem rather than a Perl-related one, and you should post to
comp.infosystems.www.authoring.cgi.
Did you read the FAQs before posting your question?
HTH,
Alain
--
Perl information: <URL:http://www.perl.com/perl/>
Perl FAQ: <URL:http://www.perl.com/perl/faq/>
Perl archive: <URL:http://www.perl.com/CPAN/>
>>>>>>>>>>>>> NB: comp.lang.perl.misc is NOT a CGI group <<<<<<<<<<<<<<
------------------------------
Date: 30 Apr 1997 09:06:24 -0400
From: Kevin Lambright <kevinl@casc.com>
Subject: Re: Syntax checking?
Message-Id: <yhfu3ko8xtb.fsf@casc.com>
tcm@wcl.on.ca (TCM Online) writes:
>
> I'm a Perl newbie here.... just learning by example and hacking
> existing code..
>
> I've started off on a new project from the ground up and now get a
> run error stating I'm missing a right bracket... is there any good
> freeware syntax checkers that will find this for me?
>
Yes. Perl.
Try using -w on the shebang line (#!/usr/.../perl -w). Also, when you
want to just check the syntax of a Perl script, try 'perl -cw <yourscript>'.
Also, use -w :-)
Kevin
------------------------------------------------------------------------------
Kevin Lambright email: kevinl@casc.com
Cascade Communications Corp. voice: 508-952-7407
5 Carlisle Road, Westford Ma. 01886 fax: 508-692-1510
------------------------------
Date: Thu, 01 May 1997 07:41:16 -0600
From: dellis@frycomm.com
To: dellis@frycomm.com
Subject: tarring files in memory
Message-Id: <862489942.10244@dejanews.com>
I am trying to set something up so that every hour, a program launches
that extracts all files from a directory hierarchy that have been changed
since the last backup and copy them off to an NFS mounted disk across the
room. It would have been easy enough to do this in the Csh:
tar -cf - `find . ! -name . -newer .last_backup -print` | (cd newdir; tar
-xf -)
but the find command always makes a list of too many files so it complains
and dies. So in perl I now have an array full of the appropriate
filenames and I need to tar them from the source directory and untar them
into a new directory using something like the method above. I have tried
open(TF,"tar -cf - @filenames |");
@tarfile = <TF>;
chdir $newdir || die "Can't chdir to dest: $!\n";
open(OF," | tar -xf - ");
foreach (@tarfile) {print OF $_;}
but this starts executing the programs contained in the array or something
similar (lots of errors and usage messages madly flying by in alphabetical
order).
I don't want to tar these files onto disk since disk space is limited, so
how can I do this (non-perl ideas are welcome but I like perl so a perl
solution would be ideal)?
One note: I realize that the amount of files changed in one hour is not
very many, but I wanted to allow someone running this manually to specify
a full backup merely by removing the .last_backup file. The program checks
for this file and if it doesn't exist, it tars up all files instead of
just the ones newer than the .last_backup file.
Thanks for any help you might give!
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Thu, 01 May 1997 06:23:54 -0700
From: Stan <stan@meinc.com>
Subject: Where does the share.exe load?
Message-Id: <3368996A.5137@meinc.com>
when I start ms word6.0
it says restart windows and load share.exe
i'm using win3.1
--
Stan's Short Stories
http://www.meinc.com/stan
------------------------------
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 404
*************************************