A
Andreas
Hi!
I have a Perl-problem, and I'm really not a Perl-person... Can you help me?
I want to translate a part of a line that looks like:
"...3*DATAWIDTH*4..." to "...24...".
I have the variables
$define_word = "DATAWIDTH".
$define_value = 2
The expression (without the new line):
$row =~ s/([0-9]+)\s*\*\s*$define_word\s*\*\s*([0-9]+)
/$define_value*$1*$2/gi;
just give me the string "...2*3*4...". How can I make this "...24..."
best regards,
Andreas Lundgren
I have a Perl-problem, and I'm really not a Perl-person... Can you help me?
I want to translate a part of a line that looks like:
"...3*DATAWIDTH*4..." to "...24...".
I have the variables
$define_word = "DATAWIDTH".
$define_value = 2
The expression (without the new line):
$row =~ s/([0-9]+)\s*\*\s*$define_word\s*\*\s*([0-9]+)
/$define_value*$1*$2/gi;
just give me the string "...2*3*4...". How can I make this "...24..."
best regards,
Andreas Lundgren