RE: trying again....

2003-11-13 Thread Jason Frisvold
Check out Mail::Mailer ... I use that for 99% of my scripts that need email support.. --- Jason H. Frisvold Backbone Engineering Supervisor Engineering Dept. Penteledata RedHat Engineer - RHCE # 807302349405893 [EMAIL PROTECTED] --- I love

RE: trying again....

2003-11-13 Thread Jason Frisvold
On Thu, 2003-11-13 at 15:50, Suman, Kaushik wrote: How do you get help on a perl module..? I find that going to search.cpan.org and searching for the module in question is enough... You can also use perldoc if you know where the .pm file was installed.. -Original Message- From: Jason

RE: trying again....

2003-11-13 Thread Jason Frisvold
/Sender.pm HTH DMuey -Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 11:48 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: trying again Check out Mail::Mailer ... I use that for 99% of my scripts

Re: hidden characters in an input stream

2003-01-09 Thread Jason Frisvold
This helped out considerably! I found that there are 3 CR's at the beginning of each line.. stripping these out makes it all work perfectly :) Thanks, On Wed, 2003-01-08 at 10:44, Christopher Kruslicky wrote: On Wednesday 08 January 2003 3:11 pm, Jason Frisvold wrote: This works great

Re: Why can't use SQL GROUP BY...?

2003-01-09 Thread Jason Frisvold
Could be that page does not exist in the table you are trying to query, or that $Table is not set or calling a non-existant table... Try printing out $Table by itself before calling the SQL statement. On Thu, 2003-01-09 at 10:09, Francis Henry wrote: Hi Gary: What happens when you run the

hidden characters in an input stream

2003-01-08 Thread Jason Frisvold
Hi all, I'm using the Net::Telnet module to automate some of the more menial tasks I have to deal with every so often. Part of the task requires parsing a stream of data from the device I'm telnetting to (A Marconi ASX-200 to be exact) ... I've successfully set up the telnet, logged in,

RE: hidden characters in an input stream

2003-01-08 Thread Jason Frisvold
: print \n start line \n $line \n end line \n; Dan -Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:39 PM To: Perl Beginners List Subject: hidden characters in an input stream Hi all, I'm using

RE: hidden characters in an input stream

2003-01-08 Thread Jason Frisvold
:: print ---$line\---\n; Or this print --- $line ---\n You may try $line =~ s/\n|\r//g; Dan -Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 1:54 PM To: Dan Muey Cc: Perl Beginners List Subject: RE: hidden characters

Re: hidden characters in an input stream

