#!/usr/bin/perl my $string = "Bla\nBlo\nBloe"; print join("|", split('something', $string));