1
0

Combine two pattern matches

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6927 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-07-21 19:24:43 +00:00
parent 7d7feff03f
commit 01a7a480e1

View File

@ -875,10 +875,10 @@ sub read_a_line() {
#
# Expand Shell Variables using %ENV
#
while ( $currentline =~ /^(.*?)\$([a-zA-Z]\w*)(.*)$/ || $currentline =~ /^(.*?)\${([a-zA-Z]\w*)}(.*)$/ ) {
my $val = $ENV{$2};
while ( $currentline =~ /^(.*?)\$({)?([a-zA-Z]\w*)(?(2)}|)(.*)$/ ) {
my $val = $ENV{$3};
$val = '' unless defined $val;
$currentline = join( '', $1 , $val , $3 );
$currentline = join( '', $1 , $val , $4 );
}
if ( $currentline =~ /^\s*INCLUDE\s/ ) {