in reply to using split without $junk

Anonymous Monk,

This was discussed recently, but here is one way that doesn't involve split at all.

#!/usr/bin/perl -w use strict; my $string = 'part of string to keep|part of string to toss'; my $keep = substr($string , 0 , index($string , '|'));
Cheers - L~R