Alexandre Jaquet said:
Hi does someone could clear my mind and tell me what would mean :
$loop_hs =~ s/\$HTML{\'$noteval\'}/\*HTML{\'$noteval\'}/g;
Where did you get that? Whoever wrote it doesn't know Perl very well,
evidenced by the use of unnecessary escapes. "'" is not special in a
regex, so
s/\$HTML{'$noteval'}/\*HTML{'$noteval'}/g;
would do the same thing.
What it *means* is impossible to say without context.
What it *does* is basically change dollar signs ($) to asterisks (*)
if the conditions are right. The conditions depend on the content of
$loop_hs and $noteval.
Example for the right conditions:
my $loop_hs = q($HTML{'XXX'});
my $noteval = 'XXX';
print "$loop_hs -> ";
$loop_hs =~ s/\$HTML{'$noteval'}/\*HTML{'$noteval'}/g;
print "$loop_hs\n"; # $HTML{'XXX'} -> *HTML{'XXX'}
Anno