in reply to Expect.pm and STDIN question

The question mark is a regular expression metacharacter. You have to escape it:
qr/\[.*\?\]/

Replies are listed 'Best First'.
Re^2: Expect.pm and STDIN question
by Archon810 (Initiate) on Jan 07, 2009 at 22:26 UTC
    @salva I know it is, that's why it's there. It makes the match non-greedy, which doesn't really matter in this case.