Getting warning message while running the following code

2008-08-01 Thread Anirban Adhikary
Dear list while I am running the following code I am getting a warning message. the code is as follows 1 use strict; 2 use warnings; 3 use Cwd 'abs_path'; 4 my $dir = "/home/oraoneload_beta/sraywork/beta2.2/OraOneLoadServer"; 5 chdir($dir); 6 #my $filename="$dir/processinfo.txt"; 7

Re: Getting warning message while running the following code

2008-08-01 Thread John W. Krahn
Anirban Adhikary wrote: Dear list Hello, while I am running the following code I am getting a warning message. the code is as follows 1 use strict; 2 use warnings; 3 use Cwd 'abs_path'; 4 my $dir = "/home/oraoneload_beta/sraywork/beta2.2/OraOneLoadServer"; 5 chdir($dir); 6 #my $f

Re: Getting warning message while running the following code

2008-08-01 Thread Mr. Shawn H. Corey
On Fri, 2008-08-01 at 02:53 -0700, John W. Krahn wrote: > Anirban Adhikary wrote: > > Dear list > > Hello, > > > while I am running the following code I am getting a warning message. the > > code is as follows > > > > 1 use strict; > > 2 use warnings; > > 3 use Cwd 'abs_path'; > > 4 my $

Re: Getting warning message while running the following code

2008-08-01 Thread Rob Dixon
Mr. Shawn H. Corey wrote: > > next if /grep/; No. The op was using grep to filter processes from the output of ps. he had a filter of grep -v grep so that the filter itself wouldn't be selected. John is using perl to filter the processes, so instances of grep shouldn't be filtered out. R

Re: Getting warning message while running the following code

2008-08-01 Thread Mr. Shawn H. Corey
On Fri, 2008-08-01 at 11:16 +0100, Rob Dixon wrote: > Mr. Shawn H. Corey wrote: > > > > next if /grep/; > > No. The op was using grep to filter processes from the output of ps. he had a > filter of > > grep -v grep > > so that the filter itself wouldn't be selected. John is using perl to

Code not working as desired !

2008-08-01 Thread Amit Saxena
Hi all, I am trying to make a perl code which would read a matrix (basically an array which contains references to other arrays) and initialize a hash with the first value of each dereferenced array acting as a key and remaining elements as values using references. The source code and output are

Re: Getting warning message while running the following code

2008-08-01 Thread John W. Krahn
Mr. Shawn H. Corey wrote: On Fri, 2008-08-01 at 11:16 +0100, Rob Dixon wrote: Mr. Shawn H. Corey wrote: next if /grep/; No. The op was using grep to filter processes from the output of ps. he had a filter of grep -v grep so that the filter itself wouldn't be selected. John is using per

Re: Code not working as desired !

2008-08-01 Thread Rob Dixon
Amit Saxena wrote: > Hi all, > > I am trying to make a perl code which would read a matrix (basically an > array which contains references to other arrays) and initialize a hash with > the first value of each dereferenced array acting as a key and remaining > elements as values using references. >

Re: Code not working as desired !

2008-08-01 Thread John W. Krahn
Amit Saxena wrote: Hi all, Hello, I am trying to make a perl code which would read a matrix (basically an array which contains references to other arrays) and initialize a hash with the first value of each dereferenced array acting as a key and remaining elements as values using references.

Re: Getting warning message while running the following code

2008-08-01 Thread Anirban Adhikary
Thanks U all for this support. I not only get the solution but I also learned some great things. Thanks a lot list.. Regards Anirban Adhikary. On Fri, Aug 1, 2008 at 4:33 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > Mr. Shawn H. Corey wrote: > >> On Fri, 2008-08-01 at 11:16

Re: Getting warning message while running the following code

2008-08-01 Thread Mr. Shawn H. Corey
On Fri, 2008-08-01 at 04:03 -0700, John W. Krahn wrote: > The OP was using: > > ps -U oraoneload_beta -u oraoneload_beta u | grep perl | grep -v grep > > If you used the shell at all you would know that the second grep is > there to remove the line that the first grep generates. You could > a

Re: Code not working as desired !

2008-08-01 Thread Rob Dixon
Rob Dixon wrote: > > my %h; > > print "Matrix is as follows :- \n"; > foreach $a (@arr) { > print "Row = @{$a}\n"; > my @vals = @$a; > my $key = shift @vals; > $h{$key} = [EMAIL PROTECTED]; > } My apologies. There was a mistake in my code in that I was using the special variable $a for t

RE: Code not working as desired !

2008-08-01 Thread Thomas Bätzler
Rob Dixon <[EMAIL PROTECTED]> wrote: > My apologies. There was a mistake in my code in that I was > using the special variable $a for this loop. I should have > written something like this: > > my %h; > > print "Matrix is as follows :- \n"; > foreach (@arr) { > my @vals = @$_; > p