perl help!!

2001-06-06 Thread David Draley
is there a way to call a perl sub routines using a FORM when a "submit" button is clicked? I am trying to push data to a mySQL database table and when my form is loaded into the browser or is "refreshed" the browser runs through my cgi script and pushes "null" values to the table. Once the form

Re: perl help 2!!

2001-06-07 Thread David Draley
$dbh->do($cmd); } #end of program ------- >From: Gary Stainburn <[EMAIL PROTECTED]> >To: "David Draley" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] >Subject: Re: perl help!! >Date: Thu, 7 Jun 2001 11:03

perl question

2001-06-08 Thread David Draley
what is the difference between print qq| |; vs. the print "\n"; print "\n"; print "\n"; print "\n"; vs. the print <<"EndOfText"; http://explorer.msn.com

quoted text in a perl form text field problem...

2001-06-14 Thread David Draley
I have a perl form that records to a MySql database. Every time someone uses the form and enters “quoted text” in a text box or text area the record is not sent. Is there a way to allow “quoted text” to be processed? Any recommendations? Thanks in advance David

PERL Array to hash table help

2001-08-08 Thread David Draley
hello - I am writing a search script that will retrieve records from an MYSQL db. I have used an array to store the returned records, but I am having problems pushing the array into a hash table. So far, my search script only returns the first record that matches the search criteria. thanks

adding array elements

2001-09-07 Thread David Draley
What would be the best way to add only the even array elements? @array[0..9]; #result of even elements thank you _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PRO

STDIN loop help

2001-09-10 Thread David Draley
Hello - I am trying to put an @array in a loop that stores STDIN. Every time I run my program I can't get out of the loop. Is there a command that pushes the program out of the loop or do I need to use $ print "Please enter 10 integer values.\n"; $i = 1; while ($i <= 10)

scan a UNIX file of a string

2001-09-14 Thread David Draley
Hello - I am trying to scan a UNIX file for a string. I used a filehandle to do this task - (Below) How would I complete the same taks without using filehandles? Would it be GREP?? -- #!/usr/local/bin/perl open (DD,"/etc/passwd") || die "cannot open: $!"; while ()

"Unless" statement

2001-09-17 Thread David Draley
how would I write an unless statement that is looking for the values inbetween two numbers? $x = ; chomp $x; unless (50 < $x > 80) { print ""; } else { other function } --- thanks _ Get your FREE download of MSN

reg exp

2001-09-20 Thread David Draley
hello - I am trying to search a for any sentence that ends in "." or "?" I want to only print those sentences that end with "." or "?" I am having trouble with the reg expression syntax... -- while () { $file=; if(/\.\?$/){ print "$only_sentences_that_end

RE: reg exp

2001-09-20 Thread David Draley
thanks. it seemed to like the [] better. while () { print "$_" if /[\.\,\?]$/; } close(FILE); >From: "Moon, John" <[EMAIL PROTECTED]> >To: 'David Draley' <[EMAIL PROTECTED]> >CC: "&#

reg exp match

2001-09-24 Thread David Draley
How would I print only the words that contain the letter "p" in a file??? Right now I am only printing the entire lines that contain words with the letter "p". while () { if(/[p]/) { print "$_";

PERL reference question

2001-10-21 Thread David Draley
I am trying to make a hash slice that only includes the keys "SHELL" and "DB" for %unix - using a reference. How do I reference specific elements in a % table? thanks --- #! /usr/bin/perl -w %unix = ( "SHELL" => "/bin/csh", "PAGER" => "more", "DB"

appending form info to a html file

2001-11-26 Thread David Draley
Hello I am trying to create a .pl script that processes data via "GET" from a form and appends the info to a seperate .html file. #!/usr/bin/perl #file name addfile.pl $form_data = $ENV{'QUERY_STRING'}; open(FORMDATA,">>../formdata.html"); print "Content-type: text/html", "\n\n"; print " \n