Perl Shell - A Solution

print $value, "\n" if $p;

If the -p switch was used, we print the value of each Perl command evaluated.

Recall: