#!/usr/bin/perl use strict; use warnings; print "Test 4:"; foreach $_ (0 .. 5) { print join("\n", (("hello[$_]") x $_)), "\n\n"; } print "Test 5:"; foreach $_ (0 .. 5) { print join("\n", ("hello[$_]" x $_)), "\n"; }