pl2yml.pl 232B

123456789101112131415161718
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use YAML::Tiny;
  5. my $file = shift @ARGV
  6. or &usage;
  7. do $file;
  8. my $yaml = YAML::Tiny->new;
  9. $yaml->[0] = $VAR1;
  10. print $yaml->write_string;
  11. sub usage { print "usage: pl2yml FILE\n"; }