in reply to Re: Re: Re: Running or not running
in thread Running or not running
Obviously it doesn't work because of the "if (system() ==0)" which is not correct, but the correct way of this is what I am trying to achieve!#! c:\perl\bin $|++; use strict; use vars qw /%data/; $data{apps_list} = shift @ARGV; system (cls); print "\n\nPath to apps list => ". $data{apps_list}."\n"; open (LST, "$data{apps_list}") || die "$! : File was not found\n"; chomp (@{$data{Go_scripts}} = <LST>); for my $item (@{$data{Go_scripts}}) { print "\n$item\n"; system ($item); if (system() ==0) # this is incorrect { print "\n Done\n"; } else { print "Failed\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re*5: Running or not running
by Tomte (Priest) on May 13, 2004 at 13:34 UTC |