<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>srkzhr</author_name>
  <author_url>https://blog.hatena.ne.jp/srkzhr/</author_url>
  <blog_title>半径5メートル</blog_title>
  <blog_url>https://srkzhr.hatenadiary.org/</blog_url>
  <categories>
    <anon>Perl</anon>
  </categories>
  <description>今更ながら気づいたのでメモ。まず、ブレースで処理文を囲んだ普通のif分岐。 my $flag = 1; if ( $flag ) { my $lexical_str = &quot;hoge&quot;; } print $lexical_str.&quot;\n&quot;;上記のコードはuse strictで以下のようなエラーになります。 Global symbol &quot;$lexical_str&quot; requires explicit package name at ./test.pl line 11.しかし、if修飾子を使った場合は$lexical_strは$flagと同じスコープとなり、正常に&quot;foo&quot;が標準出力されます。 my…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsrkzhr.hatenadiary.org%2Fentry%2F20080106%2F1199601898&quot; title=&quot;ifブロックとif修飾子でのスコープの違い - 半径5メートル&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-01-06 15:44:58</published>
  <title>ifブロックとif修飾子でのスコープの違い</title>
  <type>rich</type>
  <url>https://srkzhr.hatenadiary.org/entry/20080106/1199601898</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
