{"categories":["perl"],"title":" \u5165\u529b\u30c7\u30d0\u30a4\u30b9\u306e\u5165\u529b\u3092perl\u3067\u898b\u308b","url":"https://iww.hateblo.jp/entry/20140213/unpack","description":"USB\u30d8\u30c3\u30c9\u30bb\u30c3\u30c8\u306b\u3064\u3044\u3066\u308b\u30dc\u30bf\u30f3\u306e\u62bc\u3055\u308c\u3063\u3077\u308a\u3068\u304b\u3092\u53d6\u5f97\u3059\u308b\u8a71 Linux Input Subsystem\u306e\u4f7f\u3044\u65b9 \u3068\u308a\u3042\u3048\u305aSYN\u3068\u304b\u305d\u3046\u3044\u3046\u306e\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u5168\u90e8\u51fa\u3059 #!/usr/bin/perl open(my $fh, $ARGV[0]) or die; binmode($fh); while( read($fh, my $buf, 16) ){ my ( $sec,$usec,$type,$code,$value ) = unpack( \"LLSSl\", $buf ); print \"time=$sec\\n\"; print \"type=$type\\n\"; print \"code\u2026","image_url":null,"provider_url":"https://hatena.blog","width":"100%","provider_name":"Hatena Blog","type":"rich","blog_title":"\u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12","author_url":"https://blog.hatena.ne.jp/iww/","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fiww.hateblo.jp%2Fentry%2F20140213%2Funpack\" title=\" \u5165\u529b\u30c7\u30d0\u30a4\u30b9\u306e\u5165\u529b\u3092perl\u3067\u898b\u308b - \u63ee\u767a\u6027\u306e\u30e1\u30e2\uff12\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"iww","blog_url":"https://iww.hateblo.jp/","height":"190","published":"2014-02-13 00:00:00"}