<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>perlcodesample</author_name>
  <author_url>https://blog.hatena.ne.jp/perlcodesample/</author_url>
  <blog_title>Perl入門ゼミ</blog_title>
  <blog_url>https://perlcodesample.hatenadiary.jp/</blog_url>
  <categories>
  </categories>
  <description>Perl › 演算子 › here Perlには、条件によって、返却する値を変えることができる三項演算子というものがあります。 条件 ? 真の場合に返す値 : 偽の場合に返す値 上の構文だけ見ると少しわかりにくいので、実際にサンプルを書いてみます。 my $flag = 1; my $num = $flag ? 3 : 5; 「$flag」が「1」で真の値です。三項演算子は条件が真の場合には「?」の直後の値を返却します。ですので「3」が「$num」に代入されます。次は、条件が偽の場合のサンプルです。 my $flag = 0; my $num = $flag ? 3 : 5; 「$flag」が…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fperlcodesample.hatenadiary.jp%2Fentry%2F20080325%2F1206461313&quot; title=&quot;三項演算子 A ? B : C - Perl入門ゼミ&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>2008-03-25 01:08:33</published>
  <title>三項演算子 A ? B : C</title>
  <type>rich</type>
  <url>https://perlcodesample.hatenadiary.jp/entry/20080325/1206461313</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
