title: Perl | Telegram Bot and sendPhoto method
body: <p>I need help with <strong>pure perl</strong> (without WWW::Telegram::BotAPI) implementation of sendPhoto BotAPI method</p>
  
  <p>Simple text i send without problem</p>
  
  <pre><code>use LWP::UserAgent;
  use HTTP::Request::Common;
  use JSON::MaybeXS;
  ....
  ....
     my $ua = LWP::UserAgent-&gt;new;
  
     utf8::decode($message);
     my $p = {
              chat_id=&gt;$groupid,
              parse_mode=&gt;'HTML',
              text=&gt;$message
      };
  
     my $response = $ua-&gt;request(
          POST 'https://api.telegram.org/bot'.$token.'/sendMessage',
          Content_Type    =&gt; 'application/json',
          Content         =&gt; JSON::MaybeXS::encode_json($p)
          );
  ...
  </code></pre>
  
  <p>But with sendPhoto (<a href="https://core.telegram.org/bots/api#sendphoto" rel="nofollow">https://core.telegram.org/bots/api#sendphoto</a>) i have problem. Which JSON i must send to server if i want upload new image?</p>
  
  <pre><code>chat_id=&gt;$groupid,
  caption=&gt;$message
  photo=&gt; { ? binary blob here ? }
  </code></pre>