Re: Sending a location Header

2003-01-12 Thread Rob Richardson
Greetings! I have successfully added the new functionality to the script I have been upgrading. Now the old functionality doesn't work. When I try to use it, I get an error page announcing Error 500, Internal Server Error. The log file contains the following message: Premature end of script

Apples and Oranges Revisited

2003-01-12 Thread Bob Williams
Last week, I requested help in a script that would compare two lists, and print the results in a third list - the results being just the items that occured in BOTH lists. You came thru with some good help. Posted below is the script I used - including some slight modifications for my web site.

Re: funny characters in form field

2003-01-12 Thread Michael Kelly
On Sat, Jan 11, 2003 at 09:41:37PM -0500, [EMAIL PROTECTED] wrote: In a message dated 1/11/2003 8:55:37 PM Eastern Standard Time, [EMAIL PROTECTED] writes: When processing the form the date in this format 3/1/2003 is converted to 3%2F1%2F2003. Can someone give me a regex to convert it

Re: Sending a location Header

2003-01-12 Thread Octavian Rasnita
Can you provide the code? You should print the header for your page. The header always have 2 blank lines after, so you should use either: print Location: $url\n\n; or print Content-type: text/html\n\n; or print eof; Set-Cookie: name=value; path=/cgi-bin/; expires=Sun, 12-Jan-2003 17:02:20 GMT

slice indexing

2003-01-12 Thread Bryan Harris
I need to slice an array such that it gives me the first through the 4th to last in a variable length array. I thought I could just do: @comments[0..-4] but Perl seems to choke on this. It's perfectly okay with a slice using two negative #s: @comments[-2..-4] Anyone know why it doesn't

Re: slice indexing

2003-01-12 Thread John W. Krahn
Bryan Harris wrote: I need to slice an array such that it gives me the first through the 4th to last in a variable length array. I thought I could just do: @comments[0..-4] but Perl seems to choke on this. It's perfectly okay with a slice using two negative #s:

hash of arrays

2003-01-12 Thread Nicole Seitz
hi there! I've got a problem with a complex data structure and hope you can help me. I know that I can't have a hash whose values are arrays. So I tried to build a hash of references to arrays. I guess I've made some mistakes . This is what my hash looks like: %myHash = (); # lots of

RE: hash of arrays

2003-01-12 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Nicole Seitz wrote: hi there! I've got a problem with a complex data structure and hope you can help me. I know that I can't have a hash whose values are arrays. So I tried to build a hash of references to arrays. I guess I've made some mistakes . This is what my hash looks

Re: slice indexing

