commented, to hopefully help you sort out exactly what it is you want to remove/change.
Code:
# do this for skill number 0 through 74
foreach my $skill ( 0 .. 74 ) {
# skip to next skill if client can't have this skill
next unless $client->CanHaveSkill($skill);
# get the maximum skll level for current skill number, based on client's class and level
my $max = $client->MaxSkill( $skill, $client->GetClass(), $client->GetLevel() );
# skip to next skill unless the maximum skill level from above is higher than the client's current raw skill level
next unless $max > $client->GetRawSkill($skill);
# set the current skill level to the maximum, as determined above
$client->SetSkill( $skill, $max );
}