2003-01-08 Thread Jason Frisvold
; ... might do the trick. HTH Jason Frisvold [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... -- --- Jason H. Frisvold Backbone Engineer Penteledata Engineering [EMAIL PROTECTED] RedHat Certified - RHCE # 8073023

RE: hidden characters in an input stream

2003-01-08 Thread Jason Frisvold
Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:00 PM To: Dan Muey Cc: Perl Beginners List Subject: RE: hidden characters in an input stream I had thought of that before, tho ... Here's the ourput using the backslash : --- sec log sho

Re: hidden characters in an input stream

2003-01-08 Thread Jason Frisvold
while (my $line = $Telnet-getline(Timeout = 5,)) { $line =~ s/\r\n$\\; chomp $line; ... might do the trick. HTH Jason Frisvold [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... -- --- Jason H.

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Jason Frisvold
calculations to ensure that it's running efficiently... How do I allow monitor.perl to spawn pingit.perl and snmpit.perl and still continue running itself? On Mon, 2002-11-18 at 16:43, Alan Cameron wrote: On 18 Nov 2002 15:21:26 -0500, Jason Frisvold [EMAIL PROTECTED] wrote: [snip] I can't see

Re: System/Exec/Fork ... Help!

2002-11-19 Thread Jason Frisvold
Hrm.. didn't think of that ... *heh* Good idea ... I'm gonna use the Proc::Daemon module though .. seems to do exactly what I need without messing with forking directly... On Mon, 2002-11-18 at 21:29, Steve Grazzini wrote: That's all more or less correct, but you're missing a fundamental

System/Exec/Fork ... Help!

2002-11-18 Thread Jason Frisvold
I'm writing a monitoring system (Yes, still... Finally got the go-ahead to do this) and my design calls for a central Smart Daemon that spawns and monitors the lesser Daemons that do the actual monitoring. My problem is that I'm not sure how to go about this. From what I understand, fork

RE: Localizing variables

2002-11-05 Thread Jason Frisvold
That is exactly what I was hoping... Thanks! On Tue, 2002-11-05 at 16:48, Nikola Janceski wrote: the second 'my $var2' will have memory allocated to it, but will not be freed until Perl ends, but Perl will re-use that memory allocation after leaving the {BLOCK}. --

Perl Profiler?

2002-10-07 Thread Jason Frisvold
Does anyone know if there is a Perl Profiler (Open Source or Commercial) that is in existance? Apparently my boss thinks this will magically fix various issues... :) -- --- Jason 'XenoPhage' Frisvold Senior ATM Engineer Penteledata Engineering [EMAIL PROTECTED] RedHat

Re: Perl Profiler?

2002-10-07 Thread Jason Frisvold
reading on this ... looks like it may do a lot more than meets the eye ... :) Friz On Mon, 2002-10-07 at 14:31, George Schlossnagle wrote: perldoc Devel::DProf It's a very useful and functional profiler (IMHO). George Jason Frisvold wrote: Does anyone know if there is a Perl Profiler

RE: Perl Profiler?

2002-10-07 Thread Jason Frisvold
before? -Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Monday, October 07, 2002 2:24 PM To: beginners perl Subject: Perl Profiler? Does anyone know if there is a Perl Profiler (Open Source or Commercial) that is in existance? Apparently my boss

Redirecting output

2002-09-20 Thread Jason Frisvold
Is there a way to redirect all the output (anything printed by the program itself and any error output) back into the program so the program can handle it? I'd like to be able to redirect it to itself so if there are any errors or unexpected output during a cron job, it'll all get mailed to

Re: Installing DBD::mysql without installing mysql on local machine

2002-09-20 Thread Jason Frisvold
If you use the RPM's, then you should be able to just install the client and shared rpm's ... I believe they have the needed files. On Fri, 2002-09-20 at 06:04, Priss wrote: Hi, Wonder if someone could help me, I am trying to install DBD::mysql module to access a remote mysql database. I

Forking, Passing Parameters to forks

2002-09-19 Thread Jason Frisvold
Greetings, I'm in the process of writing a large network monitoring system in perl. I want to be sure I'm headed in the right direction, however. I have a large MySQL database comprised of all the items that need monitoring. Each individual row contains exactly one monitoring

RE: Forking, Passing Parameters to forks

2002-09-19 Thread Jason Frisvold
the beginning or continue on from that point? Yes, I'm headed over to look up fork now .. :) perldoc -f fork .. right? Friz On Thu, 2002-09-19 at 10:36, Bob Showalter wrote: -Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 9:43 AM

Development / Production configuration switching

2002-09-04 Thread Jason Frisvold
Since we've finally been able to get a development machine, I find myself needing a quick, efficient way of pointing the programs we write at the correct location for the different servers they need to talk to. For instance, in production we use server A for the database server. But in

RE: AW: Perl 5.8.0

2002-09-03 Thread Jason Frisvold
Oh, I am happy with 5.6.1 ... Use it all over the place ... But ... Threading ... Real, honest threading? That would be something wonderful... Any idea if there's a shared memory module for the threading? I believe the problem I ran into last time I tried this was that most of the modules

Perl 5.8.0

2002-08-30 Thread Jason Frisvold
Ok, I'm a bit behind the times... :-) What are the major advantages (if any) to moving to 5.8.0? I'm running 5.6.1 right now... Is it worth it? Is it fully backwards compatible? --- Jason H. Frisvold Senior ATM Engineer Engineering Dept. Penteledata RHCE -

RE: Regex exception

2002-07-09 Thread Jason Frisvold
I do it this way (working in production code): opendir(DIR, $dir); while (defined ($filename = readdir DIR)) { next if $filename =~ $pattern; unlink($filename); } } close(DIR); --- Jason H. Frisvold Senior ATM Engineer Engineering Dept. Penteledata CCNA

Sockets

