I have a line:
i.like.donuts.but.only.with.tea
now I want to remove everything that follows the last "."
including the last ".".
in this case ".tea"
I hav absulte no idea. I tried something like:
@parts = splite /\./, $line;
$parts[-1] = undef;
foreach $parts (@parts) {
$newline .= "$parts.";
}
but then I got a dot at the end of the line.
Thanks,
Bastian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>