yml2pl 281B

12345678910111213141516
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use YAML::Tiny;
  5. use Data::Dumper;
  6. my $file = shift @ARGV
  7. or &usage;
  8. my $data = YAML::Tiny->read($file)
  9. or die "cannot read $file: " . YAML::Tiny->errstr . "\n";
  10. print Dumper($data);
  11. sub usage { print "usage: yml2pl FILE\n"; }