#!/usr/bin/env perl use strict; use warnings; use YAML::XS (); use YAML::Syck (); my $data = do { local $/; }; print "With YAML::XS...\n"; my $xs = YAML::XS::Load($data); for my $person (@$xs) { print "$person->{name} is happy\n" if $person->{happy}; } print "With YAML::Syck...\n"; my $syck = YAML::Syck::Load($data); for my $person (@$syck) { print "$person->{name} is happy\n" if $person->{happy}; } __DATA__ - name: Bob Johnson active: true happy: false - name: Bill Johnson active: true happy: true - name: Frank Johnson active: false happy: false - name: George Johnson active: false happy: true