Re: system()
[email protected] ("Chas. Owens")
| Newsgroups | perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
On Mon, May 19, 2008 at 6:21 AM, schms <[email protected]> wrote: snip > while (<RDME>) { snip you need a chomp here snip > my $POLICYNAME = $_; > > my @args = ("/usr/openv/netbackup/bin/admincmd/bpplinfo > $POLICYNAME -modify -inactive"); snip this is a pointless use of an array with one element. Try this instead: open my $readme, "-|", $COMMAND or die "had a problem running $COMMAND: $!\n"; while (my $policyname = <$readme>) { chomp($policyname); system("/usr/openv/netbackup/bin/admincmd/bpplinfo", $policyname, "-modify", "-inactive"); } -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read.