Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
The following manifest errors when evaluated using puppet apply:
'cdf' =~ /^([a-z])(.*)/ |
notice($2) |
The error is:
This '=~' expression has no effect. A value was produced and then forgotten (one or more preceding expressions may have the wrong form)
|
This is not correct since the result of the match is stored in numeric variables $1 ... $n and can be used.
Turning the comparison into an assignment, i.e.:
$x = 'cdf' =~ /^([a-z])(.*)/ |
notice($2) |
yields the correct result:
Notice: Scope(Class[main]): df
|