Re: Chomp help...

2010-11-08 Thread Bobby
Awsome, regex worked! My head was stuck on chomp...Thanks Sheppy. From: Sheppy R To: Bobby Cc: beginners@perl.org Sent: Mon, November 8, 2010 2:32:13 PM Subject: Re: Chomp help... You could try doing this with a regex: $html_content =~ s/\n//g; This would

Chomp help...

2010-11-08 Thread Bobby
Hi, I'm having issues with printing out the content of a Database's HTML text field; I wanted to chomp out the carriage returns of the $html_content(see below) so that I could print it out all in one line into a text file ($output). I've tried chomp() but it doesn't seems to work, does anyone

LWP Select Options Count

2009-05-12 Thread Bobby
Hi, I'm trying to use LWP to scape a website's content and count the number of options in a select dropdown box and ran into a bit of a stubling block.  Below is the code I have so far but it's not getting the desired results for me, could someone help me look through the code and give me some

Re: Date::CalC

2009-03-06 Thread Bobby
That works, thanks a lot for your help and suggestions guys!   Awsome! Have a great weekend all! --- On Fri, 3/6/09, Ryan Masters wrote: From: Ryan Masters Subject: Re: Date::CalC To: cybercruis...@yahoo.com Date: Friday, March 6, 2009, 5:28 PM Bobby, On Fri, Mar 6, 2009 at 5:45 PM, Bobby

Re: Date::CalC

2009-03-06 Thread Bobby
Correction, $publish_date should equals = "03/02/2009 12:32:03 PM" not 01/02/2009. my $publish_date = "03/02/2009 12:32:03 PM"; --- On Fri, 3/6/09, Bobby wrote: > From: Bobby > Subject: Date::CalC > To: beginners@perl.org > Date: Friday, March 6, 2009, 3

Date::CalC

2009-03-06 Thread Bobby
Hi, Could someone take a look at the code for me below and see if you can figure out what's wrong with it? I just want to evaluate $publish_date to see if it's with 21 days of the current date; if so then set $new_item=" True". Not sure why it's not doing that, I think the it's not evaluating

Re: Removing block of text in string

2009-01-20 Thread Bobby
10)}char(13) + char(10) blah > blah '; > > $string =~ s/(.*<\/script>)//; > > print "$string\n"; > > Bobby wrote: > > I need a better solution. Here's the whole block > of text that i have to remove from my text file. Thanks for > any sug

Re: Removing block of text in string

2009-01-19 Thread Bobby
(10) win.focus();char(13) + char(10)}char(13) + char(10)}char(13) + char(10)" --- On Mon, 1/19/09, Bobby wrote: > From: Bobby > Subject: Re: Removing block of text in string > To: beginners@perl.org > Date: Monday, January 19, 2009, 1:30 PM > I'm using se

Re: Removing block of text in string

2009-01-19 Thread Bobby
I'm using search and replace to solve this issue unless someone else have a better idea. Thanks. my $removeText=" type="text/javascript">function"; $string = ~s/$removeText//gi; --- On Mon, 1/19/09, Bobby wrote: > From: Bobby > Subject: Removing block

Removing block of text in string

2009-01-19 Thread Bobby
Hi, I have a javascript function in my long text string that i want to remove, how do i remove a text string from starting point to an ending point so that the javascript block to is remove from my text string? Thanks. Current: string = "this is my text string function blah blah..." Des

looping through multiple arrays

2008-09-04 Thread Bobby
Hi, I have a large pipe delimited text file that i want to loop through and sort out a column of data within that file. Let's call this column $sizes. I want to group these different sizes into categories. i.e. @sizeA = ("A","B","C"); @sizeB = ("D","E","F"); @sizeC = ("G","H","I"); This is what

Re: rand()

