Help for this page
my $string = "Keep this | toss this"; my ( $keep ) = $string =~ /^(.*?)\|/; print $keep, "\n";
my $string = "keep this | keep that too | toss this | toss this too"; my ( $this, $that ); ( $this, $that, undef ) = split /\|/, $string, 3;