> how do i only get the first part from this?
>
> RTFRT_flu@23460@\GE_Machine <- replica:GE_Machine_KI@\GE_Machine
>
> i get this value in $_, now i want to remove anything that is after <- including the
>arrow >>>(what i want is:
RTFRT_flu@23460@\GE_Machine) The arrow may point in the other direction, and the
digits and letters are not similar all
times. Any smart way using regexp or any other way?
split method :
my ($pick, $kick) = split /<\-/, $_, 2;
$pick is what you want.
regex method :
$_ =~ s/^(.+)<\-(.+)$/$1/;
$_ only retain the first part.
Rgds,
Connie
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]