2008-07-28 Thread Bobby
TED], [EMAIL PROTECTED], beginners@perl.org Date: Monday, July 28, 2008, 12:13 PM On Mon, 2008-07-28 at 19:02 +0100, Aruna Goke wrote: > [EMAIL PROTECTED] wrote: > > On Mon, Jul 28, 2008 at 11:52 PM, Bobby <[EMAIL PROTECTED]> wrote: > >> Peng, > >> > >> > >

Re: rand()

2008-07-28 Thread Bobby
rom: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Subject: Re: rand() To: [EMAIL PROTECTED] Cc: beginners@perl.org Date: Monday, July 28, 2008, 9:58 AM On Mon, Jul 28, 2008 at 11:52 PM, Bobby <[EMAIL PROTECTED]> wrote: > Peng, > > > > Could you give me an example code? I want to rando

Re: rand()

2008-07-28 Thread Bobby
Jul 28, 2008 at 11:52 PM, Bobby <[EMAIL PROTECTED]> wrote: > Peng, > > > > Could you give me an example code? I want to randomly select X numbers of > numbers from the @nums list. For instance, i want to randomly select 3 > numbers from @nums i.e. 1, 10005, 14.

Re: rand()

2008-07-28 Thread Bobby
, Aruna Goke <[EMAIL PROTECTED]> wrote: From: Aruna Goke <[EMAIL PROTECTED]> Subject: Re: rand() To: "Perl beginners" Date: Monday, July 28, 2008, 9:54 AM Bobby wrote: > Hi all, > > How do I use the rand function to print out more than one random number for an array

Re: rand()

2008-07-28 Thread Bobby
00","150"); my $randnum = $nums[rand(@nums)]; print "$randnum \n"; --- On Mon, 7/28/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Subject: Re: rand() To: [EMAIL PROTECTED] Cc: beginners@perl.org Date: Monday, Jul

rand()

2008-07-28 Thread Bobby
Hi all,   How do I use the rand function to print out more than one random number for an array? In the example script below i have an array @nums with a list of numbers; how do i print out more than one random numbers from that list (@nums)? Thanks.   #!/usr/bin/perl use strict; use warnings; m

RE: Foreach with array of hashes

2008-07-19 Thread Bobby Jafari
Thanks heaps. Problem solved. code changed to Line 10: @snmpS = (\%snmpSession1, \%snmpSession2); Line 11: foreach $snmpS (@snmpSessions) Line 12: { Line 13:ðernetGlobalMode ($snmpS); Line 14: }

Foreach with array of hashes

2008-07-19 Thread Bobby Jafari
C:\SVN\qa-tests\2084\testcase\TC-Ether-Type-Test.pl aborted due to compilation errors. Thanks for your comments and feedback. Regards, Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Mailing List Replies?

2008-06-20 Thread Bobby
es can be easily missed it is common to reply to both list and the poster. You'll see this on busy lists, especially where there are a lot of old timers who are used to the issues. -- Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: hash

2008-05-23 Thread Bobby
ROTECTED]> wrote: Bobby wrote: > > Rob Dixon wrote: >> >> Bobby wrote: >>> >>> I have a flat file that contains a pid, us_size and euro_size. I want to >>> create read in the file and create one hash for the us_size (%US) and the >>> other

Re: hash

