Re: Output of a command executed by system

2004-10-21 Thread Sean Davis
If the output is to stderr for some reason, you could try /dev/null. Sean On Oct 21, 2004, at 7:36 AM, Jan Eden wrote: Hi, this must be simple, but I cannot seem to find it: When executing a command via system within a CGI script, the command's output appears in my browser. I do not use

Re: Output of a command executed by system

2004-10-21 Thread Jan Eden
Hi Sean, Sean Davis wrote on 21.10.2004: If the output is to stderr for some reason, you could try /dev/null. Sorry, there was a typo in my initial attempt to redirect. It works as expected with /dev/null. Thanks, Jan -- Common sense is what tells you that the world is flat. -- To

Using $CGI::POST_MAX

2004-10-21 Thread Bill Stephenson
I'm using this line in my script: $CGI::POST_MAX = $CGI::POST_MAX = 30720; # 30k I tested it to see if it works and it did not process the form and write the data to a file when the data entered exceeded the amount specified. That's great, but I can't find a way in Lincoln's book to

Re: Using $CGI::POST_MAX

2004-10-21 Thread Gunnar Hjalmarsson
Bill Stephenson wrote: I'm using this line in my script: $CGI::POST_MAX = $CGI::POST_MAX = 30720; # 30k I tested it to see if it works and it did not process the form and write the data to a file when the data entered exceeded the amount specified. That's great, but I can't find a way in

RE: .txt To Mysql.......roy

2004-10-21 Thread Roime bin Puniran
Hi... I have tried to find if any PERL module can do my task..And i found that File::Spac can do what i am to do..It's allow us to concatenate several .*txt file and sort it into one text file..But, i don't make any perl script on it, because i jst wanna see some examples first, to avoid me

RE: .txt To Mysql.......roy

2004-10-21 Thread Roime bin Puniran
Hi... I have tried to find if any PERL module can do my task..And i found that File::Spac can do what i am to do..It's allow us to concatenate several .*txt file and sort it into one text file..But, i don't make any perl script on it, because i jst wanna see some examples first, to avoid me

Re: Parsing multiline data

