On Mon, 22 Nov 2004 09:29:04 -0500, Bob Showalter <[EMAIL PROTECTED]> wrote: > Ramprasad A Padmanabhan wrote: > > I am using Net::Telnet in one of my perl scripts. Problem is every > > time it runs with use warnings It prints out warnings like > > > > Unrecognized escape \s passed through at .... > > > > Where that line is > > $t->waitfor("/ord\s*:\s*/"); > > > > Which is perfectly OK ( I think ) > > No, it's not OK, if you're expecting the backslashes to be passed on to > waitfor(), as I assume you are. If you aren't expecting them to be passed > on, they don't need to be there. Hence the warning. > > > Can someone tell how to get rid of this warning ? > > Use single quotes.
Not 100% sure here, but since the string is a regular expression, consider using qr/expression/ without the quotes. The qr/ and / act as the delimiters and tell perl the contents are a regular expression and thus \s is valid in that context. I thnk it may also pre-compile the regular expression so your code runs faster.. > > -- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>