2008-05-22 Thread Bobby
Rob, Yes the pids are unique. I've tried the comparison below but didn't worked, so what do you think is wrong with it? if ($pidsizes{$pid}{US} = $pidsizes{$pid}{EU}){ print "$pidsizes{US}{$us}"; Rob Dixon <[EMAIL PROTECTED]> wrote: Bobby wrote: > >

Re: hash

2008-05-22 Thread Bobby
ed some help here #foreach my $sizeb ( sort keys %US ){ #if ($US{$sku} = $EURO{$sku}){ #print "$size Euro - $sizeb US\n"; #} # } $n++ } Rodrick Brown <[EMAIL PROTECTED]> wrote: On Thu, May 22, 2008 at 12:39 PM, Bobby wrote: >

Re: hash

2008-05-22 Thread Bobby
t;[EMAIL PROTECTED]> wrote: On Thu, May 22, 2008 at 12:39 PM, Bobby wrote: > Hi all, > > I have a flat file that contains a pid, us_size and euro_size. I want to > create read in the file and create one hash for the us_size (%US) and the > other for the euro_size (%EURO). Then i want

hash

2008-05-22 Thread Bobby
Hi all, I have a flat file that contains a pid, us_size and euro_size. I want to create read in the file and create one hash for the us_size (%US) and the other for the euro_size (%EURO). Then i want to do a print statement if the pid value in the us_size hash is equal to pid value in the euro_

Re: subroutine

2008-03-26 Thread Bobby
Thanks, the latter one works for me. Appreciate all the help. "Chas. Owens" <[EMAIL PROTECTED]> wrote: On Wed, Mar 26, 2008 at 12:32 PM, Bobby wrote: > Chas, > > Thanks for all your pointers. I guess i should read a Perl book first before > attempting to write code

Re: subroutine

2008-03-26 Thread Bobby
L0:d)) Thanks! __DATA__ 1|A 2|A,F,G,H 3|A1,a2 4|F 5|G 6|A,G "Chas. Owens" <[EMAIL PROTECTED]> wrote: On Tue, Mar 25, 2008 at 1:47 PM, Bobby wrote: > Hi, > > I need another set of eyes to help look over the codes below. I have a > subroutine that check for a comma

subroutine

2008-03-25 Thread Bobby
Hi, I need another set of eyes to help look over the codes below. I have a subroutine that check for a comma in $strA and do some regex replacement, if there's no comma then return the values of the two arguments passed to it. The IF in my sub worked but the Else part didn't return any thing wh

Re: Concatenating Strings

2008-03-25 Thread Bobby
Thanks for all your input, using a hash does make things a lot easier for me. Rob Dixon <[EMAIL PROTECTED]> wrote: kens wrote: > > # Or if you must use a counter > > my $count = 0; > > while ( defined($strA[$count]) ) > { >print "$strA[$count++]\n"; > } for my $count (0 .. $#strA) { p

Re: Concatenating Strings

2008-03-24 Thread Bobby
Thanks for both of your suggestions. I've tried them both but still getting same result. Any other suggestions? Thanks. Wolf <[EMAIL PROTECTED]> wrote: Bobby wrote: > Wolf, > > I still don't understand, so set my $strB = "$strA($count)"; ? That

Re: Concatenating Strings

2008-03-24 Thread Bobby
Wolf, I still don't understand, so set my $strB = "$strA($count)"; ? That didn't worked. Wolf <[EMAIL PROTECTED]> wrote: Bobby wrote: > Hi all, > > I'm trying to write a simple do until loop to print out the value of $strA0 > through $striA

Concatenating Strings

2008-03-24 Thread Bobby
Hi all, I'm trying to write a simple do until loop to print out the value of $strA0 through $striA3. What i'm doing is replacing the value of 0 through 3 in the $strA by joining two strings (my $strB = "strA" . $count;). Right now my script is printing $strB as below. How do i get perl to prin

Loop within Loop

2008-03-18 Thread Bobby
I have a text file with five colums of data (ColumA-E). Within each column there could be multiple data with a comma seperating each piece of data. How do i white a loop to parse through the data set and assign each column a variable and each piece of data within that column a different variable?

Re: substr help

2008-03-06 Thread Bobby
ude_psc.txt' file. For more efficiency use File::ReadBackwards and only read one record. "John W. Krahn" <[EMAIL PROTECTED]> wrote: Bobby wrote: > Could someone please tell me what's wrong with my use of the > substr function below? I keep on getting "use of u

Re: substr help

2008-03-06 Thread Bobby
That works, thanks Tom! Tom Phoenix <[EMAIL PROTECTED]> wrote: On Thu, Mar 6, 2008 at 8:31 AM, Bobby wrote: > Use of uninitialized value in concatenation (.) or string at generatePsc.pl > line 48, line 5. Is this what you seek? next unless defined $PSC; It can a

