# 3. What is the value of "$portresults->{portfolio}->{riskgrade}"?
print "port ", $portresults->{portfolio}->{riskgrade}, "\n";
# 3. What is the value of "sprintf("%.2f", -$portresults->{Bayer}->{xloss} )"?
printf "sprintf: %.2f\n", -$portresults->{Bayer}->{xloss};
# 4. What is the first element of "sort {lc($b) cmp lc($a)} keys %{$portresults}" ?
@ary = sort {lc($b) cmp lc($a)} keys %{$portresults};
print "sort: $ary[0]\n";
####
s # substitute
/ # begin search sequence
< # find a literal <
(?! # negative lookahead ie find a < not followed by
\/* # 0 or more / chars
[bi] # then either a 'b' or and 'i' char
> # then a literal >
) # end of negative lookahead
.*? # 0 or more of any characters, non greedy ie minimal
> # a literal >
/x/ # replacement sequence is a literal 'x' char
g # do all occurences
####
$HTML = <
Foo
This regex is broken
It will cope with this
But not this< /b>
told youtsroken