use strict; use warnings; my $line = "This|that"; my @cols = split(/|/, $line); print "@cols";