#!/usr/bin/perl -w $delim = "."; $line = "testing.someting.with.fields"; foreach $field (split(/$delim/, $line)) { print "$field\n"; }