removing special characters

2007-04-04 Thread Michael Gargiullo
I have a log file I’m parsing that has special characters at the end of each row. In vi it appears to be ^@ I’ve already tried chomp and s/\^\@// Neither work. Does any one have any ideas? -Mike -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / V

RE: Perl versus other scripting language

2007-03-30 Thread Michael Gargiullo
-Original Message- From: Nath, Alok (STSD) [mailto:[EMAIL PROTECTED] Sent: Friday, March 30, 2007 6:40 AM To: beginners@perl.org Subject: Perl versus other scripting language Hi Perlers ! In my project we are using lot of scripts (for various job launching activities )s

RE: Help, using script to edit router config (entering different modes automatically)

2007-01-26 Thread Michael Gargiullo
-Original Message- From: zackrspv [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 24, 2007 11:55 PM To: Bjorge Solli Subject: Re: Help, using script to edit router config (entering different modes automatically) On Oct 27 2006, 1:32 am, [EMAIL PROTECTED] (Bjorge Solli) wrote: > On F

RE: Counting & arrays

2006-05-22 Thread Michael Gargiullo
-Original Message- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: Monday, May 22, 2006 6:12 PM To: beginners@perl.org Subject: Re: Counting & arrays Michael Gargiullo wrote: > It's been a while since I've used Perl and I need some help with a > multidimen

Counting & arrays

2006-05-22 Thread Michael Gargiullo
It's been a while since I've used Perl and I need some help with a multidimensional array. I have a file that I need to compile some stats on. I need to keep track of 'actions' and 'rules'. Yes, stats from a firewall. Both 'actions' and 'rules' need to be dynamic so if a rule is added, it's au

RE: substitution

2006-02-13 Thread Michael Gargiullo
: Monday, February 13, 2006 10:45 AM To: Michael Gargiullo Subject: RE: substitution It did but the suggestion did not work. They had me placing \ in front of the ^. I'll try this also. TX, Bruce -Original Message- From: Michael Gargiullo [mailto:[EMAIL PROTECTED] Sent: Monday, F

ok GD::Graph question

2005-11-17 Thread Michael Gargiullo
Morning, I need to create a graph that has it's x axis in the middle to show difference between x axis base ( an average of scores I have) and the plotted point or bar (which will be x% above or below the base). Any idea how to accomplish this? Time for some ascii art for a better explanation (

regex issues

2005-11-01 Thread Michael Gargiullo
Hi all, I'm in the process of writing a rather complex parser script to parse nessus output, can be anything from: results|192.168.1|192.168.1.131|https (443/tcp)|10330|Security Note|A web server is running on this port through SSL\n to results|192.168.1|192.168.1.131|https (443/tcp)|10863|Secu

Re: mysql connectivity...

2004-10-27 Thread Michael Gargiullo
On Wed, 2004-10-27 at 16:16, Chris Devers wrote: > On Wed, 27 Oct 2004, Michael Gargiullo wrote: > > > On Wed, 2004-10-27 at 15:42, Chris Devers wrote: > > > > > > (Hint -- search in the perldoc for 'insertid'.) > > > > Thanks Chris, >

Re: mysql connectivity...

2004-10-27 Thread Michael Gargiullo
On Wed, 2004-10-27 at 15:42, Chris Devers wrote: > On Wed, 27 Oct 2004, Michael Gargiullo wrote: > > > I have a table like so: > > > > id -> auto increment > > name -> name > > > > After I insert a new name > > insert into mytable values(&

mysql connectivity...

2004-10-27 Thread Michael Gargiullo
I have a table like so: id -> auto increment name -> name After I insert a new name insert into mytable values('','Bob'); I need Bob's id returned. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Dying Children. Easy respawn?

2004-07-15 Thread Michael Gargiullo
I have some code below. The parent sends each child an IP address. The child grabs some values via SNMP. The problem looks to be if the child is sent the IP of a non-responding device, the child hangs. For instance. If I spawn 50 children, and give the parent a list of 1000 devices with only 9

Proc::Fork

2004-07-13 Thread Michael Gargiullo
I receive an error while running this script. It goes an gets a list of IP addresses that are on the network, then collects SNMP data from them. There are 8 modems available. 10.100.254.255 10.100.254.252 10.100.255.252 10.100.253.255 10.100.255.254 10.100.255.253 10.100.255.251 10.100.254.254 1

Proc::Fork

2004-07-13 Thread Michael Gargiullo
I receive an error while running this script. It goes an gets a list of IP addresses that are on the network, then collects SNMP data from them. There are 8 modems available. 10.100.254.255 10.100.254.252 10.100.255.252 10.100.253.255 10.100.255.254 10.100.255.253 10.100.255.251 10.100.254.254 1

forking

2004-07-09 Thread Michael Gargiullo
I need some assistance. I wrote a script that takes an array of IP addresses, and in a foreach loop uses a subroutine to make a few SNMP connections, and writes results to a flat file.(snipet below) For 1000 IP addresses, it takes 17 minutes. I wonder if there's a way to fork 10-20 (at a time) (

cdburner module? - 2 parts

2002-04-10 Thread Michael Gargiullo
Is there a way to figure out if there is a cd burner installed on a system? Is there a cd burning module written already out there? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Keeping places with numbers

2002-04-10 Thread Michael Gargiullo
I have a loop that starts at 0 and goes to 9 and sets the variable $zip to the current number I need it to always be 5 places like a zip code, like so 0 1 etc... How can I do that? -Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

RE: declaring vars

2002-04-09 Thread Michael Gargiullo
Strangly, I received errors at first, but now not. It must have been another part of the code. - Not that I can see...are you getting an error? -Original Message- From: Michael Gargiullo To: Beginners Sent: 4/9/02 8:11 PM Subject: declaring vars I though I could define

RE: shrinking code

2002-04-09 Thread Michael Gargiullo
Thank you ___ print "-" x 80; - Original Message - From: "Michael Gargiullo" <[EMAIL PROTECTED]> To: "Beginners" <[EMAIL PROTECTED]> Sent: Tuesday, April 09, 2002 11:13 PM Subject: shrinking code > How

shrinking code

2002-04-09 Thread Michael Gargiullo
How can I write this smaller? while($m < 80){ print "-"; $m++ } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

declaring vars

2002-04-09 Thread Michael Gargiullo
I though I could define variables this way. Do I have the syntax wrong? our($opt_s, $opt_v, $opt_w, $opt_L, $opt_l, $opt_a); -Mike _ Nothing is fool proof to a sufficiently talented fool! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

RE: default value

2002-04-09 Thread Michael Gargiullo
On Apr 9, Michael Gargiullo said: >While asking a few questions to run a script. How can I give a default >answer? > >print "File to use:"; >chomp(my $question = ); Most programs do it like so: my $default = "/foo/bar/blat"; print "File to

default value

2002-04-09 Thread Michael Gargiullo
While asking a few questions to run a script. How can I give a default answer? Right now I'm asking my question like so: print "File to use:"; chomp(my $question = ); -Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

getopt::std

2002-04-05 Thread Michael Gargiullo
I'm on a Redhat 7.0 box with the default install of Perl. I want to use the Getopt::std module, but it's not installed. I went to cpan.org and they have the docs, but it looks like that module is supposed to be installed with the perl executables, not as a seperate module. Any ideas? -Mike -

RE: Aacckk!

2002-04-05 Thread Michael Gargiullo
Look for a perl module here http://jenda.krynicky.cz/#Mail::Sender Sends via socket connection... Very Nice -Original Message- From: Moonlit Submit [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 3:54 AM To: [EMAIL PROTECTED] Subject: Aacckk! Hi, I need the following subroutin

Arguments

2002-04-04 Thread Michael Gargiullo
I have a bit of code thats throwing errors. "Use of uninitialized value..." #!/usr/bin/perl -w my $setup=0; while ($ARGV[0] =~ /^\-/) { if ($ARGV[0] eq '-s') { $setup = 1; shift; } } the code is basicly this at this point. I run it like so: #>./graboptions.pl

RE: perl

2002-04-04 Thread Michael Gargiullo
yes perldoc stat -Original Message- From: Schelstraete Bart [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 12:15 AM To: [EMAIL PROTECTED] Subject: perl Hello, Can somebody tell me if it's possible: a) to count all the files in a directory , with extension 'msg' with perl b) C

RE: ftp

2002-04-03 Thread Michael Gargiullo
The file is huge... timing out on your machine maybe? I made 2 little modifications and it ran. #!/usr/bin/perl -w use LWP::Simple; my $x = get("ftp://144.16.71.2/pub/pdb/pdb1ax0.ent";); # Combined the my and the get if ($x eq "") { print "FTP not working"; } print "$x"; #Quoted the Var Work

RE: scp inside perl

2002-04-01 Thread Michael Gargiullo
Jeff, For ssh or scp not to ask for your password, you must create and exchange keys. Check out O'Reilly's SSH The Secure Shell. -Mike -Original Message- From: Jeff Liu [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 2:18 PM To: Lirot, Gregory; Beginners Subject: RE: scp inside

RE: scp inside perl

2002-04-01 Thread Michael Gargiullo
sure: I wrote this as a push script to move files from one machine to one or more machines. This script works best if Keys are exchanged, but will also work(Prompting for password) without. Also at http://www.gargiullo.com/scripting/index.cfm #!/usr/bin/perl -w ## # Original script wri

RE: remove a char

2002-03-29 Thread Michael Gargiullo
Thank you!! -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 3:34 AM To: [EMAIL PROTECTED] Subject: Re: remove a char Michael Gargiullo wrote: > > In an array say @randomWord > > The second position could contain one of a th

remove a char

2002-03-28 Thread Michael Gargiullo
In an array say @randomWord The second position could contain one of a thousand words, but the words all end with a comma. How can I strip that comma? I've tried using: $_=$randomWord[1]; /(.*.),/; $randomWord[1] = $_; But this is not working, any sugestions? -Mike -- To unsubscribe, e-ma

RE: Connecting to DB

2002-03-28 Thread Michael Gargiullo
ate,county,zip,areacode)VALUES($new[0],$new[1],$new[3],$new[2],$ new[5])'); $action->execute || die print "$! - DB Error"; } # Print to Terminal if($printToTerm==1){ print "@new\n"; } -Original Message- From: Crook, Richard W [mailto:[EMAIL PROTECTED]] Sent

FW: Connecting to DB

2002-03-28 Thread Michael Gargiullo
OK I have the following array @new which has the following data in it this town this state zipcode county fips (I want discarded) Area code And want to insert these vars into my DB I'm using this code: #!/usr/bin/perl -w use LWP::Simple; use DBI

RE: finding text

2002-03-27 Thread Michael Gargiullo
ou want to capture? > or are you saying you have the row and just want to know how to parse the > line to get text between and ? > > > On Wednesday, March 27, 2002, at 09:41 PM, Michael Gargiullo wrote: > >> I use LWP::Simple to get an HTML page. I only want to keep one table

RE: finding text

2002-03-27 Thread Michael Gargiullo
an to identify the row you want to capture? or are you saying you have the row and just want to know how to parse the line to get text between and ? On Wednesday, March 27, 2002, at 09:41 PM, Michael Gargiullo wrote: > I use LWP::Simple to get an HTML page. I only want to keep one table ro

finding text

2002-03-27 Thread Michael Gargiullo
I use LWP::Simple to get an HTML page. I only want to keep one table row, and then only the data from the row in seperate fields. For example: page 1 some texta few links some textsome text some texta few links THE DATA I WANT MORE DATA I WANT I want to be able to set vars to each of the

RE: Help need fast

2002-03-26 Thread Michael Gargiullo
what type of server? are you looking for a web server? if so goto www.apache.org and download it. -Original Message- From: senrong [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 11:43 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Help need fast I am a student who is

RE: perl DBI to Mysql , what happens when field I query is blank ?

2002-03-20 Thread Michael Gargiullo
I may be off on this, but this sounds like a sql issue. The record count being returned is 0 so check on the record count, not if client eq null. -Original Message- From: FLAHERTY, JIM-CONT [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 10:55 AM To: Beginners (E-mail) Subject