RE: 1 at end of script

2005-04-03 Thread Dave Kettmann
Nevermind I *just* figured it out. It is the exit code. Oops :) Dave > -Original Message- > From: Dave Kettmann > Sent: Sunday, April 03, 2005 2:45 PM > To: Perl List (E-mail) > Subject: 1 at end of script > > > Hello all, > > This is a CGI question,

1 at end of script

2005-04-03 Thread Dave Kettmann
ot; \n"; print "Password:\n"; print "" . password_field(-name=>'passwd') . "\n"; print " \n"; print " \n"; print "" . submit(-name=>'Login!') . "\n"; print "\n"; } sub checkpw

RE: Type-globbing filehandles

2005-03-17 Thread Dave Kettmann
onfig file: $!\n"; while () { chomp; s/#.*//; s/^\s_//; s/\s+$//; next unless length; ($var, $value) = split(/\s*=\s*/, $_, 2); $User_Preferences{$var} = $value; } close *CFG; Thanks again for help. Dave Kettmann NetLogic 314-266-4000 > -Origi

Type-globbing filehandles

2005-03-17 Thread Dave Kettmann
explanation of the reasoning unless I am doing something syntactically(sp) wrong. Thanks in advance for the help and comments, Dave Kettmann NetLogic 314-266-4000 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Can Perl 'nice' a process?

2005-03-04 Thread Dave Kettmann
Im sure Perl can nice a process but I guess I dont know what the correct term is. I guess if I just start with the correct term I can discover how to use it. Then again, I may just have to 'nice' it in the shell. Any help is appreciated. Thanks, Dave Kettmann NetLogic 314-266

strict and warnings

2005-01-13 Thread Dave Kettmann
a question from a beginner who is trying to progress along the wonderful road of Perl :) Thanks, Dave Kettmann NetLogic 636-561-0680 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

IO::Socket::UNIX questions

2004-12-30 Thread Dave Kettmann
d,128);# <--- Line 21 } I have tried multiple things with the creation of the socket, but cant get the right combination. I am beginning to think that UNIX sockets are not bi-directional, but I hope someone proves me wrong. If more information is needed, let me know. Thanks for

Running a perl script thru a perl script

2004-12-21 Thread Dave Kettmann
ter way to run the one script within the other, hopefully avoiding exec(). Any help is appreciated and if more info is needed, let me know and I will supply it. Thanks, Dave Kettmann NetLogic 636-561-0680 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: Is there a time module to help with this...

2004-12-17 Thread Dave Kettmann
Just a thought... Have you looked at Nagios? I'm pretty sure it is portable to most OS's. It sounds like a system monitor is your goal. I never really cared for reinventing the wheel. :-) Also, I'm pretty sure it is written in Perl, but I could be wrong. Is kinda goofy to configure, but it is ve

Variables and MySQL