2002-06-24 Thread Jason Frisvold
Greetings all, I'm going to be starting a project shortly where I will require the ability to communicate with the program via TCP/IP... Does anyone have any experience with this? Any suggestions on where I should start looking for information? It needs to be fairly secure with some

RE: tick marks?

2002-06-18 Thread Jason Frisvold
Let DBI quote it for you.. $month = $dbh-quote($month); $day = $dbh-quote($day); $hms = $dbh-quote($hms); $host = $dbh-quote($host); $description = $dbh-quote($description); $dbh-do(INSERT INTO tb1 (month, day, hms, host, description) VALUES ($month, $day, $hms, $host, $description));

RE: RegEx to match Valid IP Address

2002-06-14 Thread Jason Frisvold
Perhaps your network engineer was thinking in relation to a Class C? In reality, you can have subnets where .3 is a broadcast... (/30) It's all relative to what subnet mask you are using for that particular IP address. --- Jason H. Frisvold Senior ATM Engineer

DBD::CSV

2002-06-07 Thread Jason Frisvold
Is anyone here familiar with DBD::CSV? I seem to be hitting a limit (I think) but I'm not sure how to figure it out... I have a CSV file with about 114 columns in it (I'm not generating these myself, it's Steel Belted Radius doing it) and I want to use DBD::CSV to pull the fields I want and

RE: :CSV

2002-06-07 Thread Jason Frisvold
, June 07, 2002 10:00 AM To: Jason Frisvold; Beginners@Perl. Org (E-mail) Subject: RE: :CSV As an alternative you could use Text::CSV to split the fields. Rob -Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 9:36 AM To: Beginners@Perl. Org (E-mail

RE: DBD::CSV

2002-06-07 Thread Jason Frisvold
] --- Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world. -- Albert Einstein [1879-1955] -Original Message- From: Michael Fowler [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 3:06 PM To: Jason Frisvold Cc: Beginners@Perl. Org (E-mail

RE: talking to mysql

2002-06-05 Thread Jason Frisvold
Greetings... I find the easiest way to talk to mySQL (and get a response!) is via DBI... I'm guessing it's perdoc DBI, but I may be wrong... :) If you need any help, I do this sort of dirty work on a daily basis... --- Jason H. Frisvold Senior ATM Engineer Engineering

RE: Logfile isn't doing what I think it should do....(haha)

2002-06-05 Thread Jason Frisvold
Hrm... according to the DBI docs, execute() returns undef if it fails... perhaps you should be using if (defined($result)) { } ?? You might also check for $DBI::errstr ... I believe that only exists when there is an error... Are you sure your update is failing? ---

RE: variable initialization

2002-05-30 Thread Jason Frisvold
than knowledge. Knowledge is limited. Imagination encircles the world. -- Albert Einstein [1879-1955] -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 6:28 PM To: Jason Frisvold Cc: begin begin Subject: Re: variable initialization

RE: variable initialization

2002-05-30 Thread Jason Frisvold
. Imagination encircles the world. -- Albert Einstein [1879-1955] -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 6:54 PM To: [EMAIL PROTECTED] Subject: Re: variable initialization Jason Frisvold wrote: I stumbled across a bug in my own code

variable initialization

2002-05-29 Thread Jason Frisvold
I stumbled across a bug in my own code I figured I'd share... Actually, I'm wondering if there is a way to do this I was using the following code : my ($var1, $var2) = 0; The intent was to initialize the variables to 0. However, as I found out a few minutes ago, this only initializes the

'use' question

2002-05-28 Thread Jason Frisvold
This is kind of a weird situation and *disclaimer* isn't my code! :-) The problem is that we're getting a weird error with this code... (this is from the actual program) Undefined subroutine TicketEmail::set_path_information called at /usr2/local/PerlModules/TicketEmail.pm line 30.

RE: 'use' question

2002-05-28 Thread Jason Frisvold
-1955] -Original Message- From: drieux [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 3:20 PM To: Jason Frisvold Cc: begin begin Subject: Re: 'use' question On Tuesday, May 28, 2002, at 12:03 , Jason Frisvold wrote: [..] Undefined subroutine TicketEmail::set_path_information

Telnet Program

2002-05-23 Thread Jason Frisvold
I need to write a program that telnets to a specific port and logs all the output to a file. Is there an easy way to do this in perl? I tried this via the command line (telnet 1.2.3.4 23 my.log ) but it apparently buffers everything and I'd like to be able to tail the file at times...

use strict

2002-05-06 Thread Jason Frisvold
I have a question about 'use strict' ... Yeah, I guess this counts as a duh! question... :-) I put 'use strict' at the beginning of one of my scripts... It basically broke the script... (or fixed it, if you want to look at it that way) The problem is that it wanted explicit package

