Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
my $health = 100;
sub updateUI { my ($health) = @_; print "Health: $health\n"; }
sub damage { $health -= 20; updateUI($health); }
sub heal { $health += 10; updateUI($health); }
# Simulate actions
updateUI($health);
damage();
heal();Coding works best on desktop or with an external keyboard.