2004-12-08 Thread Dave Kettmann
; . sth->errstr; $sth->execute(); my $i = 0; my @data; if ($sth->rows == 0) { exit -1; } while (@data = $sth->fetchrow_array) { if ($uri_to =~ m/(\+$data[0])/) { print "Matches!\n"; print "\tForwarding to: $data[1]\n"; } else { print "

RE: Working with Environment Variables

2004-12-02 Thread Dave Kettmann
urns nothing. When I take Jupiter's advice, and run the Data::Dumper, SIP_HF_FROM appears in the list of exported variables. SIP_OURI does not though. Am I going about this the wrong way? I added the export line to make sure that the variable is exported, but it still doesnt seem to export it. I wont know ahead of time what that variable will be so I cannot set it each time to something statically. Thanks again for any help, Dave Kettmann NetLogic 636-561-0680 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Working with Environment Variables

2004-12-02 Thread Dave Kettmann
able SIP_HF_FROM ... ... SHLVL=1 SIP_HF_FROM=sip:+16364424593 SIP_RURI=BLAH2 ... Is it that there is a bad character in the variable that I dont know about? Any help is appreciated as always. I hope I explained myself well enough. Thanks in advance, Dave Kettmann NetLogic 636-561-0680 --

Question on subroutines

2004-11-30 Thread Dave Kettmann
ch as this: ... sub lca { SQL Query } while ( @lca) { do stuff } ... I am probably wrong on this. I am trying to avoid using a global variable and keeping things on the smallest scope possible. Any suggestions are appreciated. Thanks, Dave Kettmann NetLogic 636-561-0680 -- To unsu

RE: Simple if conditional

2004-11-17 Thread Dave Kettmann
atusType")->child("Code")->value > eq 'D' || > $activity->child("Status")->child("StatusCode")->child("Code")->value > eq 'DS') && > defined > $activity->child("ActivityLocation")-&g

Mass Editing 125 files

2004-11-03 Thread Dave Kettmann
isn't numeric in right_shift at zones.1 line 123. Wouldnt $file[$i] be initialized? I may be wrong about that, but the 'right_shift' thing is what I am not sure of. I know I'm close to being right (or at least I think I am). Any help is appreciated. Thanks, Dave Kettmann NetLogic --

Why wont this read my file?

2004-10-20 Thread Dave Kettmann
existence of "NPA-NXX\tOcn " to be deleted out which should be done with a regex of: s/NPA-NXX\tOcn // correct? I have looked thru tutorials on the web, and they say that $_ is the current line of the file in a while statement (or that is what I gathered) and It wont print out my file

RE: Perl equivalent to the unix 'cut' command

2004-10-14 Thread Dave Kettmann
> On Thu, 14 Oct 2004, Dave Kettmann wrote: > > > The reply was deserved :) Just another question before I go too far > > with this... The files I am parsing (just needing 2 tabbed > fields out > > of them) are approximately 20,000 - 25,000 lines long a > piece.

RE: Perl equivalent to the unix 'cut' command

2004-10-14 Thread Dave Kettmann
> -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 14, 2004 4:16 PM > To: Perl List (E-mail) > Cc: Dave Kettmann > Subject: Re: Perl equivalent to the unix 'cut' command > > > On Thu, 14 Oct 2004, Chris Dev

Perl equivalent to the unix 'cut' command

2004-10-14 Thread Dave Kettmann
x27;File' but I think I'm just not thinking of the right keyword that perl uses. I'm still new to perl and I'm sorry for my ignorance if it should be right under my nose Thanks in advance, Dave Kettmann NetLogic -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

RE: What function to get a file thru HTTP

2004-10-13 Thread Dave Kettmann
Thanks Chris and Wiggins, will definately look into this. > -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 13, 2004 1:57 PM > To: Dave Kettmann > Cc: Perl List (E-mail) > Subject: Re: What function to get a file thru HTTP

What function to get a file thru HTTP

2004-10-13 Thread Dave Kettmann
Hi list, I have been doing some searching and I'm looking for a recomendation. I need to pull a file via HTTP in my perl script. Just looking for a good module to use. Most everything I have found has been for FTP. Not asking for code, just a recomendation :) Dave Kettmann NetLogic

RE: screensaver prevention

2004-09-02 Thread Dave Kettmann
Maybe he doesnt have admin access to the machine? :) Just a thought... Dave > -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 02, 2004 3:41 PM > To: JP > Cc: [EMAIL PROTECTED] > Subject: Re: screensaver prevention > > > On Thu, 2 Sep 2004,

RE: Is my DB code bad?

2004-09-01 Thread Dave Kettmann
explain it to me, the documentation just tells you how to use it, but I need to know what it means :). Thanks ahead of time. Dave Kettmann NetLogic 636-561-0680 > -Original Message- > From: Jenda Krynicky [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 01, 2004 3:02 PM

Is my DB code bad?

2004-09-01 Thread Dave Kettmann
= $dbh->prepare($query) || &db_err("Cannot prepare $query \n :" . $dbh->errstr . "\n"); $sth->execute || &db_err("Cannot execute $query \n:" . $dbh->errstr . "\n"); $sth->finish; print " Deleted customer!

RE: Sed-type-function

2004-08-23 Thread Dave Kettmann
WTH he is doing wrong :-D Dave Ketmmann NetLogic 636-561-0680 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 11:04 AM To: Dave Kettmann Cc: Perl List (E-mail) Subject: RE: Sed-type-function > Hmm .. wonder why I didnt see t

RE: Sed-type-function

2004-08-23 Thread Dave Kettmann
Hmm .. wonder why I didnt see that in any of the books i looked at. Ok off I go then, Thanks for the help! Sorry to confuse you guys :) Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 10:59 AM To: Dave Kettmann Cc: Perl List (E

RE: Sed-type-function

2004-08-23 Thread Dave Kettmann
I guess and easy syntax for search and replace similar to: s/this/that/g ... Guess I will look at the s2p you mentioned as well. Dave -Original Message- From: Randy W. Sims [mailto:[EMAIL PROTECTED] Sent: Monday, August 23, 2004 10:39 AM To: Dave Kettmann Cc: Perl List (E-mail) Subject

Sed-type-function

2004-08-23 Thread Dave Kettmann
List, Does perl have any built-in sed-like function? I found ASED.pm, but would rather go with something built in. I looked around a bit, but didnt find anything. I guess I could go with using the Shell module but would rather using as few modules as possible. Thanks, Dave Kettmann NetLogic

RE: Problems with a socket script

2004-08-20 Thread Dave Kettmann
Socket. (I hope this doesnt turn into a 'pico is better than vi'-type argument :-D) Anyways, any input at all is appreciated. I'm going to start looking into other way to accomplish this task. Dave Kettmann NetLogic 636-561-0680 -Original Message- From: Jeff 'japhy&#x

Problems with a socket script

2004-08-20 Thread Dave Kettmann
print $buf; } } Any help is appreciated, I have tried debugging it, and it 'dies' at the 'print $sock "TEST";' line. I am still learning perl, and copied most of this from various tutorials on sockets. TIA, Dave Kettmann NetLogic 636-561-0680 -- To unsubscr