AW: Is there any method to tell different between warning and errors?

2010-04-19 Thread Thomas Bätzler
Jeff Pang wrote: > On Tue, Apr 20, 2010 at 1:28 PM, Weizhong Dai > wrote: > > Hi all, > > In my script, I have a system call, and redirect the stderr to a > file. > >        # > >        # open STDERR, ">$workpath\\error_log.txt"; > >        # system "..."; > >        # > > but I only want the E

Re: Is there any method to tell different between warning and errors?

2010-04-19 Thread Jeff Pang
On Tue, Apr 20, 2010 at 1:28 PM, Weizhong Dai wrote: > Hi all, > In my script, I have a system call, and redirect the stderr to a file. >        # >        # open STDERR, ">$workpath\\error_log.txt"; >        # system "..."; >        # > but I only want the ERROR messages to be logged in the file.

Is there any method to tell different between warning and errors?

2010-04-19 Thread Weizhong Dai
Hi all, In my script, I have a system call, and redirect the stderr to a file. # # open STDERR, ">$workpath\\error_log.txt"; # system "..."; # but I only want the ERROR messages to be logged in the file. Is there any method to filter the WARNING messages generated by

Re: Can't locate object method "TIEHASH" via package " Apache::Session::MySQL

2010-04-19 Thread Uri Guttman
> "MC" == Mimi Cafe writes: MC> yes, probably the space was the cause of the issue. I did not MC> notice it untill I went back to change the quotes. hopefully you have learned a lesson about quoting strings. but you haven't about quoting emails. my entire email was quoted below your repl

Re: Can't locate object method "TIEHASH" via package " Apache::Session::MySQL

2010-04-19 Thread Mimi Cafe
yes, probably the space was the cause of the issue. I did not notice it untill I went back to change the quotes. Mimi On 19 April 2010 19:16, Uri Guttman wrote: > > "MC" == Mimi Cafe writes: > > MC> Hmm, the single quotes did help. I am used to double quotes as > MC> they make me feel I

Re: Strange Error

2010-04-19 Thread Mike Blezien
Hi Jim, After futher digging we found the problem it had to do with a DateTime string. Thanks for the help. Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - Original Message -

Re: Strange Error

2010-04-19 Thread Jim Gibson
On 4/19/10 Mon Apr 19, 2010 11:07 AM, "Mike Blezien" scribbled: > Hello, > > I'm getting a strange error and for the life of me can't figure out what > causing it. All that's in the error log is the following: > > [Mon Apr 19 13:01:37 2010] index.cgi: Invalid offset: 1 > > Would anyone have

Re: Can't locate object method "TIEHASH" via package " Apache::Session::MySQL

2010-04-19 Thread Uri Guttman
> "MC" == Mimi Cafe writes: MC> Hmm, the single quotes did help. I am used to double quotes as MC> they make me feel I am properly quoting, but now I have learnt the MC> hard way. there is no reason single vs double quotes would make any difference as there was no interpolation going o

Strange Error

2010-04-19 Thread Mike Blezien
Hello, I'm getting a strange error and for the life of me can't figure out what causing it. All that's in the error log is the following: [Mon Apr 19 13:01:37 2010] index.cgi: Invalid offset: 1 Would anyone have any ideas what to look for that would cause this type of error message ? Thanks,

RE: Can't locate object method "TIEHASH" via package " Apache::Session::MySQL

2010-04-19 Thread Mimi Cafe
Hmm, the single quotes did help. I am used to double quotes as they make me feel I am properly quoting, but now I have learnt the hard way. Thanks -Original Message- From: Thomas Bätzler [mailto:t.baetz...@bringe.com] Sent: 19 April 2010 10:23 To: beginners@perl.org Cc: Mimi Cafe Subject

Re: Why is the answer right...

2010-04-19 Thread John W. Krahn
Harry Putnam wrote: "John W. Krahn" writes: [...] The main problem is that you are not testing edge cases like: ev 101201 3 Or: ev 100101 3 If you did you would get an error message like: Month '12' out of range 0..11 at Why_is_the_answer_right.pl line 74 Thanks for the help clean

Help XML::Simple a weird behaviour

2010-04-19 Thread Jins Thomas
Hi all, Would somebody please show some light on what's happening here. I'm trying to parse a sample xml file like below Dummy1 Dummy2 When i run to parse with a sample script like below use XML::Simple; use Data::Dumper; my $lXMLFile = "$ENV{'PWD'}/xml

Re: Writing Perl scripts to run on any OS'es

2010-04-19 Thread Randal L. Schwartz
> "newbie01" == newbie01 perl writes: newbie01> Am wanting to change my Perl scripts to get it to run on several UNIX newbie01> flavours and Windows. At the moment, the only way I can think of how to newbie01> accomplish that is always having the following checks on each and every sub newbi

Re: Help on using << on *nix and Windows

