anshumangoyal has asked for the wisdom of the Perl Monks concerning the following question:
I am having a code which send CTRL + C to a shell prompt. My Problem is I am not able to match the CTRL + C with Regexp. Here is my code:
Can some one suggest what the wrong here is?my $Command = '\x03'; # This is some sub-routine I am calling to send the command. SendCommand ($Command); # This Regexp never sets true which is the problem: if ($Command =~ m/\\x03/) { # it never goes in this if statement print "Matched !!"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CTRL+C Regular Expression
by Athanasius (Archbishop) on Nov 07, 2012 at 06:48 UTC | |
by wirito (Acolyte) on Nov 07, 2012 at 11:31 UTC | |
Re: CTRL+C Regular Expression
by bart (Canon) on Nov 07, 2012 at 11:30 UTC | |
Re: CTRL+C Regular Expression
by wirito (Acolyte) on Nov 07, 2012 at 11:21 UTC | |
Re: CTRL+C Regular Expression
by Kenosis (Priest) on Nov 07, 2012 at 06:09 UTC | |
by anshumangoyal (Scribe) on Nov 07, 2012 at 06:23 UTC | |
by Kenosis (Priest) on Nov 07, 2012 at 06:28 UTC | |
Re: CTRL+C Regular Expression
by Kenosis (Priest) on Nov 07, 2012 at 06:22 UTC |
Back to
Seekers of Perl Wisdom