Skip to content

Instantly share code, notes, and snippets.

@perforb
Last active November 4, 2023 13:53
Show Gist options
  • Save perforb/5030512 to your computer and use it in GitHub Desktop.
Save perforb/5030512 to your computer and use it in GitHub Desktop.
Easily import the settings in Perl.
+{
mysql => {
user => 'volt',
password => 'voltisfast',
},
}
#!/usr/bin/env perl
use strict;
use warnings;
use feature qw(say);
my $file = './development.pl';
my $config = do $file or die "$!";
say $config->{mysql}->{user};
say $config->{mysql}->{password};
__END__
volt
voltisfast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment