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 #`ps -U oraoneload_beta  -u oraoneload_beta u | grep perl | grep -v grep
> $filename`;
  8 open(FH,"ps -U oraoneload_beta  -u oraoneload_beta u | grep perl | grep
-v grep|") or "can't open : $!";
  9 #open(FH,"$filename");
 10 my @process = <FH>;
 11 close(FH);
 12 chomp(@process);
 13 pop(@process);
 14 foreach my $el(@process)
 15  {
 16    my $cmd =(split /\s+/,$el)[12];
 17    my ($a,$b) = split(/\//,$cmd);
 18     my $path=abs_path($b);
 20     print $path."\n";
 21 }
 22

The warning message is as Useless use of string in void context at
processcheck.pl line 8. But while I am commenting the line 8 and
uncommenting the the line 6, 7 and 9 and then running this script I am not
getting any warning message. Where I am making the mistake?

Thanks & Regards in advance
Anirban Adhikary.

Reply via email to