RE: Refresh Button

2001-05-08 Thread King, Jason
Helio S. Junior writes .. >I would like to know if it's possible to do the >following: > >When the user clicks on the Refresh Button of >Internet Explorer and my WebPage refreshes, i >also have to 'insert' some information on the > inside the Page. Is it possible to do >it? >If so, how? >Any Samp

send variable

2001-05-08 Thread nakosu-budi
i have try from john lee mail. but i got problem the message syntax error at ./test.pl line 2, near "use CGI." Execution of ./test.pl aborted due to compilation errors. this mainPage (include form and variable) #!/usr/bin/perl -w print "Content-type: text/html\n\n"; print " New Page 1

Re: send variable

2001-05-08 Thread Johan Groth
nakosu-budi wrote: > > i have try from john lee mail. but i got problem > the message syntax error at ./test.pl line 2, near "use > CGI." > #!/usr/bin/perl -w > use CGI.pm This row should end with a ';'. thus use CGI.pm; /Johan -- Johan Groth (xghjn) ! Tel. mobil: 0703 - 24 25 27 Cel

Re: send variable

2001-05-08 Thread Tony Cook
On Tue, 8 May 2001, nakosu-budi wrote: > i have try from john lee mail. but i got problem > the message syntax error at ./test.pl line 2, near "use > CGI." > Execution of ./test.pl aborted due to compilation errors. > > -- > this nextPage.p

help..too many emails!

2001-05-08 Thread gerry
heysince i been subscribed to this PERL mailing list i've been seeing the message: INBOX - 130 new messages rather too often. I've lost the original email telling me how to unsubscribe...can somebody please tell me how to stop italso, is there perhaps a better way of accessing this

Re: help..too many emails!

2001-05-08 Thread Kevin Meltzer
These questions are answered in the FAQ: http://beginners.perl.org/beginners-faq Cheers, Kevin On Tue, May 08, 2001 at 02:05:26PM +0100, [EMAIL PROTECTED] ([EMAIL PROTECTED]) spew-ed forth: > > heysince i been subscribed to this PERL mailing list i've been seeing the >message: INBOX - 13

nested each(%hash) question

2001-05-08 Thread Jim Conte
I have 2 hashes, %one and %two. the ($key, $value) of %one is a span of time. I need to compare this span of time over every $key of %two. Here's what I have: while (($key1, $val1) = each (%one)) { while (($key2, $val2) = each (%two)) { if (($key2 >= $key1) && ($key2

regexp?? Reading in multiple lines to search??

2001-05-08 Thread Ga Bu
Hi everyone, I am fairly new to perl and having problems with pulling in multiple lines from a file so I can search those lines and if it has the expression I am looking for then I want to return to that file and search again for the same pattern of lines again and then search again for the patt

html files in MAIL

2001-05-08 Thread a
Hi, Please how do i (the actual commands) send an file (html) as an attachment using sendmail in pelr with no MIME intalled? Thanks in advance

Re: XML -- SOLVED

2001-05-08 Thread Stephen E. Hargrove
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, 7 May 2001, David Monarres wrote: > > I will qualifythis by saying that I am not an expert on MCPAN but > it would appear that you probably do not have the module XML::Parser > installed. Which doesn't make that much sence considering th

Re: html files in MAIL

2001-05-08 Thread Gary Stainburn
If you have Mail::Sender already installed then there is a specific example showing sending a HTML attachment. If not, then I suggest that you install it - it does a hell of a lot of the work for you. You can get it from http://search.cpan.org/search?mode=module&query=mail%3A%3Asender Gary

Re: regexp?? Reading in multiple lines to search??

