while() { my $i; chomp; print join('', map { $i++; "$_" }, split /;/)."\n"; } __ hello;this;is;a;test this;is;another;simple;test