Below is the sample perl script, if you want to read some data from a file and pass it to as a argument in your perl script.
#!/usr/local/bin/perl
open FILE, "testoids" or die $!;
while (
{
chomp $_;
systemCmd("oocheck -id $_");
}
close(FILE);
sub systemCmd {
my($cmd) = @_;
print("$cmd\n");
(system($cmd) == 0) || die ("cmd $cmd failed");
}
No comments:
Post a Comment