Hey guys

I ran into a new wrinkle with the script I am trying to write. For some reason, even tho I commented almost everything out this is the response I am getting from this script:

Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting. Incorrect options supplied, exiting.


And it goes on from there, that's just a snippet!

And here's the code that's causing it:

#!/usr/bin/perl use strict; use warnings; use IO::Pipe; use IO::Handle; use IO::File; my $system; my @systems = ( '3par-S400', '3par-E200' ); #open( MYFILE, '>>data.txt' ); #foreach my $system (@systems) { # my $output = run_command($system); # while (<$output>) { # next if (m/^$/); # next if (m/KBytes/); # next if (m/VVname/); # last if (m/^\-\-\-\-\-.*$/); # s/^ *//; # s/ +/\|/g; # print MYFILE $_; # } #} #close(MYFILE); #open( MYFILE, '<data.txt' ); #while (<MYFILE>) { # my $thisline = $_; # chomp($thisline); # my $gmetric="/usr/bin/gmetric"; ## This is what we grab and build the array ## 22:28:29|08/30/10|r/w|I/O|per|second|KBytes|per|sec|Svt|ms|IOSz|KB| ## VVname|Cur|Avg|Max|Cur|Avg|Max|Cur|Avg|Cur|Avg|Qlen ## This is the data we get per line # racprod_data03_500G_tpvv|t|674|674|674|6782|6782|6782|3.6|3.6|10.1|1 +0.1|2 # my @array= ( $VVname, $t, $ioCur, $ioAvg, $ioMax, $kbCur, $kbAvg, + $kbMax, $svtCur, $svtAvg, $iokbCur, $iokbAvg, $Qlen) = split /\|/, $ +thisline; # foreach @array { # print $_; # } #} #close(MYFILE); sub run_command { my $user = 'gmon'; my $system = shift; my $protocol = 'ssh'; my $ssh_flags = "-l $user"; my $command = "statvv -ni"; my $space = " "; my $do_command = $protocol . $space . $ssh_flags . $space . $syste +m . $space . $command; my $cmd = IO::Pipe->new; $cmd->reader($do_command); return $cmd; }


It seems like the problem is with the IO::Pipe. What do I need to do to get this working, I must humbly and respectfully ask?

Thanks!

In reply to Incorrect options supplied, exiting. by bluethundr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.