2004-10-21 Thread Bee
use strict; open F, sourcefile.txt; local $/ = \n\n; my @sections = F; close F; print Section $_ :\n $sections[$_]\n\n for @sections; HTH, Bee - Original Message - From: Kevin Old [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 21, 2004 10:27 AM Subject: Parsing

need help with upload files.

2004-10-21 Thread Anish Kumar K.
I wrote a script to upload one file to one location. The HTML files reads a particular file using input type=file and in the form action I have called upload.pl file. in the upload.pl file... $upload_dir = /home/anish/upload; $filename = $q-param(filename); $email_address =

Perl / Html / cgi / php /

2004-10-21 Thread Charlene Gentle
Hi I would like to know what is the best method and how to use it. I have a html page with a question. The user submit the question. I want the answer to be sent to a perl script that test it for stuff, and the the perl script must send the result back to the html. The html must display the

Re: Broken Subroutine

2004-10-21 Thread Gunnar Hjalmarsson
John W. Krahn wrote: Gunnar Hjalmarsson wrote: Here the loop is finished, but nothing is returned from the subroutine. return @basenames; Actually, something IS returned, it is just not something that the OP expects or wants. Yeah, I suppose it returns the null-string. Thanks for the correction.

Re: Perl / Html / cgi / php /

2004-10-21 Thread Chris Devers
On Thu, 21 Oct 2004, Charlene Gentle wrote: I would like to know what is the best method and how to use it. I have a html page with a question. The user submit the question. I want the answer to be sent to a perl script that test it for stuff, and the the perl script must send the result

Re: Parsing multiline data

2004-10-21 Thread David le Blanc
On Thu, 21 Oct 2004 14:55:28 +0800, Bee [EMAIL PROTECTED] wrote: use strict; open F, sourcefile.txt; local $/ = \n\n; my @sections = F; close F; print Section $_ :\n $sections[$_]\n\n for @sections; What are you doing to poor Kevin? If you meant: print Section $_:\n

Re: Parsing multiline data

2004-10-21 Thread Bee
print Section $_ :\n $sections[$_]\n\n for @sections; What are you doing to poor Kevin? If you meant: print Section $_:\n $sections[$_]\n\n for 0..$#sections; then I'll forgive you :-) Oops. What a mistake !! Thousands sorry... ( I can't forgive myself ) ~^.^~ Bee --

Re: Perl / Html / cgi / php /

2004-10-21 Thread Wiggins d Anconia
Hi I would like to know what is the best method and how to use it. There is no way for us to decide that for you, there are entirely too many factors. I have a html page with a question. The user submit the question. I want the answer to be sent to a perl script that test it for

Re: Perl / Html / cgi / php /

2004-10-21 Thread JupiterHost.Net
Charlene Gentle wrote: Hi Hello, I would like to know what is the best method and how to use it. I recommend using the CGI module, see search.cpan.org and look for CGI I have a html page with a question. The user submit the question. I want the answer to be sent to a perl script that test it

How to remove new line chars

2004-10-21 Thread Abhishek Dave
I am stucking with my problem of reading xml file , I am trying to remove the new line chars form xml file and just readout the xml tags. Please any guys have a look at this one. please guide me some good stuff abut regex in perl . Thanks and Regards, abhishek

Help with sprintf and prinf

2004-10-21 Thread A Taylor
Hi all, I am trying to figure out sprint and prinf: what I am trying to do is format a number into a currency, so 9.9 would be printed as 9.90 Can anyone give me a simple example of this - i am not having any joy by myself :s Thanks in advance Anadi

Help with sprintf and prinf

2004-10-21 Thread A Taylor
Hi all, I am trying to figure out sprint and prinf: what I am trying to do is format a number into a currency, so 9.9 would be printed as 9.90 Can anyone give me a simple example of this - i am not having any joy by myself :s Thanks in advance Anadi

Help with sprintf and prinf

2004-10-21 Thread A Taylor
Hi all, I am trying to figure out sprint and prinf: what I am trying to do is format a number into a currency, so 9.9 would be printed as 9.90 Can anyone give me a simple example of this - i am not having any joy by myself :s Thanks in advance Anadi

Re: Perl / Html

2004-10-21 Thread Charlene Gentle
Hi Thanx for the reply. I have a perl script that does things but I need to make it work on a html form. 1. User enter a word 2. Word get send to the perl script 3. Perl script gets an answer 4. Perl return answer to html 5. Html display answer under the typed in word (on the same page) Thanx

Help with sprintf and prinf

2004-10-21 Thread A Taylor
Hi all, I am trying to figure out sprint and prinf: what I am trying to do is format a number into a currency, so 9.9 would be printed as 9.90 Can anyone give me a simple example of this - i am not having any joy by myself :s Thanks in advance Anadi

Re: need help with upload files.

2004-10-21 Thread Gunnar Hjalmarsson
Anish Kumar K. wrote: I wrote a script to upload one file to one location. The HTML files reads a particular file using input type=file and in the form action I have called upload.pl file. in the upload.pl file... $upload_dir = /home/anish/upload; $filename = $q-param(filename);

Re: Help with sprintf and prinf

2004-10-21 Thread Chris Devers
On Thu, 21 Oct 2004, A Taylor wrote: Date: Thu, 21 Oct 2004 14:34:21 +0100 From: A Taylor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Do not do that. Please. One copy is plenty. I am trying to figure out sprint and prinf: what I am trying to do is format a number into a

Re: How to remove new line chars

2004-10-21 Thread Steve Bertrand
I am stucking with my problem of reading xml file , I am trying to remove the new line chars form xml file and just readout the xml tags. Please any guys have a look at this one. please guide me some good stuff abut regex in perl . perldoc perlretut perldoc perlre Have fun! Steve

Re: How to remove new line chars

2004-10-21 Thread Willy West
On Thu, 21 Oct 2004 11:23:59 -0400 (EDT), Steve Bertrand [EMAIL PROTECTED] wrote: I am stucking with my problem of reading xml file , I am trying to remove the new line chars form xml file and just readout the xml tags. Please any guys have a look at this one. please guide me some

RE: How to remove new line chars

2004-10-21 Thread Bob Showalter
Abhishek Dave wrote: I am stucking with my problem of reading xml file , I am trying to remove the new line chars form xml file and just readout the xml tags. If you're trying to parse XML, use an XML parser. http://perl-xml.sourceforge.net/faq/ -- To unsubscribe, e-mail: [EMAIL

Re: Perl / Html

2004-10-21 Thread Chris Devers
On Thu, 21 Oct 2004, Charlene Gentle wrote: Thanks for the reply. I have a perl script that does things but I need to make it work on a html form. What things does your script do? Did you write it, or are you hoping that we will write it? Did you look at the documentation I referred you

bad name error

2004-10-21 Thread Adamiec, Larry
I have a CGI script with 865 lines that I am trying to debug for syntax errors. The top few lines are: #!/usr/local/bin/perl -c # # Title: jd_application.cgi # use strict; use warnings; use CGI; use LWP::UserAgent; use lib '/opt/content/web/www-https/secure-docs/perl-api'; use

Re: Trying to use regex to make multiple change with a code segment

2004-10-21 Thread Dave Gray
Trying to make a subject line change for a number of scripts, but having no luck. The original code will have something like: $MySubject = sprintf %-s%-s%-s [descriptive Subject] for %-s\n, $GlblInfo{subjectprefix},

RE: Help with sprintf and prinf

2004-10-21 Thread A Taylor
Thank you for your help - didnt mean to send the last email so many times - it wont happen again :-) A Do not do that. Please. One copy is plenty. I am trying to figure out sprint and prinf: what I am trying to do is format a number into a currency, so 9.9 would be printed as 9.90 Can

