Skip to content

Instantly share code, notes, and snippets.

@danboid
Created April 29, 2015 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danboid/738d6a54643eb36f56f1 to your computer and use it in GitHub Desktop.
Save danboid/738d6a54643eb36f56f1 to your computer and use it in GitHub Desktop.
sub readOnly
{
my ($rvRef,$rsRef,$rdRef,$host,$param,$aref) = @_;
my ($fail) = 0;
foreach (0 .. $#$aref)
{
if ($opts{'D'} == 1 ){
print $aref->[$_], "\n";
}
if($aref->[$_] =~ /FAIL\s(.*)/)
{
$$rvRef = 2;
$fail = 1;
$$rdRef .= sprintf "%-13s - READ-ONLY %s\n", $host, $1;
}
}
if( $fail == 1 )
{
$$rsRef .= $host.' ';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment