<?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 flock関数を使用すれば、ファイルの排他制御を行うことができます。今回は、flock関数を実際に使って順番を守ってファイルに読み書きを行います。(一般的には、排他処理と呼びます。) 以下は、実際に順番を守って読み書きしているとことを実感するサンプルです。sample_20080814.pl という名前で保存してください。 use strict; use warnings; use Fcntl qw/:DEFAULT :flock :seek/; # 上書きするので注意 my $file = &quot;data_20080814.txt&quot;; # 読み書きモードでオープ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fperlcodesample.hatenadiary.jp%2Fentry%2F20080814%2F1218721531&quot; title=&quot;flock関数 - ファイルの排他制御 - 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-08-14 22:45:31</published>
  <title>flock関数 - ファイルの排他制御</title>
  <type>rich</type>
  <url>https://perlcodesample.hatenadiary.jp/entry/20080814/1218721531</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