tie problem

2004-10-21 Thread Bee
Hi all, I am just about to study about tie, and I've made a very simple test, but don't know what's wrong, would anyone please to point out ? # Mask package Mask; sub TIEHANDLE { my $x; bless \$x; shift } sub PRINT { $_ = $$_[0]; s/./*/g; print} 1; __END__ # main # usuw; use Mask; tie

RE: bad name error

2004-10-21 Thread Adamiec, Larry
snip What does Bad name after question_19_date_one' mean? I went thru the CGI code and the html code and the form names compare OK. Perldoc does not have any entry on this topic unless I am looking for the wrong things. I found this in internet land. Bad name after %s:: (F) You

previous element

2004-10-21 Thread Vladimir Lemberg
I need to access previous element in array. File example: 1. SEG|2961|4| |B|N|000| | |91506|91506|Z|06| 37|0|1|Z|06|37|0|8954| 2. NAME|PARKSIDE AVE| | | |O|E|1399|1301|1398|1300|N|Y|Y| 3. 4. SEG|2962|4|A|B|N|000| | |91506|91506|Z|06| 37|0|1|Z|06|37|0|8954| 5. NAME|RIVERSIDE DR| | |

Re: previous element

2004-10-21 Thread Gunnar Hjalmarsson
Vladimir Lemberg wrote: I need to access previous element in array. I don't see any array. I see an extract from a file with records separated by blank lines. snip Pattern is PARKSIDE AVE. When I find it, I wont to display the previous line as well, because its one record. while(TF){ if

Re: previous element

2004-10-21 Thread Vladimir Lemberg
Gunnar, thank you so much! - Original Message - From: Gunnar Hjalmarsson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 21, 2004 4:40 PM Subject: Re: previous element Vladimir Lemberg wrote: I need to access previous element in array. I don't see any array. I see

script how to interactive mode in telnet

2004-10-21 Thread Adam Saeed
i want to write a script that automatically call telnet and do some stuff and exit. e.g telnet open ip addres port e.g port = 25 then.. it sends helo test mail from bla bala bla rset quit ... when i done doing it through system command , it comes to interactive mode and give prompt. telnet

Re: script how to interactive mode in telnet

2004-10-21 Thread Chris Devers
On Fri, 22 Oct 2004, Adam Saeed wrote: i want to write a script that automatically call telnet If you *really* want telnet, use Net::Telnet But -- and do some stuff and exit. e.g telnet open ip addres port e.g port = 25 -- that's the SMTP port. If you're trying to do mail programming,

cat *.txt .txt...........roy

2004-10-21 Thread Roime bin Puniran
Hi... I have tried to find if any PERL module can do my task..And i found that File::Spac can do what i am to do..It's allow us to concatenate several .*txt file and sort it into one text file..But, i don't make any perl script on it, because i jst wanna see some examples first, to avoid me

Re: cat *.txt .txt...........roy

2004-10-21 Thread Chris Devers
On Fri, 22 Oct 2004, Roime bin Puniran wrote: I have tried to find if any PERL module can do my task..And i found that File::Spec can do what i am to do.. So why are you asking the list then? shell cat *.txt allweather.txt So... we should just write this for you, just like that? Come

zcat

2004-10-21 Thread mk76
Hi I have a gunzip file which I have to decompress through a perl script and copy the uncompressed file to another file. I used this system('zcat -c $filename out'); where the filename is stored in $filename. zcat gave me an error message that the output is not read from a terminal. Could you

Re: tie problem

2004-10-21 Thread Jeff 'japhy' Pinyan
On Oct 22, Bee said: I am just about to study about tie, and I've made a very simple test, but don't know what's wrong, would anyone please to point out ? # Mask package Mask; sub TIEHANDLE { my $x; bless \$x; shift } sub PRINT { $_ = $$_[0]; s/./*/g; print} Your TIEHANDLE routine is slightly

Re: zcat

2004-10-21 Thread Renqilong
Try this: put the output of the shell command 'zcat -c $filename' to a variable and then write the value of the variable to another file On Fri, 22 Oct 2004 01:27:22 -0400 [EMAIL PROTECTED] wrote: 'zcat -c $filename out' -- Whatever you do will be insignificant,but the important is you