in reply to Control:CLI or Net::SSH2 - Send <ctrl>_
NOTE: While it doesnt show here there is a character between the two quotes in my $a='';
resultuse strict; use warnings; my $a=''; # entered by holding down cntrl pressing _ (shift+-) print "ord:".ord($a)."\n"; print 'hex:'.unpack("H*", $a)."\n"; my $b="\x1f"; if ($a eq $b) {print '$a eq $b'."\n";} exit;
but!!ord:31 hex:1f $a eq $b
Result#use strict; use warnings; my $a=''; # entered by holding down cntrl pressing _ (shift+-) print "ord:".ord($a)."\n"; print 'hex:'.unpack("H*", $a)."\n"; my $b="\x1f"; if ($a eq $b) {print '$a eq $b'."\n";} my $bb=\x1f; print $bb."\n";
so did you try printing \x1f or "\x1f" ?ord:31 hex:1f $a eq $b SCALAR(0xa3e67c)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Control:CLI or Net::SSH2 - Send <ctrl>_
by ImJustAFriend (Scribe) on Feb 21, 2017 at 01:56 UTC |