RE: use strict

2002-05-06 Thread Jason Frisvold
] -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 11:34 AM To: Jason Frisvold; [EMAIL PROTECTED] Subject: RE: use strict -Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 11:19 AM To: [EMAIL

foreach, my, and arrays

2002-05-06 Thread Jason Frisvold
Here's another simple question I have an array of arrays and I want to use a foreach to do something with each entry... currently I do this : foreach my $item (@myarray) { my ($item1, $item2) = @$item; do stuff here } Is there a way to combine the first 2 lines? Is it any

RE: foreach, my, and arrays

2002-05-06 Thread Jason Frisvold
); my @a3 = qw( thr tri ); my @a4 = qw( fou quad ); my @a5 = qw( fiv quat ); my @myarray = (\@a1, \@a2, \@a3, \@a4, \@a5); foreach my $item (@myarray) { my($item1, $item2) = @$item; print $item1 and $item2\n; } my @item; foreach ( @myarray ) { print $$_[0] and $$_[1]\n; } Jason Frisvold

DBI - selectall_arrayref Help!

2002-05-04 Thread Jason Frisvold
Let's see if I can explain what I'm trying to do before I toss code out... I have a database with several columns of data. I want to fetch all the pertinent info into a single array of arrays and then work on each row of the data individually. (I don't want to use fetch() because there's no

RE: SybPerl - Memory leaks

2002-05-02 Thread Jason Frisvold
Is the DBHandler not re-using the memory it allocated the first time around? Sounds like when you create the handler every iteration, it's just ignoring the memory it used from the previous iteration and allocating more memory... --- Jason H. Frisvold Senior ATM Engineer

FW: Name resolution from IP

2002-05-01 Thread Jason Frisvold
Ugh.. Forgot to CC in the list... -Original Message- I use this little subroutine : use Socket; sub nslookup { my $ipaddress = shift; my $dnsname = gethostbyaddr(pack('C4',split(/\./,$ipaddress)),AF_INET); if ((! defined $dnsname) || ($dnsname eq '')) { print ***

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Jason Frisvold
. -- Albert Einstein [1879-1955] -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 10:46 AM To: Jason Frisvold Cc: [EMAIL PROTECTED] Subject: Re: Debugging and 'uninitialized value in concatenation' question On Thu, 2002-04-25 at 14:49, Jason

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-26 Thread Jason Frisvold
is more important than knowledge. Knowledge is limited. Imagination encircles the world. -- Albert Einstein [1879-1955] -Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED]] Sent: Friday, April 26, 2002 11:47 AM To: Jason Frisvold Cc: [EMAIL PROTECTED] Subject: RE: Debugging

Debugging and 'uninitialized value in concatenation' question

2002-04-25 Thread Jason Frisvold
Judging from the subject lines coming across the list today, I think I'm gonna toss this question out there and then duck and cover... :-) I have 2 actual questions. I'll try to be as specific as possible.. :-) Question #1. When I'm writing code, I want to be able to view as much output as

RE: Debugging and 'uninitialized value in concatenation' question

2002-04-25 Thread Jason Frisvold
. Imagination encircles the world. -- Albert Einstein [1879-1955] -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 4:17 PM To: [EMAIL PROTECTED] Subject: Re: Debugging and 'uninitialized value in concatenation' question From: Jason Frisvold [EMAIL

Asynchronous Perl

2002-03-04 Thread Jason Frisvold
Greetings all, I'm looking for a way to have perl output in an asynchronous manner What I mean is, if I write a perl script to generate a large amount of data and output it to the screen, it seems to pause until some unknown buffer is full and then spit out the output pause again, show