in reply to using split on a file
$/ = undef; [download]
$string = <FILE>; #since $/ is off, everything #gets slurped into $string @array = split /%%%%\n/m, $string; #now we just split on #the appropriate delimiter, carriage #return included [download]