2003-01-12 Thread Rob Dixon
Rob Dixon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Hi Bryan Bryan Harris [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I need to slice an array such that it gives me the first through the 4th to last in a variable length array. I

Removing strings

2003-01-12 Thread dan
Hey, I have a slight dilemma which i'm struggling to overcome. Wondering if anyone has any ideas on this.. I have a variable, for example's sake, say $variable. $variable has a load of entries. $variable = danneh blah dan etc danster; What i want to do, without having to set the entire string

Re: tail + count

2003-01-12 Thread Mark Goland
if (!$ARGV[0]){ die(you've forgotten to enter the file name\n); } if (!$ARGV[1]) { $n = 9; # output 10 rows by default } else { $n = $ARGV[1]-1; } what if the user enters, script.pl 8 ??? This wil try to open a file 8 and dump last 9 lines of it. if( $#ARGV !=

Re: hash of arrays

2003-01-12 Thread Rob Dixon
Hi Nicole Nicole Seitz [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi there! I've got a problem with a complex data structure and hope you can help me. I know that I can't have a hash whose values are arrays. So I tried to build a hash of references to

Re: Removing strings

2003-01-12 Thread John W. Krahn
Dan wrote: Hey, I have a slight dilemma which i'm struggling to overcome. Wondering if anyone has any ideas on this.. I have a variable, for example's sake, say $variable. $variable has a load of entries. $variable = danneh blah dan etc danster; What i want to do, without having to

Re: hash of arrays

2003-01-12 Thread John W. Krahn
Nicole Seitz wrote: hi there! Hello, I've got a problem with a complex data structure and hope you can help me. I know that I can't have a hash whose values are arrays. So I tried to build a hash of references to arrays. I guess I've made some mistakes . This is what my hash

Re: Removing strings

2003-01-12 Thread dan
Excellent, worked! Cheers Dan John W. Krahn [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dan wrote: Hey, I have a slight dilemma which i'm struggling to overcome. Wondering if anyone has any ideas on this.. I have a variable, for example's sake, say

Re: No suitable installation target for package G

2003-01-12 Thread Bob X
David Eason [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What does the error No suitable installation target for package ... mean? I am using ppm 3.0.1 from perl 5.8.0 build 802. ppm describe G Name: G Version: 4.1 Author: Jan

Re: Remove some, not all \n from a text block

2003-01-12 Thread Alan C.
Rob Dixon wrote: Alan C. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rob Dixon wrote: my $last = undef; while () { next unless defined $last; chomp $last unless /^\./; print $last; } continue { $last = $_; }

Re: build an array from a pattern match?

2003-01-12 Thread Michael Kelly
On Sat, Jan 11, 2003 at 02:00:58PM -0800, John W. Krahn wrote: Rob Dixon wrote: Michael Kelly [EMAIL PROTECTED] wrote # print out all the captured numbers map{ print $_\n; } @numbers; Hi Michael. May I warn against using 'map' in a void context like this? It'll work, sure, but

Re: ppm: No suitable installation target for package G

2003-01-12 Thread Jenda Krynicky
From: David Eason [EMAIL PROTECTED] What does the error No suitable installation target for package ... mean? I am using ppm 3.0.1 from perl 5.8.0 build 802. It means that PPM did not find the right version of the module for your version of Perl. ppm describe G Sorry I forgot to upload the

Re: possible improvement(s)

2003-01-12 Thread Jenda Krynicky
From: Yacketta, Ronald [EMAIL PROTECTED] I am sure someone out their in Perl land can offer a better solution to the following. ### ### slurp in all the required data for the report ### open ($LOG,cat $g_logdir/OrderServer-*.log|)

Titlecase

2003-01-12 Thread David Gerler
Hi, I have a line of text that is all uppercase and I need to change it to titlecase. i.e. THIS IS THE LINE needs to become This Is The Line. I can make it all lower case using tr///. I have researched in my books and found that and the \u to for making the next character titlecase but

slice indexing

2003-01-12 Thread Bryan Harris
I need to slice an array such that it gives me the first through the 4th to last in a variable length array. I thought I could just do: @comments[0..-4] but Perl seems to choke on this. It's perfectly okay with a slice using two negative #s: @comments[-2..-4] Anyone know why it doesn't

Problem Installing NMS FormMail

2003-01-12 Thread Mike Butler
I'm trying to install the NMS FormMail program on a clients web site. I think that I have done everything correctly but when I test the script I get the following error message: Application Error An error has occurred in the program close sendmail pipe failed, mailprog=[/usr/sbin/sendmail -oi

Re: Titlecase

2003-01-12 Thread Stefan Lidman
David Gerler wrote: Hi, I have a line of text that is all uppercase and I need to change it to titlecase. i.e. THIS IS THE LINE needs to become This Is The Line. I can make it all lower case using tr///. I have researched in my books and found that and the \u to for making the next

Re: Titlecase

2003-01-12 Thread Rob Dixon
perldoc -q capitalize /R David Gerler [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I have a line of text that is all uppercase and I need to change it to titlecase. i.e. THIS IS THE LINE needs to become This Is The Line. I can make it all lower

Re: Remove some, not all \n from a text block

2003-01-12 Thread Rob Dixon
Alan C. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rob Dixon wrote: Alan C. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rob Dixon wrote: my $last = undef; while () { next unless defined

Re: Best way to return largest of 3 Vars?

2003-01-12 Thread Tim Musson
Hey Jenda, My MUA believes you used Pegasus Mail for Windows (v4.02a) to write the following on Sunday, January 12, 2003 at 2:08:13 PM. JK Which one would you rather do? :-) Looking back through the thread, I think we are both arguing that the one to use is... my $max = (sort {$b=$a}

Re: Removing a specific value from a hash whose keys contains multiple values

2003-01-12 Thread Dave K
Sophia, et al If you know in advance the array index then use splice. If you know only the value you want to remove (and you like map...): #/usr/bin/perl -w use strict; my %compilers = ( system1 = ['compiler_a'], system2 = ['compiler_b', 'compiler_c','compiler_d'], system3 = ['compiler_e'],

Printing Output To Screen.

2003-01-12 Thread Korthrun
I have written a program in perl that collects some data and prints it to the screen based on parameters that are given on the command line (gee original idea for perl eh). Most of the time there are more lines in the file being printed than there are on my display. I would like to get it to

Re: Removing strings

2003-01-12 Thread dan
Moving on, same subject/problem, but slightly different scenario.. In my next variable $variable2, i have entries: $variable2 = #ha #bad #cod #ba #dog; Basically, i want to be able to remove #ba, without removing #ba from #bad, so it ends up: $variable2 = #ha #bad #cod #dog; This also needs to

RE: Printing Output To Screen.

2003-01-12 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Korthrun wrote: I have written a program in perl that collects some data and prints it to the screen based on parameters that are given on the command line (gee original idea for perl eh). Most of the time there are more lines in the file being printed than there are on my display. I would

Re: possible improvement(s)

2003-01-12 Thread John W. Krahn
Jenda Krynicky wrote: From: Yacketta, Ronald [EMAIL PROTECTED] I am sure someone out their in Perl land can offer a better solution to the following. ### ### slurp in all the required data for the report ### open ($LOG,cat

String Stripping?

2003-01-12 Thread [EMAIL PROTECTED]
Hello all, I need to strip some HTML tags from a stringHowever, the complete tags are not consistent, so I would like to remove all the text between certain strings I specify.regardless of what is between them! For example: I would like to remove all the text starting with

RE: String Stripping?

2003-01-12 Thread Toby Stuart
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, January 13, 2003 1:25 PM To: [EMAIL PROTECTED] Subject: String Stripping? Hello all, I need to strip some HTML tags from a stringHowever, the complete tags are not consistent, so I

Re[2]: possible improvement(s)

2003-01-12 Thread Yacketta, Ronald
Hello Jenda, JK Why don't you open the file directly? JK open ($LOG,$g_logdir/OrderServer-*.log) JK or die ( Unable to open $g_logdir/OrderServer-*.log : $!); JK or am I misunderstanding something? I will give that a whirl in the AM, could have sworn I tried that and

Re[2]: build an array from a pattern match?

2003-01-12 Thread Irina Volkova
Michael Kelly [EMAIL PROTECTED] wrote On Sat, Jan 11, 2003 at 02:00:58PM -0800, John W. Krahn wrote: Rob Dixon wrote: Michael Kelly [EMAIL PROTECTED] wrote # print out all the captured numbers map{ print $_\n; } @numbers; Hi Michael. May I warn against using 'map' in a

Re[2]: Titlecase

2003-01-12 Thread Irina Volkova
Stefan Lidman [EMAIL PROTECTED] wrote: David Gerler wrote: Hi, I have a line of text that is all uppercase and I need to change it to titlecase. i.e. THIS IS THE LINE needs to become This Is The Line. I can make it all lower case using tr///. I have researched in my books