NAME
INI::Reader::Regexp - INI Parser
SYNOPSIS
ini_string contains:
[Settings]
#======================================================================
# Set detailed log for additional debugging info
DetailedLog=1
RunStatus=1
StatusPort=6090
StatusRefresh=10
Archive=1
# Sets the location of the MV_FTP log file
LogFile=/opt/ecs/mvuser/MV_IPTel/log/MV_IPTel.log
#======================================================================
Version=0.9 Build 4 Created July 11 2004 14:00
ServerName=Unknown
[FTP]
#======================================================================
# set the FTP server active
RunFTP=1
# defines the FTP control port
FTPPort=21
# defines the FTP data port
FTPDataPort=20
# Sets the location of the FTP data directory to catch terminal backups
FTPDir=/opt/ecs/mvuser/MV_IPTel/data/FTPdata
# FTP Timeout (secs)
FTP_TimeOut=5
# Enable SuperUser
EnableSU=1
# set the SuperUser Name
SUUserName=mvuser
# set the SuperUser Password
SUPassword=Avaya
#
#======================================================================
DESCRIPTION
use strict;
use warnings;
use utf8;
use INI::Reader::Regexp;
my $ini_parser = INI::Reader::Regexp->new();
my $hash = $ini_parser->INI_parse($ini_string);
print $hash->{Settings}->{ServerName};
AUTHOR
Rajkumar Reddy
COPYRIGHT AND LICENSE
Copyright (C) 2021 by Rajkumar Reddy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.30.0 or, at your option, any later version of Perl 5 you may have available.