2010-04-19 Thread Shawn H Corey
Shlomi Fish wrote: Hi newbie01, On Monday 19 Apr 2010 12:21:45 newbie01 perl wrote: Hi all, I need to convert a lot of UNIX scripts into Perl. Most of them uses the UNIX's EOF/EOL functionality. These scripts are mostly used to connect to Oracle databases. At the moment, installing a DBI is no

Re: Help on using << on *nix and Windows

2010-04-19 Thread Fi Dot
What happens if you try quoting with " " the " Hi all, > > I need to convert a lot of UNIX scripts into Perl. Most of them uses the > UNIX's EOF/EOL functionality. These scripts are mostly used to connect to > Oracle databases. At the moment, installing a DBI is not an option. The > scrip

Re: Why is the answer right...

2010-04-19 Thread Harry Putnam
"John W. Krahn" writes: [...] > The main problem is that you are not testing edge cases like: > > ev 101201 3 > > Or: > > ev 100101 3 > > If you did you would get an error message like: > > Month '12' out of range 0..11 at Why_is_the_answer_right.pl line 74 Thanks for the help cleaning the

AW: Writing Perl scripts to run on any OS'es

2010-04-19 Thread Thomas Bätzler
newbie01 perl asked: > Am wanting to change my Perl scripts to get it to run on several UNIX > flavours and Windows. At the moment, the only way I can think of how to > accomplish that is always having the following checks on each and every > sub that I have. > > Can anyone please suggest if ther

Re: Writing Perl scripts to run on any OS'es

2010-04-19 Thread Octavian Rasnita
losedir() or glob(). Read the POD documentation for those functions using: perldoc -f opendir perldoc -f glob ... Octavian __ Information from ESET NOD32 Antivirus, version of virus signature database 5040 (20100419) __ The message was checked by ESET NOD32 Antivirus. http://ww

Re: Writing Perl scripts to run on any OS'es

2010-04-19 Thread Shlomi Fish
Hi newbie01, On Monday 19 Apr 2010 12:52:53 newbie01 perl wrote: > Hi all, > > Am wanting to change my Perl scripts to get it to run on several UNIX > flavours and Windows. At the moment, the only way I can think of how to > accomplish that is always having the following checks on each and every

Re: Help on using << on *nix and Windows

2010-04-19 Thread Shlomi Fish
Hi newbie01, On Monday 19 Apr 2010 12:21:45 newbie01 perl wrote: > Hi all, > > I need to convert a lot of UNIX scripts into Perl. Most of them uses the > UNIX's EOF/EOL functionality. These scripts are mostly used to connect to > Oracle databases. At the moment, installing a DBI is not an option.

Re: Not understanding deleted symbol key access

2010-04-19 Thread C.DeRykus
On Apr 17, 6:08 pm, linuxexper...@gmail.com (Linux Expert) wrote: > On Thu, Apr 15, 2010 at 2:25 PM, C.DeRykus wrote: > > On Apr 15, 8:57 am, linuxexper...@gmail.com (Linux Expert) wrote: > > > I'm following an example in "Mastering Perl" pg 130.  He demonstrates > > > setting package variables $m

Writing Perl scripts to run on any OS'es

2010-04-19 Thread newbie01 perl
Hi all, Am wanting to change my Perl scripts to get it to run on several UNIX flavours and Windows. At the moment, the only way I can think of how to accomplish that is always having the following checks on each and every sub that I have. Can anyone please suggest if there is a better way of doin

AW: Can't locate object method "TIEHASH" via package " Apache::Session::MySQL

2010-04-19 Thread Thomas Bätzler
Owen wrote: > On Mon, 19 Apr 2010 00:14:44 +0100 > Mimi Cafe wrote: > > > I get following error when trying to open a session using > > Apache::Session::MySQL. > > > > > > > > Here is what I have > > > > > > > > 38 tie %session, " Apache::Session::MySQL", undef,{ There is leading whitespa

Help on using << on *nix and Windows

2010-04-19 Thread newbie01 perl
Hi all, I need to convert a lot of UNIX scripts into Perl. Most of them uses the UNIX's EOF/EOL functionality. These scripts are mostly used to connect to Oracle databases. At the moment, installing a DBI is not an option. The scripts will be running locally on the servers so technically it should

Re: Can't locate object method "TIEHASH" via package " Apache::Session::MySQL

2010-04-19 Thread Owen
On Mon, 19 Apr 2010 00:14:44 +0100 Mimi Cafe wrote: > I get following error when trying to open a session using > Apache::Session::MySQL. > > > > Here is what I have > > > > 38 tie %session, " Apache::Session::MySQL", undef,{ > > 39 Handle => $dbh, > > 40

not able to get contents from hash after parsing xml

2010-04-19 Thread vyomesh Kulkarni
Have this xml file to parse and code written for the same is #!/usr/bin/perl use XML::Simple qw(:strict); use Data::Dumper; my $file = 'tc1.xml'; my $data = XMLin($file, ForceArray => 1, KeyAttr =>{},); #print Dumper($data); foreach my $TestCase (@{$data->{TestCase}}){ print $TestCase->{Actio