Solution: Remove a Newline Character

See the solution to the exercise on removing a newline from the beginning of a scalar.

We'll cover the following...

Solution

Let’s look at the solution before jumping into the explanation:

Press + to interact
$var = reverse $var;
chomp $var;
print scalar reverse $var;

Explanation

...