RE: This is weird: Pop works but shift doesn't

2005-04-04 Thread Thomas Bätzler
Harold Castro <[EMAIL PROTECTED]> wrote: > I'm parsing a log file that contains this format: > > 1112677214 31388202 181264589 > 1112677214 8843 59460 8843 59460 > 1112676919 10728 59045 10728 59045 > 1112676900 10617 59006 10728 59045 > 1112676600 8693 58389 9531 59661 > > These logs are in uni

This is weird: Pop works but shift doesn't

2005-04-04 Thread Harold Castro
Hi, I'm parsing a log file that contains this format: 1112677214 31388202 181264589 1112677214 8843 59460 8843 59460 1112676919 10728 59045 10728 59045 1112676900 10617 59006 10728 59045 1112676600 8693 58389 9531 59661 These logs are in unix timestamp format: I'm trying to convert the first

Re: multiple statments with ||

2005-04-04 Thread John W. Krahn
Michael Gale wrote: Hello, Hello, I have the following piece of code: --snip-- if ($_ eq "read") { open(fileid, "/tmp/mysql_lastid") || $lastid=0; $lastid = ; close(fileid); } --snip-- With the fail of opening the file, I want the variable to be set to zero and prin

Re: multiple statments with ||

2005-04-04 Thread mgoland
- Original Message - From: Michael Gale <[EMAIL PROTECTED]> Date: Monday, April 4, 2005 11:30 pm Subject: multiple statments with || > Hello, Yo > > I have the following piece of code: > > --snip-- > if ($_ eq "read") { > open(fileid, "/tmp/mysql_lastid") || $lastid=0; >

Re: Net::SSH::Perl bind socket problem

2005-04-04 Thread mgoland
- Original Message - From: gui <[EMAIL PROTECTED]> Date: Monday, April 4, 2005 3:16 pm Subject: Net::SSH::Perl bind socket problem > hello, > > I'm making a simple script that's supposed to update a certain > number of > boxes, spread around the area. > my script is supposed to to con

multiple statments with ||

2005-04-04 Thread Michael Gale
Hello, I have the following piece of code: --snip-- if ($_ eq "read") { open(fileid, "/tmp/mysql_lastid") || $lastid=0; $lastid = ; close(fileid); } --snip-- With the fail of opening the file, I want the variable to be set to zero and print a message to standard out

Re: Many SQL clauses executing

2005-04-04 Thread Daniel Kasak
Nicolay Vasiliev wrote: > Hello there! > > I tried to execute many SQL-clauses ";" separated by DBI::do() method > but got an error message about SQL syntax mistake. If I execute the > same SQL from MySQL shell or some MySQL GUI all works fine. Is > DBI::do() method able to perform many SQL clause

Net::SSH::Perl bind socket problem

2005-04-04 Thread gui
hello, I'm making a simple script that's supposed to update a certain number of boxes, spread around the area. my script is supposed to to connect to every hosts (via a file named "hosts") using ssh, launch wget to retrieve the patch update, and install it. Things work fine for the first host of

RE: Regexp::Common

2005-04-04 Thread Brian Volk
> -Original Message- > From: Brian Volk [mailto:[EMAIL PROTECTED] > Sent: Monday, April 04, 2005 11:30 AM > To: Beginners (E-mail) > Subject: Regexp::Common > > > Hi All, > > I have a directory of .txt files, a couple thousand and I > want to pull out > all the files that have "descr

Regexp::Common

2005-04-04 Thread Brian Volk
Hi All, I have a directory of .txt files, a couple thousand and I want to pull out all the files that have "descriptions/product/MSDS" hard coded in the document. Is this possible to do w/ Regexp::Common? Here is what I have so far... ---begin use strict; use warnings; use Regexp::Common;

Re: Perl vs. Ruby?

2005-04-04 Thread Harsh Busa
On Apr 4, 2005 9:10 PM, Chris Devers <[EMAIL PROTECTED]> wrote: > On Mon, 4 Apr 2005 [EMAIL PROTECTED] wrote: > > > Is anyone familiar with Ruby? > > A little. It's an interesting language -- it's like Perl with a much > different (& arguably cleaner) approach to object-oriented programming. > >

perl.beginners Weekly list FAQ posting

2005-04-04 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address):

RE: regular expressions with "and do {" ?

2005-04-04 Thread Bob Showalter
Michael Gale wrote: > ... > m|output:DISK (\w+) \[(\d+) kB \((\d+)%\) free on (\S+)\]| and do { > my $status = $1; > my $kb_free = $2; > my $pct_free = $3; > my $mount= $4; > push @s, [ $mount, [ blockpct, GAUGE, $pct_free ] ]; > }; > > I do not understand the "and do" option. "

regular expressions with "and do {" ?

2005-04-04 Thread Michael Gale
Hello, I am using nagios graph to plot performance data returned from nagios plugins. The file uses regular expressions to parse the data and provide it to rrd tool. The following is from Chris Wilson's post on the nagios mailing list, I was wondering if some one could explain this bit a code: -

Re: Perl vs. Ruby?

2005-04-04 Thread Chris Devers
On Mon, 4 Apr 2005 [EMAIL PROTECTED] wrote: > Is anyone familiar with Ruby? A little. It's an interesting language -- it's like Perl with a much different (& arguably cleaner) approach to object-oriented programming. A lot of the people working on Perl6 like Ruby a lot, and are consciously tak

Perl vs. Ruby?

2005-04-04 Thread brian . barto
Is anyone familiar with Ruby? If so, how do you think it stacks up against perl? I'm looking to learn another unix scripting lang and it looks like Ruby may be a good fit. Some excerpts from their web site: "Ruby's syntax and design philosophy are heavily influenced by Perl. It has a lot of syn

RE: Many SQL clauses executing

2005-04-04 Thread Bob Showalter
Nicolay Vasiliev wrote: > Hello there! > > I tried to execute many SQL-clauses ";" separated by DBI::do() method > but got an error message about SQL syntax mistake. You must execute statements one at a time with do(). Don't add semicolons at the end. > If I execute the > same SQL from MySQL sh

Many SQL clauses executing

2005-04-04 Thread Nicolay Vasiliev
Hello there! I tried to execute many SQL-clauses ";" separated by DBI::do() method but got an error message about SQL syntax mistake. If I execute the same SQL from MySQL shell or some MySQL GUI all works fine. Is DBI::do() method able to perform many SQL clauses at all? If no what method or fu

RE: Re[2]: GeoIPCity.dat

2005-04-04 Thread Thomas Bätzler
John <[EMAIL PROTECTED]> said: > Ing. Branislav Gerzo <[EMAIL PROTECTED]> suggested: > J>> I cannot find GeoIPCity.dat for downloading. > J>> Has anyone tried that? > > just use google: > > http://www.maxmind.com/download/geoip/database/ > That database is only for the country, not the cities.

Re: Lost here.. Use of uninitialized value in print?

2005-04-04 Thread Felix Geerinckx
On 04/04/2005, [EMAIL PROTECTED] wrote: > open (TEXT, "list.txt") or die "Error. No such file\n"; > @rawtext=; > close(TEXT); According to your own follow-up, @rawtext will have the following content: $rawtext[0] = '$file1.txt$' . "\n"; $rawtext[1] = '$file2.txt$' . "\n"; etc ... > $

Re: Lost here.. Use of uninitialized value in print?

2005-04-04 Thread five421
Hi, > well, your line, > $list1 = @rawtext; ( using the above as list.txt) means > > $list1 is the number of lines in @rawtext which is 5. > > Then you want to go and split that value, 5 on non existant $ delimiters. > > So the next question is "What are you expecting from your split operation

Re: Lost here.. Use of uninitialized value in print?

2005-04-04 Thread Owen
On Mon, 04 Apr 2005 21:42:36 +1000 [EMAIL PROTECTED] wrote: > Sorry, I should have included the text file in my original message. It > simply contains at this stage > > $File1.txt$ > $File2.txt$ > $File3.txt$ > $File4.txt$ > $File5.txt$ well, your line, $list1 = @rawtext; ( using the above as

Re: GeoIPCity.dat

2005-04-04 Thread Ing. Branislav Gerzo
John [J], on Monday, April 4, 2005 at 15:02 (+0300) thoughtfully wrote the following: J> That database is only for the country, not the cities. maybe you are looking for, if you go to parent directory parent directory worldcities.txt.gz http://www.maxmind.com/download/worldcities/ helps ? Also

Re: Lost here.. Use of uninitialized value in print?

2005-04-04 Thread Offer Kaye
On Apr 4, 2005 2:42 PM, [EMAIL PROTECTED] wrote: > > Using use strict; I end up with a range of warnings, I don't know how > relevant they are here. Thanks again. > Those aren't warnings, they are errors - your program is not compiling correctly. You need to place a "my" in front of your variabl

Re[2]: GeoIPCity.dat

2005-04-04 Thread John
From: Ing. Branislav Gerzo <[EMAIL PROTECTED]> To: beginners@perl.org Date: Monday, April 4, 2005, 2:54:31 PM Subject: GeoIPCity.dat Monday, April 4, 2005, 2:54:31 PM, you wrote: > John [J], on Monday, April 4, 2005 at 14:46 (+0300) contributed this > to our collective wisdom: J>> I canno

Re: GeoIPCity.dat

2005-04-04 Thread Ing. Branislav Gerzo
John [J], on Monday, April 4, 2005 at 14:46 (+0300) contributed this to our collective wisdom: J> I cannot find GeoIPCity.dat for downloading. J> Has anyone tried that? just use google: http://www.maxmind.com/download/geoip/database/ -- ...m8s, cu l8r, Brano. [72: 69 with 3 people watching]

GeoIPCity.dat

2005-04-04 Thread John
I am trying to put GeoIP into work for the cities derived from ip and hostnames. I cannot find GeoIPCity.dat for downloading. Has anyone tried that? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Lost here.. Use of uninitialized value in print?

2005-04-04 Thread five421
Hi, Sorry, I should have included the text file in my original message. It simply contains at this stage $File1.txt$ $File2.txt$ $File3.txt$ $File4.txt$ $File5.txt$ Using use strict; I end up with a range of warnings, I don't know how relevant they are here. Thanks again. D:\My Documents\Perl>

Re: Lost here.. Use of uninitialized value in print?

2005-04-04 Thread Owen
On Mon, 04 Apr 2005 20:41:57 +1000 [EMAIL PROTECTED] wrote: > > > I am new to Perl and am trying to code a simple program that will read a > list of files from a text file then present the user with some options > regarding those files (hope that makes some sense). Unfortunately after > much sear

Lost here.. Use of uninitialized value in print?

2005-04-04 Thread five421
Hello everyone, I am new to Perl and am trying to code a simple program that will read a list of files from a text file then present the user with some options regarding those files (hope that makes some sense). Unfortunately after much searching/reading on the web and playing around with the code