<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.ichiayi.com/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Jonathan&#039;s Wiki 筆記 - tech:perl</title>
        <description></description>
        <link>https://www.ichiayi.com/</link>
        <lastBuildDate>Fri, 05 Jun 2026 21:45:43 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.ichiayi.com/_media/wiki/dokuwiki.svg</url>
            <title>Jonathan&#039;s Wiki 筆記</title>
            <link>https://www.ichiayi.com/</link>
        </image>
        <item>
            <title>XML::Simple</title>
            <link>https://www.ichiayi.com/tech/perl/xml_simple</link>
            <description>XML::Simple

XML::Simple - Easy API to maintain XML (esp config files)

	*  &lt;http://cpan.uwinnipeg.ca/htdocs/XML-Simple/XML/Simple.html&gt;

	*  可正常透過 perl -MCPAN -e shell 安裝
	*  執行時會出現 could not find ParserDetails.ini 訊息, 可透過以下語法解決 

使用 Sample


#!/usr/bin/perl

use XML::Simple qw(:strict);

$ref = XMLin(&#039;/tmp/t.xml&#039;,
    ForceArray =&gt; 1,
    KeyAttr    =&gt; {},
);

$receiverlist=$ref-&gt;{receiverlist}[0];
$i=0;
foreach $receiverinfo (@{$receiverlist-&gt;{object}}) {
        $i++;
        print(&quot;$i:&quot;);
 …</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:38:43 +0000</pubDate>
        </item>
        <item>
            <title>perl 剖析 yaml 的套件</title>
            <link>https://www.ichiayi.com/tech/perl/yaml</link>
            <description>perl 剖析 yaml 的套件

	*  Ubuntu : 

Example


#!/usr/bin/perl

use YAML::Loader;
use Data::Dumper;

# Load a YAML stream of 3 YAML documents into Perl data structures.
my $loader = YAML::Loader-&gt;new;
my $hash = $loader-&gt;load(&lt;&lt;&#039;...&#039;);
stages:
- name: Deploy--DB
  iiidevops: deployed-environments
  steps:
  - applyAppConfig:
      answers:
        db.gui: true
        db.name: todo_db
        db.password: templatePassword
        db.tag: 13
        db.type: postgresql
        db.username: iiidevops
…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 28 Aug 2021 12:40:32 +0000</pubDate>
        </item>
    </channel>
</rss>
