root/lang/perl/Encode-JP-Mobile/trunk/tools/yaml2perl.pl
| Revision 5448, 299 bytes (checked in by tokuhirom, 9 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | #!/usr/bin/perl |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | use Data::Dumper; |
| 5 | use YAML; |
| 6 | use FindBin; |
| 7 | use File::Spec::Functions; |
| 8 | |
| 9 | $Data::Dumper::Terse++; |
| 10 | |
| 11 | die "Usage: $0 hoge.yaml hoge.pl" unless @ARGV==2; |
| 12 | my ($src, $dst) = @ARGV; |
| 13 | |
| 14 | open my $fh, '>', $dst or die $!; |
| 15 | print $fh Dumper(YAML::LoadFile($src)); |
| 16 | close $fh; |
| 17 |
Note: See TracBrowser
for help on using the browser.
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)