in reply to using \x in regex

What is in $key when the user presses PgUp?

What is in $key when the user presses PgDn?

Replies are listed 'Best First'.
Re^2: using \x in regex
by halfcountplus (Hermit) on Feb 29, 2008 at 19:49 UTC
    $key IS PgUp or PgDn (see Term::ReadKey), which means that value is not usable, BUT ord($key) will give you the ascii value (an integer), hex this decimal and that value can be used in regex with \x -- except in this case PgUp and PgDn have the same value to \x (7e)