open(TEXT, "/home/nikster/supertext") || die "Unable to read from supertext : $!"; while() { if ($_ =~ m/^hallo/ig) { push(@text, $_); } } close (TEXT); foreach $line (@text) { #print "$line\n"; push @temp, (split(/\:|\[|\]| /, $line); }