[ale] Using Expect.pm

Christopher Fowler cfowler at outpostsentinel.com
Tue Aug 3 12:27:24 EDT 2004


I'm using Expect as a perl module and have not been able to figure out a
way to test the syntax of regualr expressions.  If I pass expect an
regex that is wrong then it croaks.  I've tried the following


eval {
  $exp->expect(0, @search);
};
if($@) { i warn "$@" }


It no longer croaks but then no longer works.  I do not get anything in
$@ afterwards.  I need a way to validate the regex and if it is invalid
remove it from the @search list.

Does anyone know how?

Chris




More information about the Ale mailing list