Hello all!!
here is my little problem, I have a file that I must parse and then once
parsed I need to run a legato networker mminfo command to generate a list of
save set id's to use for a cloning process.
the config file looks like such
backint:maple oak pine aspen
online:palm chestnut cherry
archive:palm chestnut cherry
I am attempting to read each type (before the :) into its own array and then
process each element of the array as such
#!/usr/local/bin/perl
open(BINT,"junk") || die "could not open $BACKINT: $!";
while ($line = <BINT>)
{
my ($type) = split(/:/,$line);
line =~ s/:/ /g;
print $line;
if ( $type eq backint )
{
push @backint, split(/ /,$line);
}
if( $type eq online )
{
push @online, split(/ /, $line);
shift @online;
}
}
close(BINT);
for (@backint ) {
print "$_\n";
}
the above works fine and dandy (I think)
but when I replace the print in the for() with a system call as such
system "mminfo -a -r \"volume,mediarec,ssid,name\" -q \"location=sun_etl\"
-V -o tR -c $_ >> out";
I get a broken pipe and the output from the mminfo command is spewed on the
console and not into the out file
I would rather (if possible) run the mminfo command within perl (not using
system) and have the data populate a hash or an array and then I can parse
everything inside of perl and not have to sort/grep blah blah files
Regards,
Ron
==
______
/_____/\ Ronald J. Yacketta
/____ \\ \ Solaris System Engineer
/_____\ \\ / One Pyrex Place
/_____/ \/ / / Elmira, NY 14902
/_____/ / \//\
\_____\//\ / /
\_____/ / /\ / Phone: 607-377-8328
\_____/ \\ \ Fax: 607-377-8329
\_____\ \\ Cell: 607-368-0208
\_____\/ email: [EMAIL PROTECTED]
==
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.