in reply to I'm reading a book! It's given me more questons!

Others pointed out the problems with your code chunks, but I'd like to give some humble suggestions.

I understand that it is proof-of-concept code, but the first example is probably better rephreased as:

my @step = (1..9, 0); # Use of comma operator, no need for push my $step = join '', @step; # Use of specific function for the task print ($step x 7);
and, of course, you don't even need a variable for the array:
my $step = join '', (1..9, 0); print ($step x 7);
or for the scalar:
print ((1..9, 0) x 7);
This results in less code and improved readability IMHO. Well, maybe the last is not so readable :)

Regarding the second example, I suggest that you provide also some examples of how your scripts behaves, showing sample input, the resulting output and pointing out where you expected different results.

Update: added one-line example and comment about readability.

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.