#!/usr/bin/perl -w
=head1 NAME
$RCSfile$
=head1 VERSION
$Id$
=head1 DESCRIPTION
Text einfuegen.
=head1 AUTHOR
$Author$
=cut
use strict;
use Cwd;
use File::Basename;
##########################################################
# Skriptname: $RCSfile$
# Autor: $Author$
# Beschreibung:
# Parameter:
# Dateien:
# WERDEN!>
# History: $Log$
##########################################################
my $scriptName = basename($0);
my $baseDir = getcwd;
my $cfgFile = $baseDir.'/'.fileparse($scriptName, qr/\.[^.]*/).'.cfg';
my %cfgData;
##########################################################
# Read configuration file into hash
##########################################################
open (FILE,"< $cfgFile") || die "Unable to open: $cfgFile";
while (
chomp; # no newline
s/#.*//; # no comments
s/^\s+//; # no leading white
s/\s+$//; # no trailing white
next unless length; # anything left?
my ($var, $value) = split(/\s*=\s*/, $_, 2);
$cfgData{$var} = $value;
}
close FILE;
print $cfgData{'param'};
Recent Comments