Turn your while into a s///eg
$file =~ s{^\s+description\s\K(\w{4})(-\w+-\w+)(?:=;)}{ my $prefix = $1; my $suffix = $2; # Optional Transformation logic here, giving $prefix and $suffix n +ew values. $prefix.$suffix }mge;
In reply to Re: Problems with matching?
by wind
in thread Problems with matching?
by Argel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |