in reply to Re^4: How to monitor/look for output?
in thread How to monitor/look for output?

Like I said, backticks return a scalar, so you should run $output = `command`, though calling an input $output is a little confusing. Assuming that 'Restored successfully' is the last line and only returned on success, you could do something like:

$backup_return = `command`; die "Backup failed: $backup_return\n" unless $backup_return=~/Restored + successfully/; $other_return = `second command`;