in reply to Re: Reading Binary
in thread Reading Binary

$bin =~ m{([01]+)}; # untaint input my $idx = eval "0b$1";

  1. You shouldn't use the results of a regular expression unless you verify that it matched correctly.
  2. Why use string eval when oct is less dangerous and provides the same result.