[12856] in Perl-Users-Digest
Perl-Users Digest, Issue: 266 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 26 22:07:20 1999
Date: Mon, 26 Jul 1999 19:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 26 Jul 1999 Volume: 9 Number: 266
Today's topics:
CGI - Perl Question frank_hampshire@bigfoot.com
Don't want to make file that owner is "NOBODY" <cybok@nobreak.com>
Re: FormMail Year 2000 problem (Alan Curry)
Re: I need fast help <flavell@mail.cern.ch>
Re: I need fast help (elephant)
Re: I need fast help <laurens@bsquare.com>
Re: I need fast help (Abigail)
Re: Korn Shell or Perl? <tchrist@mox.perl.com>
Re: newbie question: system ()/error message <bwalton@rochester.rr.com>
Re: perl binaries for solaris 2.4 <randy@theoryx5.uwinnipeg.ca>
Re: Perl still doesnt work <laurens@bsquare.com>
Re: Perl still doesnt work <cassell@mail.cor.epa.gov>
Re: perl to interpret a XLS file? (Abigail)
Re: REAL: help with flock() portability <rick.delaney@home.com>
Re: reg expression <cassell@mail.cor.epa.gov>
Re: reg expression (Abigail)
Re: sort database and remove duplicates <bwalton@rochester.rr.com>
Re: SSI command in Perl script problem (elephant)
Re: stopping email overflow on failure (I R A Darth Aggie)
Re: stopping email overflow on failure (I R A Darth Aggie)
Re: stopping email overflow on failure (I R A Darth Aggie)
Re: stopping email overflow on failure (I R A Darth Aggie)
Re: stopping email overflow on failure <tchrist@mox.perl.com>
Re: stopping email overflow on failure <flavell@mail.cern.ch>
Re: stopping email overflow on failure (Andrew Johnson)
Vancouver PERL PRgrammer <batyam@my-deja.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 27 Jul 1999 01:14:44 GMT
From: frank_hampshire@bigfoot.com
Subject: CGI - Perl Question
Message-Id: <7nj160$9ia$1@nnrp1.deja.com>
I hope this isnt too ignorant a question for this forum.
I am using the CGI package build to build a form something like:
my $form = new CGI;
print $form->header;
print $form->start_html;
print $form->startform;
print "<h1>The Form</h1>";
print $form->textfield("TEST");
print $form->submit;
print $form->endform;
print $form->end_html;
if ($form->param("submit"))
{
print "<P>You entered".$form->param(TEST)."</P>";
}
The text that appears after the sumbit button has been clicked appears
at the bottom of form (I guess thats expected), however I would like to
get it to appear on a new page.
I have been unable to find an answer for this on any of the FAQs. Is
there something really obvious I am missing?
Any help appreciated.
Frank Hampshire
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Tue, 27 Jul 1999 09:41:31 +0900
From: "channeli" <cybok@nobreak.com>
Subject: Don't want to make file that owner is "NOBODY"
Message-Id: <7nivht$7fh$1@b5nntp2.channeli.net>
My perl script make several data files.
But the problems of my server is that never allow the file that owned by
"NOBODY".
I'm using
umask(077);
now.
At the result, some files owned by the owner of script, some are "nobody".
Any other solution is there?
I'm really urgent...
------------------------------
Date: Tue, 27 Jul 1999 00:47:07 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: FormMail Year 2000 problem
Message-Id: <fk7n3.6107$cO4.163438@news12.ispnews.com>
In article <slrn7ppt0e.80l.fl_aggie@thepentagon.com>,
I R A Darth Aggie <fl_aggie@thepentagon.com> wrote:
>
>Yah, this is going on my 'round-tu-it' list. I would suggest a few
>modules, tho:
>
>use Mail::Mailer;
>use CGI;
>
>I'm open to suggestions regarding the mail API. IMHO, I think the easiest
>solution is to bypass the local MTA and talk directly to the localized
>SMTP server.
<rant>
Not all mail is SMTP. Using SMTP as a mail injection protocol is simply
wrong. And FormMail is a perfect example of something that should definitely
not use SMTP, since the destination address is usually on the same machine as
the sending script. Why go through a network mail protocol to deliver
local-to-local mail? /usr/lib/sendmail is the standard mail injection
interface. That's why it is implemented by mail servers intending to replace
the real sendmail.
If you are not writing a mail server, SMTP is not for you. If you are acting
as a mail client, you should inject to the local mail server using a
published interface. /usr/lib/sendmail is a published interface. It delivers
local-to-local mail without unnecessary trips through the loopback interface.
</rant>
I don't think the FormMail problem is big enough to justify using modules.
Decoding x-form-urlencoded is not hard, opening a pipe to /usr/lib/sendmail
is not hard, and... that's about all it does.
If it prints dates wrong a few months from now, I don't really care. The
reason I want this thing replaced is that it is an anonymous public mail
relay, and that makes it evil.
--
Alan Curry |Declaration of | _../\. ./\.._ ____. ____.
pacman@cqc.com|bigotries (should| [ | | ] / _> / _>
--------------+save some time): | \__/ \__/ \___: \___:
Linux,vim,trn,GPL,zsh,qmail,^H | "Screw you guys, I'm going home" -- Cartman
------------------------------
Date: Tue, 27 Jul 1999 01:54:23 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: I need fast help
Message-Id: <Pine.HPP.3.95a.990727014559.4934C-100000@hpplus03.cern.ch>
On Tue, 27 Jul 1999, Marko Cehaja wrote:
> Subject : I need fast help
Indeed you do, and there's a fine FAQ that would help you to compose a
meaningful Subject: header for your usenet postings. Yours was designed
to attract flames.
As for
> open(MY,"FILETST");
> print MY "Testing file output\n";
> close (MY);
if you don't test the outcome of any action, and print the resulting
error diagnostic, how do you ever expect to find out what's wrong?
As for "needing fast help", as the usenet new users FAQ explains, you're
probably dead by now, so you won't be reading this anyway.
good luck (wherever you are by now)
------------------------------
Date: Tue, 27 Jul 1999 10:21:48 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: I need fast help
Message-Id: <MPG.1207a6a9ac99a845989b82@news-server>
Marko Cehaja writes ..
> ...this program doesnt create any file, nor
>shows any error:
>
>open(MY,"FILETST");
read the manual on the 'open' function to find out why this doesn't
create any file
perldoc -f open | more
and read the manual on running perl to find out why you're not seeing any
error (specifically the '-w' switch)
perldoc perlrun
--
jason - remove all hyphens for email reply -
------------------------------
Date: Mon, 26 Jul 1999 17:11:39 -0700
From: "Lauren Smith" <laurens@bsquare.com>
Subject: Re: I need fast help
Message-Id: <7nitg4$n9l$1@brokaw.wa.com>
Marko Cehaja wrote in message <7niqsc$mg1$1@news.online.de>...
> 1) doesnt create any file
> 2) doesn't shows any error:
>
>#eval 'exec /usr/bin/perl -S -W -D $0 ${1+"$@"}'
answer 2) Is this the shebang line? Where's the bang? Otherwise, this is
just a commented out line.
>print"Testing screen output";
Prints correctly to screen.
>open(MY,"FILETST");
answer 1) Opens the file as read only. Try:
open(MY, "FILETST") or die "FILETST: $!";
>print MY "Testing file output\n";
File can't be written to anyway, no output.
perldoc -f "open"
Lauren
------------------------------
Date: 26 Jul 1999 20:25:38 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: I need fast help
Message-Id: <slrn7pq2j9.lrq.abigail@alexandra.delanet.com>
Marko Cehaja (thetaworld@magikomik.de) wrote on MMCLV September MCMXCIII
in <URL:news:7niqsc$mg1$1@news.online.de>:
{} I have PWS and Perl installed. Perl and PWS works both well, instead that
{} Perl cannot write onto the file. Here is the sample program that doesnt
{} work. I need fast help for that, as this program doesnt create any file, nor
{} shows any error:
That's because you don't print any error! Use -w, use strict, and
always, always, always, always, always check the return value of
your system commands.
{} open(MY,"FILETST"); <----- That semicolon is WRONG!
Abigail
--
perl -we 'print q{print q{print q{print q{print q{print q{print q{print q{print
qq{Just Another Perl Hacker\n}}}}}}}}}' |\
perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w | perl -w
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 26 Jul 1999 19:41:03 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Korn Shell or Perl?
Message-Id: <379d0e2f@cs.colorado.edu>
In comp.unix.shell, mwang@tech.cicg.ml.com (Michael Wang) writes:
I change the subject a little bit. I found that Perl people have
a non-objective attitude towards Shell. They claim that it is to
easy to do things that is awkward to do in shell. However when it
comes to issues that is easy to do in shell but awkward to do in
Perl, they say that shell is doing is "inefficent" anyway. The attitude
is clearly shown in "man perlfaq8".
How can I convert my shell script to perl?
Learn Perl and rewrite it. Seriously, there's no simple
converter. Things that are awkward to do in the shell are
easy to do in Perl, and this very awkwardness is what would
make a shell->perl converter nigh-on impossible to write.
By rewriting it, you'll think about what you're really
trying to do, and hopefully will escape the shell's pipeline
datastream paradigm, which while convenient for some
matters, causes many inefficiencies.
I would like to use the following code to illustrate Perl awkwardness
and inefficiency. It is quite easy and straightforward with shell's
pipelines, which Perl does not have. What Perl has is limited Korn
shell equivalent $(...).
foreach $j ( do {
if ( $opt_d eq "all" ) {
do { foreach ( split(/,/, $opt_b) ) {
if ( /local/ ) {
keys(%::beeper_byname);
} elsif ( /yp/ ) {
open(FH, "ypcat -k beeper.byname |")
or die("cannot fork: $!\n");
map ( {
/(\w+)\s+\w+/ && $1
} <FH> );
}
}}
} else {
split(/,\s*/, $opt_d);
}
}
) {
unless ( $j eq "YP_LAST_MODIFIED" || $j eq "YP_MASTER_NAME" ) {
($k, @devnull)=get_pin("0", "1", "0", $opt_b, $j);
$exit_status+=$k;
}
}
--
Michael Wang
http://www.mindspring.com/~mwang
--
"With a kernel dive, all things are possible, but it sure makes it hard
to look at yourself in the mirror the next morning." -me
------------------------------
Date: Mon, 26 Jul 1999 20:43:40 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: newbie question: system ()/error message
Message-Id: <379D00BC.8ADAE4FC@rochester.rr.com>
spicastretford@my-deja.com wrote:
> Hello,
>
> I am trying to run a program with the system () function. My problem is
> that after the program finishes (it correctly runs), I get this error
> message that I don't understand:
>
> Can't run CMMainSuite.s: The data area passed to a system call is too
> small. , stopped at C:\dev\qa\ui\CAMPAI~1\AUTOTE~1.PL line 28, <STDIN>
> chunk 1.
>
> Here is the pertinent code:
>
> #!/usr/bin/perl -w
>
> # Variables:
> ....<snipped the variables>...
>
> # Run the master test suite
> print "\nRunning the CMMainSuite.s .... \n";
> sleep 1;
> @args = ("partner", "-q", "-resexport", "-r", "CMMainSuite.s");
> system (@args) || die "Can't run CMMainSuite.s: $!, stopped";
>
> print "Done.\n\n";
>
> It never gets to print "Done.\n\n". What does the error message mean? I
> looked at the error message list in the perl docs and couldn't find it.
...
Look up the return value of the system command in perlfunc. It is the
error code returned by the program. Most successful programs return an
error code of zero. If you get a zero error code, you execute the die.
You probably want to die on a non-zero error code, so try && instead of
||. If your system() call was successful, the contents of $! are not
expected to be "anything in particular" (from perlvar), so your error
message is meaningless.
------------------------------
Date: 27 Jul 1999 01:25:26 GMT
From: Randy Kobes <randy@theoryx5.uwinnipeg.ca>
Subject: Re: perl binaries for solaris 2.4
Message-Id: <7nj1q6$m4t$1@canopus.cc.umanitoba.ca>
In comp.lang.perl.misc,
Life Insurance Corporation of India <liedpmum@bom3.vsnl.net.in> wrote:
> Anybody knows where I can get perl binaries (any version) for solaris
> 2.4?
Hi,
Check out http://metalab.unc.edu/pub/solaris/sparc/
for an (older) perl binary, and also, perhaps more
usefully, a gcc binary which enables you to build your
own perl.
> Pl email me at : edpmum@vsnl.com
One of the great advantages of newsgroups is that others
might have the same questions, and thus learn from the
posted responses, and still others can correct erroneous
answers.
> Thanks a million
> Krishnan
best regards,
Randy Kobes
--
Physics Department Phone: (204) 786-9399
University of Winnipeg Fax: (204) 774-4134
Winnipeg, Manitoba R3B 2E9 e-mail: randy@theoryx5.uwinnipeg.ca
Canada http://theory.uwinnipeg.ca/
------------------------------
Date: Mon, 26 Jul 1999 17:15:27 -0700
From: "Lauren Smith" <laurens@bsquare.com>
Subject: Re: Perl still doesnt work
Message-Id: <7nitn8$po5$1@brokaw.wa.com>
Marko Cehaja wrote in message <7nirg8$mnm$1@news.online.de>...
> Re: Perl still doesnt work
You must need this problem fixed REALLY fast, you just posted this same
urgent message 10 minutes ago.
Lauren
------------------------------
Date: Mon, 26 Jul 1999 17:40:00 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl still doesnt work
Message-Id: <379CFFE0.D8B9F73A@mail.cor.epa.gov>
Marko Cehaja wrote:
>
> I have PWS and Perl installed. Perl and PWS works both well, instead that
> Perl cannot write onto the file. Here is the sample program that doesnt
> work. I need fast help for that, as this program doesnt create any file, nor
> shows any error:
Well, it doesn't show any error, because you didn't tell it
to show you the errors. See below:
> #eval 'exec /usr/bin/perl -S -W -D $0 ${1+"$@"}'
> # if $running_under_some_shell;
You don't need this on win32. This is a magical
incantation for certain unices which do weird things
with long command lines [if you don't mind me getting
too technical :-]. Try this instead:
#!perl -w
I would also recommend the following line:
use strict;
This turns on some additional error-checking, which
may require you to add some more structure to your
code.. or at the minimum, to learn about the my()
function. A Good Thing, IMHO.
> print"Testing screen output";
>
> open(MY,"FILETST");
Oops. You opened your file for read only. And you
really want to write to it instead. And you didn't check
the return of your open() to see if it failed.
Do you want to create a new file, or open an existing
file for appending? Assuming you have a function &Error
that prints out a helpful error message on your webpage:
# [create new file]
open MY, '>filetst' or &Error("Unable to open file, $!");
# [append to existing file]
open MY, '>>filetst' or &Error("Unable to append to file, $!");
Also note that I used single quotes as a note to myself that
there is no variable interpolation at the filename.
> print MY "Testing file output\n";
> close (MY);
you might also look into CGI::Carp, which will let you
send fatal errors to your browser instead of to your
log:
# clipped right out of the CGI::Carp manpage
use CGI::Carp qw(fatalsToBrowser);
die "Fatal error messages are now sent to browser";
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 26 Jul 1999 20:31:21 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: perl to interpret a XLS file?
Message-Id: <slrn7pq2tv.lrq.abigail@alexandra.delanet.com>
skao@my-deja.com (skao@my-deja.com) wrote on MMCLV September MCMXCIII in
<URL:news:7niorr$4b0$1@nnrp1.deja.com>:
;; The following task has been posed to me:
;;
;; They want the ability to extract certain graphs from an Excel Spreadheet
;; and saved to gif files. Catch though, this must be performed on the web
;; server, instead of by the user on her native system (probably Windows
;; 95). This would seem to be an extremely hairy task, if it could be
;; done. I would have to interpret the excel spreadsheet, first of all.
;; After that is done, I would have to determine which objects to extract,
;; and then somehow convert it to an acceptable file format
;; (gif/jpg/etc...). Does anyone have any opinions/suggestions on how this
;; could be accomplished?
;;
;; Are there currently any Perl scripts that would point me in the right
;; direction? Or even something written in Java/C++/or existing unix
;; utilities?
Why are you asking here? This group discusses the fine art of BBQing
penguins. Wouldn't you be better of in asking in one of the 33 groups
listed in my newsgroups file that have 'excel' in their name? Or perhaps
ask in comp.lang.fortran, in the off chance there's something written
in Fortran?
Abigail
--
perl -MNet::Dict -we '(Net::Dict -> new (server => "dict.org")
-> define ("foldoc", "perl")) [0] -> print'
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Tue, 27 Jul 1999 01:03:37 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: REAL: help with flock() portability
Message-Id: <379D053E.BC978E67@home.com>
[posted & mailed]
Stefano Ghirlanda wrote:
>
> sysopen PIPE, $pipe, O_RDONLY or croak "can't open $pipe: $!";
> flock PIPE, LOCK_EX or croak "can't lock $pipe: $!";
>
> On solaris a user gets the error:
>
> can't lock /home/ron/.lyxpipe.out: Bad file number at
I got this exact error just today for (probably) the same reason (but
not on Solaris). It seems that you cannot get an exclusive lock on a
read-only file on some systems. I changed mine to O_RDWR and had no
problems.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Mon, 26 Jul 1999 17:23:23 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: reg expression
Message-Id: <379CFBFB.8C1793E9@mail.cor.epa.gov>
llornkcor wrote:
>
> I don't think that this exact question IS asked several times a day,
Okay, your question, up to epsilon, is asked a painful number of
times a week here. As a result, many responders tend to be
abrupt enough to dissuade casual readers of the newsgroup from
asking similar questions without doing their Perl homework
first. You have just experienced some of the consequences of
others' acts.
> yes, I have seen similar ones. If you have a problem with answering these
> newbie questions, why even take the time to read, and post , and with
> insults? You probably do know more about perl programming than I ( hence
> this discussion) , but I know more about recording audio and video and
> techniques involved with each. and if YOU were to want to learn recording
> audio, and asked a question, that I would find stupid, or have seen/heard
> several time, I wouldn't insult you. I would either ignore the question, or
> answer it. In fact, I have done this in different groups.
But in this group, there is a longstanding 'teach a man to
fish' campaign. This also leads to some abruptness over time.
And if 8,000 people asked you how to turn on their camcorders,
you too might be gruff with the 8,001st poster.
> I have read the FAQ (s), and am struggling with regexs. Asking my stupid
Okay, that's fair. Regexen are different if you haven't seen
them before in another language or tool. And Perl has regex
features not to be found elsewhere. You might find the
tutorial at
http://www.netcat.co.uk/rob/perl/win32perltut.html
has a good intro to regexen. After that, you ought to be ready
to tackle the perlre manpage which comes with every install
of Perl [and hence ought to be on your hard dick for maximal
utility]. I found "Mastering Regular Expressions" by Jeffrey
Friedl very informative, even if it is a couple years out-of-
date on Perl's niftiest regex techniques.
> questions on a newsgroup , is NOT my first line of defense. If I offended
> you with asking such a simple question, I am sorry. I was only seeking help.
> No need to insult me.
I've also found that searching the newsgroup archives at
deja.com can provide a wealth of information. Once you
find out all the tools provided by Perl and the web and
Perl programmers, you'll see that asking in this newsgroup
is really the *last* resort.
HTH,
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: 26 Jul 1999 20:17:25 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: reg expression
Message-Id: <slrn7pq23s.lrq.abigail@alexandra.delanet.com>
David Cassell (cassell@mail.cor.epa.gov) wrote on MMCLVI September
MCMXCIII in <URL:news:379CFBFB.8C1793E9@mail.cor.epa.gov>:
\\ llornkcor wrote:
\\ >
\\ > I have read the FAQ (s), and am struggling with regexs.
\\
\\ Okay, that's fair.
No, it's not. The FAQ clearly suggests not to use regexes for such
problems at all.
Abigail
--
sub camel (^#87=i@J&&&#]u'^^s]#'#={123{#}7890t[0.9]9@+*`"'***}A&&&}n2o}00}t324i;
h[{e **###{r{+P={**{e^^^#'#i@{r'^=^{l+{#}H***i[0.9]&@a5`"':&^;&^,*&^$43##@@####;
c}^^^&&&k}&&&}#=e*****[]}'r####'`=437*{#};::'1[0.9]2@43`"'*#==[[.{{],,,1278@#@);
print+((($llama=prototype'camel')=~y|+{#}$=^*&[0-9]i@:;`"',.| |d)&&$llama."\n");
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: Mon, 26 Jul 1999 21:01:20 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: sort database and remove duplicates
Message-Id: <379D04E0.71B637AA@rochester.rr.com>
inlandpac wrote:
> ..
> I have a database like this:
> 100|www.pepsi.com|10|10|80|0|
> 20|www.pepsi.com|1||1|18|0|
> 20|www.pepsi.com|1|1|18|0|
> 10|www.pepsi.de|1|1|8|0
> 65|www.remark.pepsi.com|32|20|10|3|
> 44|www.pepsi.com|10|10|12|12|
> 23|www.digipepsi.net|5|15|1|2|
> 100|www.digipepsi.net|25|30|20|25|
>
> What I need to find the highest value for column 1 for all
> records per domain and remove the duplicate records.
>
> So, in this case the results be be this:
>
> 100|www.pepsi.com|10|10|80|0|
> 10|www.pepsi.de|1|1|8|0
> 65|www.remark.pepsi.com|32|20|10|3|
> 100|www.digipepsi.net|25|30|20|25|
>
> I have only gotten as far as opening the database!
...
Assuming the output order is not important, try:
while(<>){
split /\|/;
$h{$_[1]}=$_ if $_[0]>$h{$_[1]};
}
for(keys %h){
print "$h{$_}";
}
------------------------------
Date: Tue, 27 Jul 1999 10:04:37 +1000
From: e-lephant@b-igpond.com (elephant)
Subject: Re: SSI command in Perl script problem
Message-Id: <MPG.1207a2a1bc48d3ce989b81@news-server>
Steven Filipowicz writes ..
>I R A Darth Aggie writes .. (attribution painstakingly added BACK IN)
>> @results=system '/the/real/path/to/cgi-bin/countit/countit.pl';
>> print "@results visits.\n";
>
>I've tried this :
>
> @results=system
>'/opt/guide/www.gebruikte-auto.com/cgi-bin/countit/countit.pl';
> print "@results visits.\n";
Steven .. you've been given a bum steer by 'I' .. the system command
returns the status of the given command .. NOT the results of that
command
you should think of your script printing directly to the browser .. this
means that if you print an SSI then it will not be processed by the
server - it just goes straight to the browser (you can check this in your
original script by viewing the source from the browser - you will see the
SSI sitting there - unprocessed)
what you need to do if you want this behaviour is do the SSI processing
in your script .. instead of relying on the web server to do them .. so
for you - your SSI is a call to another perl script
assuming that this script takes no input you should just be able to call
it through a system call and it will print to the STDOUT - which is
passed to the web browser
however .. if it's a normal script then it will probably output at least
a Content-type header .. maybe more .. I'm sure that there are other ways
to deal with this .. but here's how I do it - using backticks
oh .. one other thing that you need to do is switch on autoflush so that
the calling script flushes its output before the called script is called
(because otherwise the called script will flush first)
#--begin
#!/usr/bin/perl -w
use strict;
$| = 1;
print "Content-type: text/plain\n\n"; # just plain text for the test
print "First\n";
my $body = 0;
for (`/usr/bin/perl -w countit.pl`)
{
unless ( $body) { $body = /^$/; }
next unless $body;
print;
}
print "Last\n";
#--end
--
jason - remove all hyphens for email reply -
------------------------------
Date: 26 Jul 1999 23:50:44 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: stopping email overflow on failure
Message-Id: <slrn7ppt6o.80l.fl_aggie@thepentagon.com>
On Mon, 26 Jul 1999 21:32:26 GMT, Steve . <syarbrou@nospam.enteract.com>, in
<379cd3c9.286008804@news.enteract.com> wrote:
[Steve is about to get the clpm-effect]
+ And I say looser cause you have no clue what you are talking about and
+ just wrote a page of crap.
More of a clue than you have, apparently. I understood what Abigail was
driving at.
+ Get a life.
Don't quit your day job to become a programmer...if you're real lucky,
someone will try to clue you in.
James
------------------------------
Date: 26 Jul 1999 23:51:43 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: stopping email overflow on failure
Message-Id: <slrn7ppt8j.80l.fl_aggie@thepentagon.com>
On Mon, 26 Jul 1999 17:40:35 -0400, toby <toby@venice.cas.utk.edu>, in
<379CD5D2.752B7938@venice.cas.utk.edu> wrote:
+ 'Let _loose_ the dogs of war' or something to that effect.
Shreds. Bits. Pieces. Ain't gonna be pretty.
James
------------------------------
Date: 26 Jul 1999 23:53:24 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: stopping email overflow on failure
Message-Id: <slrn7pptbo.80l.fl_aggie@thepentagon.com>
On Mon, 26 Jul 1999 22:09:06 GMT, Matthew Bafford <*@dragons.duesouth.net>, in
<slrn7ppm4a.1q4.*@dragons.duesouth.net> wrote:
+ Is the fish dead (which makes it difficult to find)?
In that case, use the Fish::Surface module.
HTH.
James
------------------------------
Date: 26 Jul 1999 23:58:41 GMT
From: fl_aggie@thepentagon.com (I R A Darth Aggie)
Subject: Re: stopping email overflow on failure
Message-Id: <slrn7pptlm.80l.fl_aggie@thepentagon.com>
On Mon, 26 Jul 1999 15:24:39 -0700, Lauren Smith <laurens@bsquare.com>, in
<7nin7f$fp7$1@brokaw.wa.com> wrote:
+ Steve . wrote in message <379cd3c9.286008804@news.enteract.com>...
+ >Whatever you looser. And I say looser cause you have no clue what you
+ >are talking about and just wrote a page of crap.
+ Perhaps the CS departments of various universities aren't properly
+ teaching Computer Science these days? Or maybe they aren't teaching
+ problem solving techniques to the students?
Maybe we could have a bake sale and buy the kid a copy of Knuth's
Algorithms book? ok, maybe we could have a bake say so *I* can buy a
copy of all 3 of Knuth's books...
+ The least they could do is push for better grammar and spelling.
But...but...they're not supposed to teach *that* stuff, just the KEWL
computer stuff.
+ but also your unwillingness to learn
And that's the real offense.
James
------------------------------
Date: 26 Jul 1999 18:33:02 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: stopping email overflow on failure
Message-Id: <379cfe3e@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc, tapplega@utk.edu writes:
:'Let _loose_ the dogs of war' or something to that effect.
See line twenty. Your slip is showing.
1 O, pardon me, thou bleeding piece of earth,
2 That I am meek and gentle with these butchers!
3 Thou art the ruins of the noblest man
4 That ever lived in the tide of times.
5 Woe to the hands that shed this costly blood!
6 Over thy wounds do I now prophesy
7 (Which like dumb mouths do ope their ruby lips
8 To beg the voice and utterance of my tongue),
9 A curse shall light upon the limbs of men;
10 Domestic fury and fierce civil strife
11 Shall cumber all the parts of Italy;
12 Blood and destruction shall be so in use,
13 And dreadful objects so familiar,
14 That mothers shall but smile when they behold
15 Their infants quartered with the hands of war;
16 All pity choked with customs of fell deeds:
17 And Caesar's spirit ranging for revenge,
18 With Ate by his side come hot from hell,
19 Shall in these confines with a monarch's voice
20 Cry 'Havoc' and let slip the dogs of war;
21 That this foul deed shall smell above the earth
22 With carrion men, groaning for burial.
William Shakespeare
Antony, in Julius Caesar, act 3, sc. 1
--tom
--
Aibohphobia (n.): the fear of palindromes. - A. Bierce
------------------------------
Date: Tue, 27 Jul 1999 02:14:16 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: stopping email overflow on failure
Message-Id: <Pine.HPP.3.95a.990727021117.4934F-100000@hpplus03.cern.ch>
On Mon, 26 Jul 1999, Steve . wrote:
> Whatever you looser.
Well try tightening up a little, then.
> And I say looser cause you have no clue
One can't help suspecting that you said "looser" because you are
in default of a clue.
Or maybe you just wanna let it all hang out.
One thing's clear at least: you don't understand how to post to usenet.
------------------------------
Date: Tue, 27 Jul 1999 01:24:46 GMT
From: andrew-johnson@home.com (Andrew Johnson)
Subject: Re: stopping email overflow on failure
Message-Id: <yT7n3.49$K%6.2928@news1.rdc2.on.home.com>
In article <slrn7pptbo.80l.fl_aggie@thepentagon.com>,
I R A Darth Aggie <fl_aggie@thepentagon.com> wrote:
! On Mon, 26 Jul 1999 22:09:06 GMT, Matthew Bafford <*@dragons.duesouth.net>, in
! <slrn7ppm4a.1q4.*@dragons.duesouth.net> wrote:
!
! + Is the fish dead (which makes it difficult to find)?
!
! In that case, use the Fish::Surface module.
perhaps the Schrodinger::Fish module would be more
instructive as it seems the original poster is intent
on not opening the box.
andrew
--
They're not soaking, they're rusting!
-- my wife on my dishwashing habits
------------------------------
Date: Tue, 27 Jul 1999 00:22:25 GMT
From: NetNation <batyam@my-deja.com>
Subject: Vancouver PERL PRgrammer
Message-Id: <7niu3r$7nj$1@nnrp1.deja.com>
Hello, we are still seeking a full time PERL (Linux/UNIX) Programmer
for an interesting Internet company, so if you are interested or know
somone, here are the details.
Thanks,
Under the supervision of the Systems Manager, you will be responsible
for the development of the company's infrastructure. Successful
candidates shall have the following skills :
Minimum 1 year software development experience using Perl in a Unix
environment;
SQL programming experience will be a definite asset;
C, Javascript, and Java programming experience would be assets;
B.Sc. Computing Science or equivalent experience and education.
Salary and benefits vary depending on experience
--
Human Resources
NetNation Communications Inc.
Vancouver, BC, Canada
resumes@netnation.com www.netnation.com
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 266
*************************************