This is example found in perldoc:
$object->expect(15, '-re', "$str");
I want to add option 'i' to the match. This won't work:
$object->expect(15, '-re', qr/$str/i);
Do I have to use this format:
$exp->expect($timeout, [ qr/$str/i, sub {}], $shell_prompt);