#! /usr/bin/perl use strict; use warnings; my $delim = '\|'; my $string = qq~test|dies|ist|ein~; fill_table($string,"",$delim); sub fill_table { my $string = $_[0]; # Dateiname my $src_path = $_[1]; # Pfad zur Datei my $delimiter = $_[2]; # Separator my @Bom = split(/$delimiter/, $string); print $_,"\n" for(@Bom); }