joey@kodama:~>perl -we 'use strict; use Expect; my $e=Expect->spawn("ls"); $e->expect(0, [q{[} => sub {}])'
Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE ()/ at /usr/share/perl5/Expect.pm line 707.
joey@kodama:~>perl -we 'use strict; use Expect; my $e=Expect->spawn("ls"); $e->expect(0, ["-re" , q{[} => sub {}])'
Unmatched [ in regex; marked by <-- HERE in m/[ <-- HERE ()/ at /usr/share/perl5/Expect.pm line 707.
According to the documentation, the '[' in the first expression should not be interpreted as
a regexp.