Re: Checking the two variable

2007-11-16 Thread Jeff Pang
the simplest way: if ( $val1 eq $val2 ) { do something... } else { do another thing... } but, since this is a datetime string, for better control, you may want to take the way of comparing them with time. see some modules like Time::Local. On Nov 17, 2007 12:36 PM, sivasakthi <[EMAIL PRO

Checking the two variable

2007-11-16 Thread sivasakthi
Hi all, I have the two variables, like below, $val1=[15/Apr/2005:11:46:35 +0300]; $val2=[12/Nov/2007:14:59:00 +0530]; I want to check these two variables are equal or not.. I know the method of splitting the each column and compare it.. but it too large.. is it possible to check with easily??

Re: using lenght

2007-11-16 Thread John W . Krahn
On Friday 16 November 2007 09:44, lerameur wrote: > hello, Hello, > I have a small function using lenght, I am getting the > following error: > Use of uninitialized value in length at ./count2.pl line 95, < > $wordlisting1> line 1. > > while (my $line = <$wordlisting1> ) { > if ($line =~ m/

Re: perl monitor programs for linux

2007-11-16 Thread Rob Dixon
Jeff Pang wrote: > On Nov 16, 2007 6:19 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: You should *always* check the return value of system functions like open(), flock(), seek(), chdir(), unlink(), etc. Thanks John. I know it's good to check the return value at those places. But I don't think

Re: 400 bad request while retrieving a frame page with WWW::Mechanize

2007-11-16 Thread Tom Phoenix
On 11/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I get an html page with a 400 error code (Bad Request) > When asking for this page directly from a browser (Firefox or IE) it > works fine... This happens often enough that it is covered in the FAQ for WWW::Mechanize: http://searc

Problem with Hashes

2007-11-16 Thread Travis Hervey
I have the below code that is reading in a csv file and writing an xml file. The code as is will work fine if I remove the use strict line. ( I would prefer not to do this.) However as it is now with the use strict it gives me a runtime error of: "Can't use string ("") as a HASH ref while "stric

Re: using lenght

2007-11-16 Thread Gunnar Hjalmarsson
lerameur wrote: hello, I have a small function using lenght, I am getting the following error: Use of uninitialized value in length at ./count2.pl line 95, < $wordlisting1> line 1. while (my $line = <$wordlisting1> ) { if ($line =~ m/backlog/ ) { my @items = (split(/,/,$line))[0

Re: using lenght

2007-11-16 Thread Paul Johnson
On Fri, Nov 16, 2007 at 09:44:51AM -0800, lerameur wrote: > hello, I have a small function using lenght, I am getting the > following error: > Use of uninitialized value in length at ./count2.pl line 95, < > $wordlisting1> line 1. > > while (my $line = <$wordlisting1> ) { > if ($line =~ m/

using lenght

2007-11-16 Thread lerameur
hello, I have a small function using lenght, I am getting the following error: Use of uninitialized value in length at ./count2.pl line 95, < $wordlisting1> line 1. while (my $line = <$wordlisting1> ) { if ($line =~ m/backlog/ ) { my @items = (split(/,/,$line))[0..88];

Re: Problem with Hashes

2007-11-16 Thread Paul Lalli
On Nov 16, 10:26 am, [EMAIL PROTECTED] (Travis Hervey) wrote: > I have the below code that is reading in a csv file and writing an xml > file. The code as is will work fine if I remove the use strict line. ( > I would prefer not to do this.) However as it is now with the use > strict it gives me

select on file handle

2007-11-16 Thread ton de w
Hello List, Have some code I dont quite understand first line (appart from some harmless variable setting is: select((select(STDOUT), $| = 1)[0]); Could someone help with an explanation please? Will this work on unix and windows BTW? TIA Ton -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: Problem with Hashes

2007-11-16 Thread Travis Hervey
Thanks Tom and the many others that responded. It is much appreciated. Travis Hervey -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Phoenix Sent: Friday, November 16, 2007 12:18 PM To: Travis Hervey Cc: beginners@perl.org Subject: Re: Problem with

Re: perl monitor programs for linux

2007-11-16 Thread Chas. Owens
On Nov 16, 2007 6:31 AM, Jeff Pang <[EMAIL PROTECTED]> wrote: snip > > You should *always* check the return value of system functions like > > open(), flock(), seek(), chdir(), unlink(), etc. > > > Thanks John. I know it's good to check the return value at those places. > But I don't think it's so

Re: 400 bad request while retrieving a frame page with WWW::Mechanize

2007-11-16 Thread yitzle
On Nov 16, 2007 6:28 AM, <[EMAIL PROTECTED]> wrote: > Hi everyone > > I get an html page with a 400 error code (Bad Request) when running > the following code: > > #!/usr/bin/perl -w > use strict; > use warnings; > use WWW::Mechanize; > > my $mech = WWW::Mechanize->new( agent => 'Mozilla 2.0.0.9'

Re: Problem with Hashes

2007-11-16 Thread Tom Phoenix
On 11/16/07, Travis Hervey <[EMAIL PROTECTED]> wrote: > I have the below code that is reading in a csv file and writing an xml > file. The code as is will work fine if I remove the use strict line. ( > I would prefer not to do this.) All of us would prefer that you keep 'use strict'! > However

RE: :mysql::st execute failed: Column count doesn't match value count at row 1 a

2007-11-16 Thread Jo for Groups and Lists
After viewing this again IN PLAIN TEXT You have an unmatched double quote here. AND an unmatched single quote AND a backtick. No wonder it's not behaving as expected. Would have been easier to spot without that stationary. Jo -Original Message- From: Jo for Groups and Lists [mailto

Re: matching and parsing commands

2007-11-16 Thread Tom Phoenix
On 11/15/07, alok nath <[EMAIL PROTECTED]> wrote: >Is it possible to write some kind of grammars for the command and parse it > ? Probably. Have you seen Parse::RecDescent? http://search.cpan.org/dist/Parse-RecDescent/ Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe,

perl with mysql which takes a file as a input that contains t he info to create the tables

2007-11-16 Thread prady
hi all > > i am creating a perl script which takes the input from the file to > create tables, inserting values into the database. As you all know the > only procedure for taking input from a file (using perl script) into > MySQL database is through (?) place holders. > for example , > > $sth=$dbh-

Re: interface Perl script with an external website (Pass Values to a web)

2007-11-16 Thread Paul Lalli
On Nov 15, 6:52 pm, [EMAIL PROTECTED] (newBee) wrote: > I have the fallowing html code, and in this code segment i want to > fill the field but the problem is instead of name the field as name"blabla"/> they use the tag. > It will be a great help if someone could guide me on this... id is not a

Re: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 a

2007-11-16 Thread Jeff Pang
On Nov 16, 2007 9:39 PM, Siva Prasad <[EMAIL PROTECTED]> wrote: > > > > > Hi Gurus, > > > > I am getting the following error while trying to insert into database.I am > getting the following only for this table, For all other tables I am able to > isnert data > > > > ---

RE: :mysql::st execute failed: Column count doesn't match value count at row 1 a

2007-11-16 Thread Jo for Groups and Lists
my $sql="insert into $table values ('2345','4355','834','894,'766'); You have an unmatched double quote here. Jo <>

Re: Check if a module is installed properly

2007-11-16 Thread jeevs
I really m not getting what exactly I was doing wrong. But the next time I tried the same thing to see the version i.e perl - MNet::SSH::Perl -e "print $Net::SSH::Perl::VERSION" , it worked... I am so thankfull for your valuable comments. - Nexis http://startperl.blogspot.com -- To

Re: PAR-PP package on Windows

2007-11-16 Thread Chas. Owens
On Nov 16, 2007 3:03 AM, anders <[EMAIL PROTECTED]> wrote: > I have installed PP (PAR-Package) under OS/X and it works fine > > Under Windows i use ActiveState's PERL and PPM manager to > install PAR, it works fine and it founds extra package etc.. snip For some reason (possibly because they have

Re: PAR-PP package on Windows

2007-11-16 Thread anders
On 16 Nov, 11:55, [EMAIL PROTECTED] (Martin Barth) wrote: > Hi, > > I am trying the same thing, too. > this describes why there is no pp. > > http://par.perl.org/wiki/FAQ#Why_doesn.27t_PAR_include_pp_any_more.3F > > if you have a solution please show it to us :) > > Regards, Martin > > On 9:03:00 1

Re: PAR-PP package on Windows

2007-11-16 Thread anders
On 16 Nov, 11:55, [EMAIL PROTECTED] (Martin Barth) wrote: > Hi, > > I am trying the same thing, too. > this describes why there is no pp. > > http://par.perl.org/wiki/FAQ#Why_doesn.27t_PAR_include_pp_any_more.3F > > if you have a solution please show it to us :) > > Regards, Martin > > On 9:03:00 1

Re: perl with mysql which takes a file as a input that contains t he info to create the tables

2007-11-16 Thread Chas. Owens
On Nov 16, 2007 1:52 AM, Pradeep Kumar <[EMAIL PROTECTED]> wrote: snip > NOW I WANTED TO KNOW THE PROCEDURE FOR TAKING THE CODE AS INPUT FROM A > TEXT FILE & CREATE THE SPECIFIED TABLE snip Don't yell. Warning, this is untested code and may blow up in your face. Second warning, this code is very

400 bad request while retrieving a frame page with WWW::Mechanize

2007-11-16 Thread lcerneka
Hi everyone I get an html page with a 400 error code (Bad Request) when running the following code: #!/usr/bin/perl -w use strict; use warnings; use WWW::Mechanize; my $mech = WWW::Mechanize->new( agent => 'Mozilla 2.0.0.9' ); $mech->get('http://www.aeroporto.fvg.it/tab/fmarrb.php'); my $ar

DBD::mysql::st execute failed: Column count doesn't match value count at row 1 a

2007-11-16 Thread Siva Prasad
Hi Gurus, I am getting the following error while trying to insert into database.I am getting the following only for this table, For all other tables I am able to isnert data

Re: PAR-PP package on Windows

2007-11-16 Thread Martin Barth
anders accedently only worte a usefull mail to me: anders <[EMAIL PROTECTED]> wrote Hi! Tanks for pointing out the error I have solve it by adding a extra resource (activestate was not up-to- date) In ppm manager a added http://theoryx5.uwinnipeg.ca/ppms/package.xml And select show-all package a

Re: Check the Number is floating point number or not

2007-11-16 Thread John W . Krahn
On Friday 16 November 2007 02:10, sivasakthi wrote: > Hi All, Hello, > How to check the number is floating point number or not??? perldoc -q float John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://le

Re: PAR-PP package on Windows

2007-11-16 Thread Martin Barth
Hi, I am trying the same thing, too. this describes why there is no pp. http://par.perl.org/wiki/FAQ#Why_doesn.27t_PAR_include_pp_any_more.3F if you have a solution please show it to us :) Regards, Martin On 9:03:00 16/11/2007 anders <[EMAIL PROTECTED]> wrote: > I have installed PP (PAR-Packa

Re: perl monitor programs for linux

2007-11-16 Thread Jeff Pang
On Nov 16, 2007 6:19 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > > You should *always* check the return value of system functions like > open(), flock(), seek(), chdir(), unlink(), etc. > > Thanks John. I know it's good to check the return value at those places. But I don't think it's so value

Re: select on file handle

2007-11-16 Thread John W . Krahn
On Friday 16 November 2007 00:24, ton de w wrote: > Hello List, Hello, > Have some code I dont quite understand > first line (appart from some harmless variable setting is: > select((select(STDOUT), $| = 1)[0]); > > Could someone help with an explanation please? perldoc -q flush > Will this wo

Re: select on file handle

2007-11-16 Thread Jeff Pang
On Nov 16, 2007 4:24 PM, ton de w <[EMAIL PROTECTED]> wrote: > Hello List, > > Have some code I dont quite understand > first line (appart from some harmless variable setting is: > select((select(STDOUT), $| = 1)[0]); > select FH returns the before handler which had been selected. so the return va

PAR-PP package on Windows

2007-11-16 Thread anders
I have installed PP (PAR-Package) under OS/X and it works fine Under Windows i use ActiveState's PERL and PPM manager to install PAR, it works fine and it founds extra package etc.. But when i open a terminal and try pp -o hello.exe hello.pl It just say pp not found... And i can't found any und

perl with mysql which takes a file as a input that contains t he info to create the tables

2007-11-16 Thread Pradeep Kumar
hi all > > i am creating a perl script which takes the input from the file to > create tables, inserting values into the database. As you all know the > only procedure for taking input from a file (using perl script) into > MySQL database is through (?) place holders. > for example , > > $sth=$dbh

Check the Number is floating point number or not

2007-11-16 Thread sivasakthi
Hi All, How to check the number is floating point number or not??? I have tried the code following, #! /usr/bin/perl use strict; use warnings; my $val=124718247874.543; if ($val =~ m#^(\d+)\.(\d\d\d)#; { print "it is a float\n"; } Thanks, Siva

Re: perl monitor programs for linux

2007-11-16 Thread John W . Krahn
On Friday 16 November 2007 00:09, Jeff Pang wrote: > > Many thanks to John W. Krahn, the monagt was upgraded, fixed some > bugged or not good code. > If there's any other problem, please let me know. > I have used mon and nagios for system monitor, but both them are not > easy to configure for. > T

Re: perl monitor programs for linux

2007-11-16 Thread Jeff Pang
Hello everyone, Many thanks to John W. Krahn, the monagt was upgraded, fixed some bugged or not good code. If there's any other problem, please let me know. I have used mon and nagios for system monitor, but both them are not easy to configure for. Then I got the code by Angel, and with her permis

Re: perl monitor programs for linux

2007-11-16 Thread John W . Krahn
On Thursday 15 November 2007 17:57, Jeff Pang wrote: > > On Nov 16, 2007 2:16 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: > > > > First, what is 'nc'? I have an nc program on my HD but I don't > > think > > > > Somewhere else in the program you say it is used for port scanning. > > Perhaps if you