in reply to Generate the perl sequence 1, 11, 111, ....
Such a home work assignment should immediately trigger the term 'recursion'. The best way to impress your teacher is:
It even starts with 0 1's, for extra credits.perl -E'sub _{push@_,say@_;&_}_'
If you want to golf, you might want to try
perl -E'{$_.=say;redo}'
In Section
Seekers of Perl Wisdom