2012-03-30 09:30:25 -07:00
|
|
|
package DDG::Goodie::Ascii;
|
2012-05-23 19:05:08 -07:00
|
|
|
# ABSTRACT: ASCII
|
2012-03-30 09:30:25 -07:00
|
|
|
|
|
|
|
use DDG::Goodie;
|
|
|
|
|
2012-05-23 19:05:08 -07:00
|
|
|
triggers end => "ascii";
|
|
|
|
|
2012-03-30 09:30:25 -07:00
|
|
|
zci answer_type => "ascii_conversion";
|
|
|
|
zci is_cached => 1;
|
|
|
|
|
|
|
|
handle remainder => sub {
|
2012-04-02 14:37:56 -07:00
|
|
|
my $ascii = pack("B*", $1) if /^(([0-1]{8})*)\s+(in|to)$/;
|
|
|
|
return $ascii if $ascii;
|
2012-03-30 09:30:25 -07:00
|
|
|
return;
|
2012-04-12 19:46:59 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
1;
|
2012-03-30 09:30:25 -07:00
|
|
|
|