@balajesuri
I have the configuration file, i want to read it by making objects like suppose i have a object named obj
so if i write
The output should be Care and its affilate
---------- Post updated at 04:33 AM ---------- Previous update was at 04:28 AM ----------
Hi
can anyone help me understanding the following code
my %config;
open my $config, '<', 'config.txt' or die $!;
while(<$config>) {
chomp;
(my $key, my @value) = split /=/, $_;
$config{$key} = join '=', @value;
} (5 Replies)
HI
I have a config file (ip.config)that has the following fields with colon as delimeter.
yahoo.com:1919 ( host and port number)
rediffmail.com:2020
gmail.com:2121
How to read it in a perl script. I need to parse the host and port number in the perl script using split... (6 Replies)
Hi
In My config file i have 12.122.12.111:2000
A host and a port number.
To read the config file i have written in a perl script like this
my %config;
open my $config, '<','config' or die "Failed to read file :$!";
Its running fine in HP-UX but showing error in solaris... (2 Replies)
Hi,
I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below.
I will be using the config file as mentioned below:
(config.txt)
country:a,b
city:1,2
type:b1... (1 Reply)
Hi!
I have a need to do this in Perl.
script.pl -config file
The script would be doing a wget/LWP on a URL which is defined in the config file.
So when I run the script it should return either one of these conditions -
1) OK with exit status 0.
Should also print "wget URL"
2)... (6 Replies)
Hi,
i'm trying to parse a config file that have alot of rows similar to this one:
Example value value value
What i want to do is to split and save the row above in a hash, like this:
Example = value value value
Basically i want to split on the first whitespace after the first... (3 Replies)
Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated.
script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made.
OS :Susi linux ver 10.3.
... (4 Replies)
Folks,
I'm a perl moron, so please speak very slowly. : )
I'm modifying a build script that starts up an apache server. Now there is a .config file that hardcodes an old webserver path like this c:\oldWebserver. Now I don't want that hardcoded value, rather wish to use an... (3 Replies)
Hi,
I want to configure some values in config file like below
work_dir /home/work
csv_dir /home/csv
sql_dir /home/sqls
reportfirst yes
and i want to store each value in variable to use it further in my my perl program ??
any thought on this(i am new to perl) ?
... (2 Replies)
Hi All,
Can anyone please explain me how to read data from config file in Perl.
Suppose i have a config file named cfile. The data in config file is
name=parth
lname=mittal
user=2007
hostname=fluoride
username=parthmittal
password=XXXXXX
account=unix
url=www.unix.com
... (2 Replies)
Discussion started by: parthmittal2007
2 Replies
LEARN ABOUT SUSE
log::message::config
Log::Message::Config(3pm) Perl Programmers Reference Guide Log::Message::Config(3pm)NAME
Log::Message::Config - Configuration options for Log::Message
SYNOPSIS
# This module is implicitly used by Log::Message to create a config
# which it uses to log messages.
# For the options you can pass, see the C<Log::Message new()> method.
# Below is a sample of a config file you could use
# comments are denoted by a single '#'
# use a shared stack, or have a private instance?
# if none provided, set to '0',
private = 1
# do not be verbose
verbose = 0
# default tag to set on new items
# if none provided, set to 'NONE'
tag = SOME TAG
# default level to handle items
# if none provided, set to 'log'
level = carp
# extra files to include
# if none provided, no files are auto included
include = mylib.pl
include = ../my/other/lib.pl
# automatically delete items
# when you retrieve them from the stack?
# if none provided, set to '0'
remove = 1
# retrieve errors in chronological order, or not?
# if none provided, set to '1'
chrono = 0
DESCRIPTION
Log::Message::Config provides a standardized config object for Log::Message objects.
It can either read options as perl arguments, or as a config file. See the Log::Message manpage for more information about what arguments
are valid, and see the Synopsis for an example config file you can use
SEE ALSO
Log::Message, Log::Message::Item, Log::Message::Handlers
AUTHOR
This module by Jos Boumans <kane@cpan.org>.
Acknowledgements
Thanks to Ann Barcomb for her suggestions.
COPYRIGHT
This module is copyright (c) 2002 Jos Boumans <kane@cpan.org>. All rights reserved.
This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.
perl v5.12.1 2010-04-26 Log::Message::Config(3pm)