Created
October 9, 2016 11:18
-
-
Save soh-i/19821638581046e53f6e8518578e71e7 to your computer and use it in GitHub Desktop.
Data::Dumper output to JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use JSON; | |
| use Data::Dumper; | |
| my $file = shift or die('Input Data::Dumper output'); | |
| my $data = do $file; | |
| print to_json($data, {ascii => 1, pretty => 1}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment