Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Why is this hash not displaying correctly?
- #!/usr/bin/perl
- use strict;
- use warnings;
- use File::Slurp;
- use Data::Dumper;
- my %config;
- my $text = read_file("./config/settings.cfg");
- if ($text =~ /^esxi.hosts+=s+(?<host>.+)/xm) {
- $config{host} = "$+{host}";
- }
- print Dumper (%config);
- Connection Options:
- ######################################################
- esxi.host = server01
- esxi.port = 22
- esxi.username = root
- esxi.password = password
- ######################################################
- Backup Options:
- #########################
- Compression Options:
- 0 = none
- 1 = tar
- 2 = gzip
- 3 = tar+gzip
- #########################
- backup.compression = 0
- $VAR1 = 'server01';
- $VAR2 = {
- 'host' => 'esxi01'
- };
- $VAR1 = {
- 'server01' => {
- 'host' => 'esxi01'
- }
- };
Add Comment
Please, Sign In to add comment