Chas Owens wrote: > On 6/3/07, Chas Owens <[EMAIL PROTECTED]> wrote: >> On 6/3/07, Chas Owens <[EMAIL PROTECTED]> wrote: >> snip >> > my $tidy = "/usr/bin/tidy"; >> > my @tidy_args = qw(--foo --bar -- example); >> > my $path = get_path(); >> > my $file = $path . get_file(); >> > >> > system($tidy, @tidy_args, $file); >> >> Opps, forgot the error checking. >> >> system($tidy, @tidy_args, $file) >> or die qq("$tidy @tidy_args $file" failed: $?"; >> > > I will get it right, I swear. > > system($tidy, @tidy_args, $file) > or die qq("$tidy @tidy_args $file" failed: $?);
This should work better: system($tidy, @tidy_args, $file) == 0 or die qq("$tidy @tidy_args $file" failed: $?); Or: system($tidy, @tidy_args, $file) and die qq("$tidy @tidy_args $file" failed: $?); John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/