2001-05-08 Thread Carl Rogers
Being a beginner myself, this might work, but someone else may have a better solution... $INFILE = "Your_Input_File.txt" ; open (OUTFILE, ">Your_Output_File.txt";) or die; open (INFILE) or die; while ($line = ) { chomp ($line); if ($line =~ /(whatever expression you're looking for)/) {

Re: nested each(%hash) question

2001-05-08 Thread Timothy Kimball
: I have 2 hashes, %one and %two. : : the ($key, $value) of %one is a span of time. : : I need to compare this span of time over every $key of %two. : : Here's what I have: : : while (($key1, $val1) = each (%one)) { : : while (($key2, $val2) = each (%two)) { : : if (($ke

Re: regexp?? Reading in multiple lines to search??

2001-05-08 Thread Jeff Pinyan
On May 8, Ga Bu said: >I am fairly new to perl and having problems with >pulling in multiple lines from a file so I can search >those lines and if it has the expression I am looking >for then I want to return to that file and search >again for the same pattern of lines again and then >search agai

Re: nested each(%hash) question

2001-05-08 Thread M.W. Koskamp
> I have 2 hashes, %one and %two. > > the ($key, $value) of %one is a span of time. > > I need to compare this span of time over every $key of %two. > > Here's what I have: > > while (($key1, $val1) = each (%one)) { > > while (($key2, $val2) = each (%two)) { > > if (($key2 >= $key1) && ($key2 <

Need help on Unicode Programming...

2001-05-08 Thread Ang Sei Heng
Hello, Anyone out there actually play with Unicode::Map8, Unicode::String or Unicode::Map? I don't seem to be make my code working. I am trying to convert from a utf8 => utf16. Reading from the document seems to imply one of the above module should be able to help me. But, I don't understand ho

Re: nested each(%hash) question

2001-05-08 Thread Timothy Kimball
: > I have 2 hashes, %one and %two. : > : > the ($key, $value) of %one is a span of time. : > : > I need to compare this span of time over every $key of %two. : : ... : : Look at the replies given here earlier. : I ran some benchmarks with while and grep, and your while loop didnt look : less e

Re: Need help on Unicode Programming...

2001-05-08 Thread M.W. Koskamp
- Original Message - From: Ang Sei Heng <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 09, 2001 1:27 AM Subject: Need help on Unicode Programming... > This is what I did: > -- BEGIN - > #!/usr/bin/perl -w > > use Unicode::Map8; > use Unicode::S

Checking available bytes in socket

2001-05-08 Thread Robin Lavallee (LMC)
Hi, What's the easy, portable way, to check the number of bytes available in a socket ? (IO::Socket::INET). -Robin

getting values from a called subroutine

2001-05-08 Thread Adam Theo
hello, all. i just signed onto this list, and i have to say *wow, it's active!*. just got my first digest version, and it has over 1,400 lines in it! well, anyway, while i hope to be able to help out and give advice and answers to many people on this list, i have a question of my own right now.

Re: getting values from a called subroutine

2001-05-08 Thread Kevin Meltzer
Hi Adam, Are you talking about doing: sub foo { my $arg1 = 1; my $arg2 = 2; my ($one, $two) = bar($arg1, $arg2); print qq{$one and $two}; } sub bar { my $arg1 = shift; my $arg2 = shift; return ++$arg1, ++$arg2; } Cheers, Kevin

Re: getting values from a called subroutine

2001-05-08 Thread Brett W. McCoy
On Tue, 8 May 2001, Adam Theo wrote: > so, in short, any way i can get a subroutine to send *back* arguments > to the piece of code that called it? all of this will be within the > same program, i just am hoping there is a way to do this. The last expression evaluated in a subroutine is returned

Re: regexp and Multiple lines{SOLVED}

2001-05-08 Thread Ga Bu
Thanks for your help, Changing the $/ variable from "/n" to "!" for the seperator worked great! It reading in the lines and I am able to search that with no problems know. I just found that in the perl cookbook also. Good luck everyone... __

Perl and WindowsNT

2001-05-08 Thread Carl Rogers
Sorry if this is a dumb question.. (I know, there is no such thing as a dumb question- only questions asked by dumb people:) I used the opendir() function in my Perl script to point to a folder with 200+ text files for the purpose of extracting data from each file. If I run the script with ope

ppm error

2001-05-08 Thread gerry
when i use Active Perl on Win98 PPm i get the following error when i try to use the search command: --- PPM> search not well-formed at line 1, column 17, byte 17 at C:/Perl/site/lib/SOAP/Parser.pm line 73 --- what does the message "not well-formed mean" and any ideas a

Re: ppm error

2001-05-08 Thread M.W. Koskamp
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 08, 2001 7:54 PM Subject: ppm error > when i use Active Perl on Win98 PPm i get the following error when i try to use the search command: > > --- > PPM> search > > not well-formed at li

Re: getting values from a called subroutine

2001-05-08 Thread Me
> [returning values from a sub?] As other posters have said, just return a list of some sort. Note that stuff gets flattened. So if you do: sub flat { $foo = '1'; @bar = (2, 3); $baz['4'} = 5; return $foo, @bar, %baz, ['qux', 'waldo'] } @list = flat;

Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Craig Moynes/Markham/IBM
Continuing with the problems for my 'date formatting' script. I am reading in a complete record from a logfile. I check to see if the regexp matches to something inside the record. Then I want to find the what each grouped mini-regexp matched up with in the monster one at the bottom of the email

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Brett W. McCoy
On Tue, 8 May 2001, Craig Moynes/Markham/IBM wrote: > $values =~ s/.*$self->{DF_REGEXP}.*/$replaceString/g; Perhaps you actually want: @values_arr = $values =~ /.*$self->{DF_REGEXP}.*/ This will give you an array of the atomized matches in your regexp, and you don't need to fool around with th

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Me
Tip for those posting (or even just creating) long regexes: If you stick a /x on the end of a regex, whitespace in the regex is ignored, so you can break it up into multiple lines, indent lines as appropriate, add spaces where nice, and comments, etc. One thing to remember if you do this: white s

Re: Perl and WindowsNT

2001-05-08 Thread Mike Lacey
Carl, Have you tried to use the globbing function rather than readdir? my $file; while(<*.txt>){ $file=$_; # not strictly needed, I know, but makes it clear open(F,$file) || die "with a nice error message\n$!\n"; while(){ # do something useful with the file }

Re: Regexp: Grouping and replacing with an unknown number of groups-- SOLVED

2001-05-08 Thread Craig Moynes/Markham/IBM
Perfect, thanks. I think I saw that earlier ...stupid brain :) - Craig Moynes Internship Student netCC Development IBM Global Services, Canada Tel: (905) 316-3486 [EMAIL PROTECTED]

what's wrong in systax

2001-05-08 Thread Anshu Anshu
22 while () { 23 if (/$LOCTAG/i) { 24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i; 25 $location .= "${curloc}::"; 26 } 27 28 if (/$TYPETAG/i) { 29 ($curtype) = /VALUE="([^"]+)">/i; 30 $jobtype .= "${curtype}::"; 31

Re: what's wrong in systax

2001-05-08 Thread John Joseph Trammell
On Tue, May 08, 2001 at 05:24:10PM -0400, Anshu Anshu wrote: > 22 while () { > 23 if (/$LOCTAG/i) { > 24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i; > 25 $location .= "${curloc}::"; > 26 } > 27 > 28 if (/$TYPETAG/i) { > 29 ($curtyp

Re: what's wrong in systax

2001-05-08 Thread Jeff Pinyan
On May 8, Anshu Anshu said: > 22 while () { >23 if (/$LOCTAG/i) { >24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i; >25 $location .= "${curloc}::"; >26 } >27 >28 if (/$TYPETAG/i) { >29 ($curtype) = /VALUE="([^"]+)">/i; >30

Re: what's wrong in systax

2001-05-08 Thread Jeff Pinyan
On May 8, John Joseph Trammell said: >On Tue, May 08, 2001 at 05:24:10PM -0400, Anshu Anshu wrote: >> 22 while () { >> 23 if (/$LOCTAG/i) { >> 24 ($curloc) = /VALUE="([^"]+)"\s*\w*>/i; >> 25 $location .= "${curloc}::"; >> 26 } >> 27 >> 28

Re: what's wrong in systax

2001-05-08 Thread Anshu Anshu
Thanks for reply. below is the varibales as defined - $LOCTAG = ""; $TYPETAG = ""; and error message was Name "main::JOBDATA" used only once: possible typo at gen_job.pl line 14. Name "main::CP" used only once: possible typo at gen_job.pl line 13. Use of uninitialized value in substitution (s//

Session Variables

2001-05-08 Thread Brian Shoemaker
Hello. I am attempting to find some information on using session variables in Perl/CGI. When someone logs into my site, the script will check a flat-text database and if the user has entered a correct username and password, the user will be validated. At this point, a session variable will be se

Re: Session Variables

2001-05-08 Thread Peter Scott
At 06:59 PM 5/8/01 -0400, Brian Shoemaker wrote: >Hello. > >I am attempting to find some information on using session variables in >Perl/CGI. > >When someone logs into my site, the script will check a flat-text database >and if the user has entered a correct username and password, the user will >b

Re: Session Variables

2001-05-08 Thread Jos I Boumans
I take it you have the CGI module installed... all you need to do is read up on CGI::Cookies which will show you exactly how to store and retrieve cookies. The docs can be foudn on CPAN or in your perl/html/site/lib/CGI dir regards, Jos Boumans - Original Message - From: "Brian Shoemak

Re: Session Variables

2001-05-08 Thread Casey West
On Tue, May 08, 2001 at 06:59:07PM -0400, Brian Shoemaker wrote: : Hello. : : I am attempting to find some information on using session variables in : Perl/CGI. In a CGI environment, you might want to take a look at the CGI::Cookie module, which comes standard with all modern versions of Perl.

Re: Session Variables

2001-05-08 Thread Peter Scott
At 04:00 PM 5/8/01 -0700, I wrote: >At 06:59 PM 5/8/01 -0400, Brian Shoemaker wrote: >>Hello. >> >>I am attempting to find some information on using session variables in >>Perl/CGI. >> >>When someone logs into my site, the script will check a flat-text database >>and if the user has entered a corr

Re: what's wrong in systax

2001-05-08 Thread Jos I Boumans
from the error msg i conclude that line 29 is not producing a match. You might want to add some print statements to see whats going on there. if it holds meta chars like japhy said, you might also want to try "quotemeta $_;" so you can be sure all 'special characters' are escaped for the regex. R

Re: Session Variables

2001-05-08 Thread Dan Brown
If you're using Apache, I highly recommend the O'Reilly book "Writing Apache Modules with Perl and C" by Lincoln Stein and Doug MacEachern (ISBN: 1-56592-567-X). A section of the book starts with a simple authentication example and builds on it (including a couple of different way to store sessio

microsoft sql2000

2001-05-08 Thread Matthew, Marlon B.
Hello perl friends. I need to know if perl works with microsoft sql2000. if it does, which module do i need to get? thanks Marlon

Re: microsoft sql2000

2001-05-08 Thread Jos I Boumans
Judging from the modules it should be able too... what you need is the DBD module, as well as a driver.. which in your case would be DBIx-MSSQLReporter [1.00 ] An module to connect Perl to MS SQL Server and MS if i'm not mistaken. if you use ActiveState Perl, it shouldnt be hard to install them.

RE: Session Variables

2001-05-08 Thread Andy Sharp
There are many ways to do it, here's mine: I wanted to semi-securely identify users to my site, having them log in once, and then never have the need to login again (as long as they're at the same computer) So, I used cookies (perldoc CGI) to set a unique session ID, once a user had logged in.

RE: what's wrong in systax

2001-05-08 Thread King, Jason
either that or the "if (/$TYPETAG/i)" is not matching - so the block isn't even being entered .. this would be most likely because even if the match on line 29 doesn't match .. line 30 should still initialise $jobtype to (at the very least) '::' so my guess is that $TYPETAG doesn't appear on the

RE: Perl and WindowsNT

2001-05-08 Thread King, Jason
Carl Rogers writes .. >I used the opendir() function in my Perl script to point to a folder >with 200+ text files for the purpose of extracting data from each file. > >If I run the script with opendir/readdir pointing to a directory on a >shared drive, I'll get to a point where Perl tells me "Can

RE: html files in MAIL

2001-05-08 Thread King, Jason
[EMAIL PROTECTED] writes .. >Please how do i (the actual commands) send an file (html) as >an attachment using sendmail in pelr with no MIME intalled? I can't remember what options you need to give to sendmail .. and I don't have sendmail here to test .. but you'll get the idea open MAIL, '

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Matt Cauthorn
Not sure if this will help you at this point, but I strongly recommend the Date::Manip module for anything involving parsing dates. It does everything you can imagine with dates and more. Tell it to parse your dates, and boom you can print them however you want, get differences, etc. There are ple

Re: Environment variable question

2001-05-08 Thread Matt Cauthorn
If you're using Unix (I think even a dos shell can do this sort of thing too), why couldn't you just do a system call to the shell? i.e. system(" export MY_Variable=whatever "); I haven't tried this, but it sure seems like it would work -- provided you're running and exiting the script as the sa

Re: beginner here - with basic cgi trouble

2001-05-08 Thread Chip Wiegand
Okay, here is some more info on the error messeges: - the file, formparser.cgi, has 755 permissions - the message - Internal Server Error The server encountered an internal error or misconfiguration and was unable to compl

Re: beginner here - with basic cgi trouble

2001-05-08 Thread David A. Desrosiers
> [error](2)No such file or directory. exec of /usr/local/apache/cgi-bin/ > formparser.cgi failed > [error][192.168.1.8] Premature end of script headers: /usr/local/apache/ > cgi-bin/formparser.cgi > - I see the file DOES exist as formparser.cgi in the directory path shown > in the er