#!/usr/bin/perl -w use strict; my @array; open(FILE, ") { chomp $_; push (@array, $_); $/= "####"; } close (FILE); my $i="0"; foreach (@array) { $i++; print "$i$_$i";} #### stuff****more stuff####this shouldnt show up #### C:\Perl>perl test.pl 1stuff12more stuff23this shouldnt show up3