[12591] in Perl-Users-Digest
Perl-Users Digest, Issue: 6192 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 1 13:07:14 1999
Date: Thu, 1 Jul 99 10:01:46 -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 Jul 1999 Volume: 8 Number: 6192
Today's topics:
Re: How to store hashes (Neko)
INC not working properly <dlewright@nuworld.com>
Re: inplace edit (M.J.T. Guy)
Lingua::EN::Infinitive 1.03 <Savage.Ron.RS@bhp.com.au>
Re: Modules on Win32 (William Herrera)
newbie in PERL: Can you please suggest a solution? info@sisblansko.cz
Re: newbie in PERL: Can you please suggest a solution? <cantrela@agcs.com>
offline mode: Command to continue is??? <fetch@fetchound.com>
Re: offline mode: Command to continue is??? <martin@adoma.se>
perl and xml, xsl, html bodhyfryd@my-deja.com
Re: perl and xml, xsl, html <robin@netgates.co.uk>
Re: regexp riddle <anonymous@web.remarq.com>
Removing C and C++ comments (Brandon Metcalf)
rough time with files <mikecard@my-deja.com>
Re: rough time with files (Brian Pontz)
Re: rough time with files (Jerome O'Neil)
running perl script gqc2017@my-deja.com
Re: running perl script <martin@adoma.se>
Re: Saving both exit status and output from a command (TM Lehto)
Re: Saving both exit status and output from a command <cantrela@agcs.com>
Re: sgid perl problems (SNAFU)
SSI EXEC w/ POST? jeffhsu@my-deja.com
SSI exec with POST? jeffhsu@my-deja.com
text editing question???? <ray_mccormack@vcd.hp.com>
Re: Tied hash not scaling - advice? (William Herrera)
Top 10 responses to the Robot/email idea <nolanj00@mh.us.sbphrd.com>
VCS::CVS 2.00 <Savage.Ron.RS@bhp.com.au>
write and Page Size i.e. number of rows (David Broderick)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 1 Jul 1999 16:25:00 GMT
From: tgy@chocobo.org (Neko)
Subject: Re: How to store hashes
Message-Id: <7lg4os$dbo$0@216.39.141.200>
On Thu, 01 Jul 1999 06:48:30 GMT, bart.lateur@skynet.be (Bart Lateur) wrote:
>I'm taking about "real live data". Many (most?) DB engines don't even
>allow tabs or newlines in their data fields. Most users never miss it.
>
>You *can* encode tabs and newlines (and backslashes) like this, if you
>must:
>
> local($\,$,) = ("\n","\t");
> foreach $key (keys %hash) {
> my $value = $hash{$key};
> $value =~ s/([\\\n\t])/{ "\\" => "\\\\", "\n" => "\\n",
> "\t" => "\\t"}->{$1}/ge;
The /e modifier is unnecessary. Instead of evaluating the code for the hash
ref every time you hit a backslash, newline or tab, move it outside the loop.
my %encode = (
'\\' => '\\\\',
"\n" => '\n',
"\t" => '\t',
);
And then...
$value =~ s/([\\\n\t])/$encode{$1}/g;
> print $key,$value;
$key needs encoding also.
> }
--
Neko | tgy@chocobo.org | Will hack Perl for a moogle stuffy! =^.^=
------------------------------
Date: Thu, 01 Jul 1999 16:47:00 GMT
From: Dorr Lewright <dlewright@nuworld.com>
Subject: INC not working properly
Message-Id: <377B9B82.6A76347A@nuworld.com>
I am new to Perl, and when I attempt to use the "use" command, I get the
message "Can't locate strict.pm in @INC (@INC contains: .) at
D:\NCH\PERL\myscript.plx line 23." I am working on Windows NT 4.0 (I
came from a Solaris shop to an NT shop).
I have attempted to set INC various ways as you can see in the script
below. Where should INC be set? Any other ideas on coding would be
appreciated.
Thanks, ...
Dorr Lewright
dlewright@nuworld.com
#!perl -w
#!perl -T
#!perl -V
print "INC = @INC\n";
print "ENV{PATH} = $ENV{'PATH'}\n";
# Trying to set the environment variable INC.
#`SET
INC="d:/Perl/5.005/lib;d:/Perl/site/5.005/lib;d:/Perl/site/5.005/lib/File"`;
# Trying to set the local variable INC.
#INC="d:/Perl/5.005/lib;d:/Perl/site/5.005/lib;d:/Perl/site/5.005/lib/File";
# Trying to set the local variable INC using pop and push.
pop @INC;
print "After pop; INC = @INC\n";
push @INC, ';d:/Perl/5.005/lib';
push @INC, ';d:/Perl/site/5.005/lib';
push @INC, ';d:/Perl/site/5.005/lib/File';
print "After push; INC = @INC\n";
# Trying to set the local variable INC using array offsets.
#$INC[0]="d:/Perl/5.005/lib";
#$INC[1]="d:/Perl/site/5.005/lib";
#$INC[2]="d:/Perl/site/5.005/lib/File";
#d:\Perl\site\5.005\lib;d:\Perl\site\5.005\lib\File";
print "INC = @INC\n";
# Trying to set the local library path.
#use lib 'd:\Perl\5.005\lib';
use strict;
#use diagnostics -verbose;
#use File::stat;
#use Time::localtime;
#use File::Copy;
##########################################################
## Main program Begins
here.
#
##########################################################
# Program accepts first argument as directory path.
$dir= shift || '.';
$dir = "D:\\NCH\\PERL\\Input";
#$dir = "D:"
print "dir = $dir\n";
# Open the input directory.
opendir(DIR, $dir) or die "Can't open directory $dir: $!\n";
# Loop through all files in the directory, except for ., and ..
foreach $file (grep(!/^\./, readdir(DIR))) {
print "Next file = $file\n";
# Initialize variables.
$lines = 0;
$rtlr_lines = 0;
$file_size = 0;
$first_line = 1;
# Retrieve the file size from the stat command structure.
@myarray = stat($file);
#print "'\@myarray = ' @myarray \n";
# Get the file size from the stat command.
$file_size = $myarray[7];
# Would like to use the pointer to file size.
#$file_size = stat($file)->size_t;
print "file_size = $file_size \n";
# Move the file to the processing directory.
#system('COPY' $file "../Processing");
#$rc = `HELP COPY`;
#print $rc;
system("COPY AA, ../Processing/AA");
#system("COPY $file, ../Processing/$file");
$rc = $?;
print "return code from COPY = $rc\n";
$file_path = "../Processing/$file";
print "Next file_path = $file_path\n";
# Process the file.
open(FILE, $file_path) or die "Can't open file $file: $!\n";
# Read the file in 4K sections.
while (sysread FILE, $buffer, 4096) {
#print "buffer = $buffer\n";
# Increment the number of lines in the file by the number
# of newline characters in the buffer.
$lines += ($buffer =~ tr/\n//);
# If the first line (buffer) of the file, check for the
# number of lines in the file as per the file creator.
if ($first_line == 1) {
$rtlr_text = substr($buffer, 0, 2);
# Check to see if this is a POS MVMT file.
if ($rtlr_text eq "RT") {
$rtlr_lines = substr($buffer, 2, 7);
print "rtlr_lines = $rtlr_lines\n";
}
}
$first_line = 0;
}
close FILE;
print "File $file contains $lines lines.\n";
if ($lines != $rtlr_lines) {
print "INVALID NUMBER OF LINES IN FILE $file\n";
}
}
closedir(DIR);
------------------------------
Date: 1 Jul 1999 16:35:01 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: inplace edit
Message-Id: <7lg5bl$aqo$1@pegasus.csx.cam.ac.uk>
In article <377A836C.2E063F55@cs.sandia.gov>,
Kenneth Massey <kpmasse@cs.sandia.gov> wrote:
>Here is the sum content of those 2 files on that subject:
>
>$INPLACE_EDIT
>$^I
>
> The current value of the inplace-edit extension. Use undef to
>disable inplace editing. (Mnemonic: value of -i switch.)
Nope. That's the content of perlvar on the subject. I included the
pointer to perlrun since there isn't an explicit crossreference in
perlvar, and it might not have been entirely obvious that "-i switch"
was a reference to perlrun. Terrible mistake, trying to be helpful.
You have to do *some* of the work yourself, you know.
Mike Guy
------------------------------
Date: 1 Jul 1999 16:02:59 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: Lingua::EN::Infinitive 1.03
Message-Id: <7lg3fj$js2$1@play.inetarena.com>
Name:
Lingua::EN::Infinitive.pm - Find the infinitive form of a conjugated word
Note:
The Perl module Lingua::EN::Infinitive V 1.03 is now on CPAN,
and on my web site
http://www.savage.net.au/
Recent changes:
1.03 26-May-99
--------------
o Ensure POD survives buggy pod2man
o Ship Readme.txt, the output of pod2text
1.02 19-Apr-99
--------------
o Patch Makefile.pl to support ActivePerl's ppm.
--
Ron Savage
Office (preferred): Savage.Ron.RS@bhp.com.au
Home: rpsavage@ozemail.com.au
http://www.ozemail.com.au/~rpsavage
------------------------------
Date: Thu, 01 Jul 1999 03:00:04 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: Modules on Win32
Message-Id: <377ad8b5.36141644@news.rmi.net>
On Wed, 30 Jun 1999 18:12:50 GMT, Jordan Hiller <hiller@email.com>
wrote:
>This must be a FAQ but I can't find the answer anywhere...
>
>I run ActiveState's Perl for Win32 on my Windows 98 machine. How do I install
>modules from CPAN?
PPM installs the Activestate packages, some of which are also on CPAN.
For the CPAN native packages from a CPAN site do this:
First, make sure you have cpan.pm (should be in perl/lib)
run
perl -MCPAN -e shell;
from the directory CPAN.pm is in. Configure. Use. The directories CPAN
creates for new modules are a bit strange sometimes for a win32
installation. Move if necessary.
Should be in some FAQ, I hope.
---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.
------------------------------
Date: Thu, 01 Jul 1999 14:53:49 GMT
From: info@sisblansko.cz
Subject: newbie in PERL: Can you please suggest a solution?
Message-Id: <7lfvdn$fi2$1@nnrp1.deja.com>
I have several fields such as First name, Surname, Address and
Age.(They can be separated by commas on one line like a text file). I
need to allow users to add, save, browse, choose and possibly delete
records(lines). I think the best solution would be to use a database but
it seem to be rather difficult in PERL. Is there a more simple way how
to do it in PERL? Thanks for an advice.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 09:02:15 -0700
From: Andy Cantrell <cantrela@agcs.com>
To: info@sisblansko.cz
Subject: Re: newbie in PERL: Can you please suggest a solution?
Message-Id: <377B9107.C11162CF@agcs.com>
info@sisblansko.cz wrote:
>
> I have several fields such as First name, Surname, Address and
> Age.(They can be separated by commas on one line like a text file).
> I need to allow users to add, save, browse, choose and possibly
> delete records(lines). I think the best solution would be to use
> a database but it seem to be rather difficult in PERL. Is there a
> more simple way how to do it in PERL? Thanks for an advice.
Not sure what you're starting with.
If you have a text file to start with, using your favorite text
editor to add/del/etc would be a tried and true method. But
you seem intent on using PERL to do the job. Sounds like a
real first class project to play with.
Perl works great on database's. To say "use a database" is
being broadly generic. You can make your database as complex
(hash of hash's, DBMfiles - sort of thing) or as simple (single
line entries separated by commas) as you want. If you ever plan
on allowing the program to be shut down and restarted, the only
way I can think of to avoid using a database would be to send
the information to a printer and ask the user to re-enter all
the data the next time they start the program. That sort of
thing gives programmers a bad name.
Just how the database is to be defined can vary greatly on
how many bells and whistles you want to add to the program.
Will your users be limited to what records can be altered (only
their own or everybody's)? Will they have to enter commands to
select what field is to be changed? (e.g. chg_first_name <new_val>)
Are duplicate names going to be allowed? (I know at least two
people named Tim Smith) What amount of error checking do you need?
What if someone does not enter a first name or state that their age
is over 300 years? What if two different users bring up the
program at the same time? Will each get their own copy of the
'user list' to alter? Can the second person overwrite the
changes the first user may have entered? Will the user need to
enter command line arguments, analogous to a line editor, to
make changes? Or will they get a GUI to enter the changes?
--
Andy Cantrell - cantrela@agcs.com
AG Communication Systems
Office (AZ) (623) 582-7495 (Voice mail)
Office (WI) (414) 249-0215
Modem (WI) (414) 249-0239
------------------------------
Date: Thu, 01 Jul 1999 07:59:27 -0800
From: Tomh <fetch@fetchound.com>
Subject: offline mode: Command to continue is???
Message-Id: <930844769.24168@www.remarq.com>
Hi,
When running a script from the command line in the shell, I
sometimes get the following message:
(offline mode: enter name=value pairs on a standard input)
I can not remember how to bypass the message and keep the
script running. Any hints?
Thanks for your time and input.
Tomh@idowebs.com
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Thu, 01 Jul 1999 18:16:08 +0100
From: Martin Quensel <martin@adoma.se>
Subject: Re: offline mode: Command to continue is???
Message-Id: <377BA258.2B4A5A3A@adoma.se>
Tomh wrote:
>
> Hi,
>
[cut]
> I can not remember how to bypass the message and keep the
> script running. Any hints?
ctrl-d
or ctrl-x (not sure of that one, could be "z") depending on os.
Best regards Martin Quensel
------------------------------
Date: Thu, 01 Jul 1999 15:19:00 GMT
From: bodhyfryd@my-deja.com
Subject: perl and xml, xsl, html
Message-Id: <7lg0sl$g8r$1@nnrp1.deja.com>
I know you can parse XML through XML::DOM. Very handy, but is it
possible to process XML and XSL together to produce the HTML. If not
then do we have to produce our own pseudo like xsl stuff written in
perl or am I talking bananas?. Any advice, links etc gratefully
received!
Ta.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 17:23:50 +0100
From: Robin Barooah <robin@netgates.co.uk>
Subject: Re: perl and xml, xsl, html
Message-Id: <377B9616.F24EBC5D@netgates.co.uk>
bodhyfryd@my-deja.com wrote:
>
> I know you can parse XML through XML::DOM. Very handy, but is it
> possible to process XML and XSL together to produce the HTML. If not
> then do we have to produce our own pseudo like xsl stuff written in
> perl or am I talking bananas?. Any advice, links etc gratefully
> received!
> Ta.
No you're not. This is a significant issue in the XML community. There
are a number of xsl processing engines available which do produce HTML
output from XML/XSL, but there's serious debate as to whether XSL is any
use anyway or whether we should use CSS instead.
See www.xml.com for more information on this.
--
Robin Barooah
Technical Coordinator
City NetGates Limited
------------------------------
Date: Thu, 01 Jul 1999 08:29:40 -0800
From: Ashish Kadakia <anonymous@web.remarq.com>
Subject: Re: regexp riddle
Message-Id: <930846582.24525@www2.remarq.com>
Actaully this is a smart solution..
He forgot to mention what should appear there though..
The look ahead are zero width, so it doesn't contain
anything in $& also it will match "de b" (note the space)
since it satisfies both the conditions..
Taking care of this two things, will give you a definite
answer..
**** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ****
------------------------------
Date: Thu, 01 Jul 1999 15:43:59 GMT
From: bmetcalf@nortelnetworks.com (Brandon Metcalf)
Subject: Removing C and C++ comments
Message-Id: <377b8b86.65111154@paperboy.corpeast.baynetworks.com>
I'm trying to come up with an efficient algorithm for removing C and
C++ style comments from source files. I'm doing something like the
following for C++ style comments:
s/\/\/.*$//;
And for C style comments I'm doing the following:
undef $/;
$_ = <INFILE>;
while (/\/\*/)
{
$left .= $`;
$_ = $';
die "Unterminated Comment" unless /\/*\//;
$_ = $';
}
$_ = "$left$_";
As you can see, this method requires undefining $/. Furthermore, I'm
having to parse each file twice. Can someone give a hint on a way to
achieve the same thing without parsing each file twice?
Thanks,
Brandon
------------------------------
Date: Thu, 01 Jul 1999 14:56:29 GMT
From: mike cardeiro <mikecard@my-deja.com>
Subject: rough time with files
Message-Id: <7lfvin$fl0$1@nnrp1.deja.com>
okay so i'm trying to get file processing into my brain and i thought I
would start out with something really simple.
open a file, read it and assign it to a variable and print the
variable...super simple stuff here...really...when i run this it says:
Use of uninitialized value at test.cgi line 6, <NUTS> chunk 1.
Use of uninitialized value at test.cgi line 8, <NUTS> chunk 1.
i have a file called nuts all it is is a file with 100 in the first line
heres the script, feel free to butcher me (as if you need my permission)
if i've done something totally stupid.
#!/usr/bin/perl -w
open(NUTS, "nuts") || die "no nuts: $!";
while (defined(<NUTS>)) {
chomp ($nut = <NUTS>);
}
print $nut;
close (NUTS) or die "couldn't close nuts: $!";
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 15:34:33 GMT
From: pontz@channel1.com (Brian Pontz)
Subject: Re: rough time with files
Message-Id: <377b87bc.76026870@news2.channel1.com>
On Thu, 01 Jul 1999 14:56:29 GMT, mike cardeiro <mikecard@my-deja.com>
wrote:
I'm new but try this
!/usr/local/bin/perl -w
open(NUTS, "server.log") || die "no nuts: $!";
while(<NUTS>) {
$nut = $_;
chop($nut);
print $nut;
}
close(NUTS);
Brian Pontz
>
>#!/usr/bin/perl -w
>
> open(NUTS, "nuts") || die "no nuts: $!";
>
> while (defined(<NUTS>)) {
> chomp ($nut = <NUTS>);
> }
> print $nut;
> close (NUTS) or die "couldn't close nuts: $!";
>
------------------------------
Date: 1 Jul 1999 16:18:02 GMT
From: jeromeo@atrieva.com (Jerome O'Neil)
To: pontz@channel1.com
Subject: Re: rough time with files
Message-Id: <7lg4bq$p7n$1@brokaw.wa.com>
[Posted and mailed]
In article <377b87bc.76026870@news2.channel1.com>,
pontz@channel1.com (Brian Pontz) writes:
> On Thu, 01 Jul 1999 14:56:29 GMT, mike cardeiro <mikecard@my-deja.com>
> wrote:
> while(<NUTS>) {
> $nut = $_;
> chop($nut);
> print $nut;
> }
Or even more brief.
while(<NUTS>){chomp; print}
Good Luck!
--
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947
The Atrieva Service: Safe and Easy Online Backup http://www.atrieva.com
------------------------------
Date: Thu, 01 Jul 1999 16:07:27 GMT
From: gqc2017@my-deja.com
Subject: running perl script
Message-Id: <7lg3nk$hiu$1@nnrp1.deja.com>
When I run a perl script on the iis server, I encounter an error
message "HTTP/1.1 500 Server Error". So how do I fix this problem and
where can I find the error log on iis?
Thanks
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 18:09:35 +0100
From: Martin Quensel <martin@adoma.se>
Subject: Re: running perl script
Message-Id: <377BA0CF.F575B4E0@adoma.se>
gqc2017@my-deja.com wrote:
>
> When I run a perl script on the iis server, I encounter an error
> message "HTTP/1.1 500 Server Error". So how do I fix this problem and
> where can I find the error log on iis?
>
Have you tried to run the script on the console?
(the msdos prompt if your on win95/98) what does it say there?
does it work as it should?
This is one of those questions that are really hard to help you with.
what verision of perl do you use? is your installation correct?
can you run that script on your platform? (maybee you have a win95
computer and the script tries a "flock")
seems also that this is a IIS problem (or CGI problem)..
where is the code you have problems with...what are you trying to do,
and how..
------------------------------
Date: Thu, 01 Jul 1999 15:05:22 GMT
From: hiwi1krg@iitb.fhg.de (TM Lehto)
Subject: Re: Saving both exit status and output from a command
Message-Id: <377b81d7.5042010@iitb>
On 1 Jul 1999 14:13:53 GMT, "William" <bivey@teamdev.com> wrote:
>I believe you'll find the return value in $?. Assuming the command
>returns something interesting on error vs. success, that may be what
>you need.-Wm
That was it! Thanks for quick reply!
------------------------------
Date: Thu, 01 Jul 1999 09:28:53 -0700
From: Andy Cantrell <cantrela@agcs.com>
Subject: Re: Saving both exit status and output from a command
Message-Id: <377B9745.DC6E9541@agcs.com>
TM Lehto wrote:
>
> Hello,
> How can I save exit status AND output of a command? I have RTF faq and
>
> perdoc, but couldn't find a way to do it without running command
> twice. My program works like this now:
>
> # First check that command exits without error:
> system("/some/command") and die "Error!";
> # Now I know I'm going to get output I expect (ie. no error
> # messages),so I can save the output:
> $output = `/some/command`;
> ...do something with $output...
>
> is there a way to do the same without running the command twice?
>
> Thanks,
> Tomi
Couple of thoughts:
- In your 'system' call, add an output file to dump your results.
Then if your first check passes, all you need to do is read the
file. OR, check out the O'Reilly book "Programming Perl 2nd
Edition" and read the description on 'system' from page 230. You
can use that to determine if you need to bother with the output file.
- Test "/some/command" with the -x option. May want to toss in
a loop to check the command against your $ENV{'PATH'} variable.
If that passes, run the command.
--
Andy Cantrell - cantrela@agcs.com
AG Communication Systems
Office (AZ) (623) 582-7495 (Voice mail)
Office (WI) (414) 249-0215
Modem (WI) (414) 249-0239
------------------------------
Date: 1 Jul 1999 10:15:22 -0600
From: sfreed@swcp.com (SNAFU)
Subject: Re: sgid perl problems
Message-Id: <7lg46q$d6v@llama.swcp.com>
In article <377AC496.53B52D43@idirect.com>,
John Baird <jbaird@idirect.com> wrote:
>hello,
>
>here is a simple little work around...
>chances are you have already thought of it... but incase you have not here it
>is:
>
>cat /etc/hostname > temp.file
>
>the cat cmd displays the contents of a file, and in this case we are using a
>standard redirector to a file named temp.file
I'm confused. Do you mean:
`cat /etc/hostname > temp.file`;
...or actually:
`/bin/hostname > temp.file`;
I think I'm missing something. ...or actually a couple things, since I am
clueless as to why it won't let me do it my original way and just untaint
the variable:
use Sys::Hostname;
$hostName = hostname();
TIA for shedding a little light on this.
--
Josh.
------------------------------
Date: Thu, 01 Jul 1999 16:33:08 GMT
From: jeffhsu@my-deja.com
Subject: SSI EXEC w/ POST?
Message-Id: <7lg584$i7t$1@nnrp1.deja.com>
Is it possible to use the POST method with the
"exec" SSI? It seems that exec uses GET by default
with the QUERY_STRING but is it possible how to
use POST and feed it input through STDIN?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 16:39:30 GMT
From: jeffhsu@my-deja.com
Subject: SSI exec with POST?
Message-Id: <7lg5k0$icm$1@nnrp1.deja.com>
I'm having the hardest finding documentation on whether you can use the
SSI exec with the POST method. Exec uses QUERY_STRING which is used by
GET but is it possible to use the POST method instead and feed
paramaters with STDIN?
In short...
Can you use the POST method with <!--#exec......>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
Date: Thu, 01 Jul 1999 09:51:14 -0700
From: Ray McCormack <ray_mccormack@vcd.hp.com>
Subject: text editing question????
Message-Id: <377B9C82.9916F60C@vcd.hp.com>
I have the following simple perl script. The intent was to run this on
a bunch of web pages so that the text inside placed into the $_ variable
would be inserted into the file right where the first <br> appears.
Perl does not like the line formating I have ... Is there something
special I am supposed to do to make this work?
#!usr/bin/perl -w
$^I = '.old';
$iterate=0;
while (<>) {
if (m/<BR>/s) {
if ($iterate) {
$_="<sidebar width=138 align=left>
<table cellpadding=0 cellspacing=0 border=0>
<tr><TD colspan=1 ALIGN=CENTER valign=top bgcolor=#000000><br><a
href="http://www.hp.com/go/webtvprint"><img HSPACE=0 VSPACE=0 border=0
src="../pix2/hplogob.gif"></a></td>
<td bgcolor="#000000" width=10><font
size="-2"> </font></td></tr>
<tr colspan=1><TD ALIGN=CENTER bgcolor=#000000>
<img src=../pix/15h15w.gif><br>
<a href="howdoi.html"><img border=0 src=../pix/how_ani.gif><br><img
vspace=7 border=0 src=../pix/chowdoi.gif></a><br><img
src=../pix/15h15w.gif><br>
<a href="problems.html"><img border=0 src=../pix/prob_ani.gif><br><img
vspace=7 border=0 src=../pix/cproblem.gif></a>
<BR clear="all"><a
href="http://proact.hp.com:5050/escforum/internet.html">
<img border=0 src="../pix/cupani.gif"><BR><img border=0
src="../pix/saucer.gif"><br><img border=0 src=../pix/qa.gif></a>
<br> <br>
</td><TD bgcolor=#000000> </td>
</TR></TABLE>
</sidebar><ul>
<br>";
$iterate++;
}
}
print;
}
--
*******************************************************************
* Ray McCormack * R&D Software Design Engineer *
*******************************************************************
* Hewlett Packard * email: ray_mccormack@vcd.hp.com *
* Vancouver Division * voice: 360-212-6335 *
* 1115 SE 164th Avenue * fax: 360-212-3960 *
* Vancouver, WA 98683 * *
*******************************************************************
* Sail Smart, Sail Hard, then think about Sailing Fast !!!! *
*******************************************************************
------------------------------
Date: Thu, 01 Jul 1999 03:08:14 GMT
From: posting.account@lynxview.com (William Herrera)
Subject: Re: Tied hash not scaling - advice?
Message-Id: <377adb2b.36771871@news.rmi.net>
On Wed, 30 Jun 1999 04:54:32 GMT, snowhare@long-lake.nihongo.org
(Benjamin Franz) wrote:
>The best fix is to get Berkeley DB 2.x installed.
Is this something that CPAN.pm can do? If so, which CPAN module
installs DB_File with db 2.0 ?
---
The above from: address is spamblocked. Use wherrera (at) lynxview (dot) com for the reply address.
------------------------------
Date: Thu, 01 Jul 1999 09:52:13 -0400
From: John Nolan <nolanj00@mh.us.sbphrd.com>
Subject: Top 10 responses to the Robot/email idea
Message-Id: <377B728D.8C43F0C1@mh.us.sbphrd.com>
Also sprach Uri Guttman on comp.lang.perl.matri^h^h^h^h^hmoderated:
>
> i had this thought at yapc, why not create some form of an infobot for
> misc to handle the volume of faq's and newbies.
[snip]
> anyone interested in a group project like this? flame away!
Top 10 responses to the robot idea:
10. Celebrity Death Match: Perl's "Miscy" vs. MSOffice's "Clippy"!
9. What percentage of emails from "Miscy" would
say "wish I knew!" or "no idea" ?
8. What if purl tried to post something? Would Miscy
answer? Would they exchange information, or would they
call each other "newbie" and scoff at each other?
(And do we really care?)
7. Alongside the new c.l.p.m. Infobot, we also can create
a c.l.p.m. Contempt-bot. Not to spread information, but to
send degrading comments to new users. (This would
*really* take a load off the gurus' shoulders.)
6. Perl's motto is no longer "There's more than one way
to do it." The new motto is "Somebody, somewhere
already asked that question, and we answered it,
so you're not allowed to ask it, you moron, now go away
and stop pestering us. We have important things
to discuss." It's longer, but more accurate.
5. Agent Smith says "Newbies are not actually mammals!
Newbies are a VIRUS!" ("...Never send a human to
do a machine's work!")
4. The newbies will retaliate with a "social skills" bot.
Miscreant Perl gurus will get a special email with
expert advice on basic social ineraction, free,
automatically, each and every time they manifest
their impatience, arrogance and lack of sensitivity.
3. O'Reilly's latest book: "Stifling Usenet Questions:
How to Shame Users Into Silence and Passivity."
2. O'Reilly's other latest book: "The Zen of Perl:
only those who know the answers are allowed
to ask questions."
(Alternate subtitle: "If you have to ask, then shut up.")
1. I thought Tom Phoenix was the bot!
You mean he's a real person?
This top ten list was posted by a voicemail system.
To post a follow-up, please press "one", and wait for the beep.
A friendly automated service program will assist you shortly.
Hope this helps!
--
John Nolan
nolanj00 (at) mh us spbhrd com
------------------------------
Date: 1 Jul 1999 16:03:07 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: VCS::CVS 2.00
Message-Id: <7lg3fr$js9$1@play.inetarena.com>
Name:
VCS::CVS.pm - Interface to GNU's CVS
Note:
The Perl module VCS::CVS V 2.00 is now on CPAN,
and on my web site
http://www.savage.net.au/
Note re new():
The previously-used technique of position-dependent parameters is no longer
supported.
Note re VCS.pm:
My module VCS::CVS is independent of VCS, altho I hope one day they can be
combined.
Recent changes:
2.00 17-Jun-99
--------------
o Change parameters to new(). It now accepts an anonymous hash.
o Add history parameter to new()
o Add history(). It accepts an anonymous hash of 'cvs history' parameters,
and returns a ref to a list
o Add update(). It accepts an optional boolean to active the -n in
'cvs update -n', and returns a ref to a list
o Fix 2 bugs whereby chdir() was called at the wrong time
1.04 26-May-99
--------------
o Ensure POD survives buggy pod2man
o Ship Readme.txt, the output of pod2text
1.03 19-Apr-99
--------------
o Patch Makefile.PL to support ActivePerl's ppm.
--
Ron Savage
Office (preferred): Savage.Ron.RS@bhp.com.au
Home: rpsavage@ozemail.com.au
http://www.ozemail.com.au/~rpsavage
------------------------------
Date: 1 Jul 1999 16:15:41 +0100
From: db@maths.tcd.ie (David Broderick)
Subject: write and Page Size i.e. number of rows
Message-Id: <7lg0mt$jg4@salmon.maths.tcd.ie>
Keywords: perl,write, pagesize
Hi,
I am trying to print a report, from a stored procedure, and then
to turn the subsequent file into html/pdf/etc. Ho can I tell the write
func about my page size. I would like to be able to control this as a
command line argument to my filter program.
Any pointers welcome.
David Broderick
db@maths.tcd.ie
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 6192
**************************************