Re: substr help

2008-03-06 Thread Bobby
John, I don't understand, why would that only get me the last record in the text file? Is there a better way to do that? I'm still kinda new with Perl, don't use it enough. %ex_psc = (exclpsc=>$excpsc,exkeyword =>$keyword ); "John W. Krahn" <[EMAIL PROTE

Re: substr help

2008-03-06 Thread Bobby
Below is what i get when i tried to print just the $PSC variable. So the $PSC column has the value of (PSC, FCSD2, ADEK1, ADEZ2). I did put in a check for alphanumeric in $PSC if ($PSC =~ /^[a-zA-Z0-9]+$/) before doing the substr but still have same issue. What i'm trying to do is to look for

Re: substr help

2008-03-05 Thread Bobby
Sorry, i've left out some details in my previous email. I've isolated the code and it works without the substr function. Thanks in advance for any suggestions. Bobby <[EMAIL PROTECTED]> wrote: Could someone please tell me what's wrong with my use of the substr func

substr help

2008-03-05 Thread Bobby
Could someone please tell me what's wrong with my use of the substr function below? I keep on getting "use of uninitialized value in substr". Thanks. $newpsc = substr($PSC,0,$count); Here's the complete code: #!/usr/bin/perl use strict; use warnings; my $exclude_psc = 'exclude_psc.txt'; my $c

Re: Command line installing perl modules

2008-01-31 Thread Bobby
sages listed as warnings right after where it usually says all OK? -- Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Command line installing perl modules

2008-01-31 Thread Bobby
On Thursday 31 January 2008 20:15:22 Chas. Owens wrote: > On Jan 31, 2008 7:44 PM, Bobby <[EMAIL PROTECTED]> wrote: > > On Thursday 31 January 2008 17:45:53 Chas. Owens wrote: > > > On Jan 31, 2008 3:01 PM, Bobby <[EMAIL PROTECTED]> wrote: > > > snip > &

Re: Command line installing perl modules

2008-01-31 Thread Bobby
On Thursday 31 January 2008 17:45:53 Chas. Owens wrote: > On Jan 31, 2008 3:01 PM, Bobby <[EMAIL PROTECTED]> wrote: > snip > > > This will be done only on brand new Slackware 12 installs which does not > > have CPAN. > > snip > > That doesn't sound rig

Command line installing perl modules

2008-01-31 Thread Bobby
re 12 installs which does not have CPAN. I was thinking of copying .cpan but it's probably not even needed, and might introduce incompatibility issues. The important part is to get a cookie cutter system that can be done over and over. -- Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: about the dot

2008-01-22 Thread Bobby
ion, but this case really make people confused. > > I challenge you to find a single person "confused" by the difference > between > 3.4 > and > 3 . 4 > > Paul Lalli Did you not just now find that? :) Suppose, making sure you are both talking about the same things is OK too. -- Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: cpan command line

2007-09-28 Thread Bobby
On Friday 28 September 2007 12:26:08 Paul Lalli wrote: > On Sep 28, 9:26 am, [EMAIL PROTECTED] (Bobby) wrote: > > On Friday 28 September 2007 06:01:31 Srinivas wrote: > > > just hit "Enter" > > > > > > -srini > > > > > > Bobby wrote:

Re: cpan command line

2007-09-28 Thread Bobby
On Friday 28 September 2007 06:01:31 Srinivas wrote: > just hit "Enter" > > -srini > > Bobby wrote: > > Hi, > > > > What is the command to tell cpan to accept the default/suggested values? No. Command line option so you don't have to be there and

Re: Bundle::CPAN install error

2007-09-27 Thread Bobby
e test PERL_DL_NONLAZY=1 /usr/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00signature...ok 1/1 skipped: various reasons t/01loadme..ok t/02nox.ok t/03pkgsok 1/11 It gets stuck at this point until I break out of it. -- Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

