>>>>> "Peter" == Peter Cline <[EMAIL PROTECTED]> writes:
Peter> Try this.
Peter> my $text = "Browser/Version Platform";
Peter> my ($keep,$discard) = split / /, $text;
Peter> print "$keep\n";
Peter> This splits on space and saves the part you want to the variable $keep
Peter> and the rest to $discard.
Actually, it keeps the first element in $keep, the second element in
$discard, and discards any remaining elements.
You can simplify that with just:
my ($keep) = split / /, $text;
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!