<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ktat</author_name>
  <author_url>https://blog.hatena.ne.jp/ktat/</author_url>
  <blog_title>Practice of Programming</blog_title>
  <blog_url>https://ktat.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Perl</anon>
  </categories>
  <description>ちょっと遊んでいたら見つけたのですが、これ簡単ですね。 use IO::Pty::Easy; my $pty = IO::Pty::Easy-&gt;new; $pty-&gt;spawn(&quot;mysql -u root&quot;); while ($pty-&gt;is_active) { while (my $o = $pty-&gt;read(1)) { print $o; } if (my $sql = &lt;&gt;) { $pty-&gt;write($sql); } else { $pty-&gt;write(&quot;exit\n&quot;); last; } } こんな感じにするだけで、perl から mysql の shell が叩けるよ。 い…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fktat.hatenadiary.jp%2Fentry%2F20120131%2F1327946485&quot; title=&quot; IO::Pty::Easy が簡単・便利 - Practice of Programming&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-01-31 03:01:25</published>
  <title> IO::Pty::Easy が簡単・便利</title>
  <type>rich</type>
  <url>https://ktat.hatenadiary.jp/entry/20120131/1327946485</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
