<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hitotec</author_name>
  <author_url>https://blog.hatena.ne.jp/hitotec/</author_url>
  <blog_title>hito::tech</blog_title>
  <blog_url>https://hitotec.hatenadiary.org/</blog_url>
  <categories>
  </categories>
  <description>首題の通り、配列の重複要素をカウントして、まとめていくコードをperlで書きました。 SHELLで言うuniqコマンドのcオプション「#uniq -c」と同じ機能です。 ロジックは難しくないのですが、初期化エラーではまったのでメモ。 サンプルコードは以下の通り。 サンプルコード(disinct.pl) #!/usr/bin/perl use strict; use warnings; my @LINE=(&quot;東京都&quot;,&quot;神奈川県&quot;,&quot;千葉県&quot;,&quot;神奈川県&quot;,&quot;東京都&quot;,&quot;埼玉県&quot;); my %cnt; #同じキーがあれば、値が1ずつ増加していく foreach my $key (@LINE){ …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhitotec.hatenadiary.org%2Fentry%2F20130119%2F1358570287&quot; title=&quot;配列の重複要素をカウントし、まとめる #perl #shell - hito::tech&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>2013-01-19 13:38:07</published>
  <title>配列の重複要素をカウントし、まとめる #perl #shell</title>
  <type>rich</type>
  <url>https://hitotec.hatenadiary.org/entry/20130119/1358570287</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