cpan command line

2007-09-27 Thread Bobby
Hi, What is the command to tell cpan to accept the default/suggested values? -- Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Bundle::CPAN install error

2007-09-27 Thread Bobby
On Thursday 27 September 2007 19:41:53 Tom Phoenix wrote: > On 9/27/07, Bobby <[EMAIL PROTECTED]> wrote: > > t/03pkgsok 1/11 > > > > (Here I pressed Ctrl-C after a few hours (I went to bed) of sitting on > > test 1/11.) > > It sounds as if th

Bundle::CPAN install error

2007-09-27 Thread Bobby
installation problems: CPAN I think the best is to remove cpan and start over except I've not been able to figure out how. Thanks! -- Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: Accessing TCL api via perl

2006-08-23 Thread Bobby Jafari
> I am using a test gear that uses a TCL api for automation. However, all > my test environment is in perl. Has anybody done any work in perl such > that they can call TCL API commands and capture both return codes and > other outputs. > > Every TCL API instruction that I use, would create a handle

Accessing TCL api via perl

2006-08-22 Thread Bobby Jafari
of some sort (i.e. a value that can be use to destinguish the call in a unique fashion). I have looked at a few TCL modules from CPAN but I am still looking for some more guidance. Any help/reference or sample code would be welcome. Regards, Bobby Jafari QA / Test Engineer Senetas Security Pty

RE: How do I do this on Perl ...

2006-08-22 Thread Bobby Jafari
my @vowels = ("a","b","c","d"); my $letter; foreach $letter (@vowels) { print "$letter\n"; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: executing/calling another perl script

2006-04-09 Thread Bobby Jafari
> I need to call/execute another perl file from my backup.pl perl script by giving some argument. > Can anybody please tell me how to do that? my result = system (perl other-script.pl ) or my result = `perl other-script.pl ` #using back ticks` -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

RE: want to install

2005-11-27 Thread Bobby Jafari
there is any person in the list that has telepathic abilities. Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: Problems with set-request NET::SNMP - retransmited

2005-10-05 Thread Bobby Jafari
Hi Jeff, The solution was "\xHH\xMM" Thanks for all your suggestions. It got me going. Regards, Bobby -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Wednesday, 5 October 2005 21:21 To: Bobby Jafari Cc: beginners@perl.org Subject: R

Problems with set-request NET::SNMP - retransmited

2005-10-05 Thread Bobby Jafari
empty string) I can confirm that all other set-requests are done correctly using get-request. Any idea's. I have spent the whole day on this and have made progress. Please help me ( Pretty please with sugar on top) Best regards Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Problems with set-request NET::SNMP

2005-10-05 Thread Bobby Jafari
think it returns an empty string) I can confirm that all other set-requests are done correctly using get-request. Any idea's. I have spent the whole day on this and have made progress. Please help me ( Pretty please with sugar on top) Best regards Bobby

Need help with Perl Book

2005-10-03 Thread Bobby Jafari
Perl? What other books are available that are specifically Aimed at GUI design for Perl scripts? Thanks heaps for your feedback ( In advance (:-) ) Regards, Bobby

RE: script to enumerate window services

2003-09-09 Thread Brown, Bobby (US - Hermitage)
Various scripts here I use to gather information from remote servers Bobby -Original Message- From: Leon [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 8:53 AM To: perl; Yahoo Beginner Perl; win32 Subject: script to enumerate window services Hi everyone, Does anyone know

sorting log

2002-08-28 Thread bobby
perl. For all the guru's out there i know its very simple please help Hmmm i hope i have explained the concept correctly Cheers Bobby -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

beginners

2001-06-19 Thread Bobby Shea
unsubscribe

Re: create a new file

2001-06-01 Thread bobby robinson
you might also find the unix command 'touch' useful. read the man page for specifics. ___ [EMAIL PROTECTED] http://www.quantifier.org ___ If I had any humility I would be perfect. -- T