Thanks. All I am trying to do is to read the content of the 4th
delimiter value and remove \n from it. I don't see why it should break
for non-English.
You have still not said HOW it breaks. What does "break" even mean?
Does your program crash? Inifinite Loop? Incorrect output? No
output? WHAT HAPPENS?
This is now the second time I've asked this question. I should not
have to ask it at all. I will not ask it again.
while (<STUFF>) {
next if /^(\s)*$/;
What do you think the parentheses are doing in that statement?
@str1 = split(/,/);
if ($str1[3] =~ /\n/) {
You have a severe logic problem. You're reading a file line-by-line,
but are searching one of the internal fields for a newline. This can't
happen, unless there actually are only four fields in the file. And if
there are, you really just need to chomp() the line before hand.
What do you think the e is doing in that statement?
#$_=~ s/\s+/ /g;
}
foreach $name (@str1) {
chomp($name);
}
Again. Logic problem. Only the very last field can POSSIBLY have a
newline character, so it makes no sense of any kind to chomp each one.
What do you think the quotes are doing in that statement? Please read:
perldoc -q quoting
Like I said, the Posting Guidelines that are posted here twice a week.
They have the words "Posting Guidelines" in their subject. They are
not difficult to find.
Isn't most groups have about the same posting guide?
If you had read the Posting Guidelines for this group, you would have
been able to avoid SEVERAL things you've done in this posting that has
made people decide to skip over your post, and likely kill file you.
Those things include:
not use strict and warnings
using inconsident indentation
not posting sample input
not posting desired output
not posting actual output
not quoting the material you're replying to.
not posting a short-but-COMPLETE script
The posting guidelines are there to give you these tips, so that you
get the best chances of someone who knows what your problem might be
actually reading and responding to your post. Please do not reply
again until you read them.
Paul Lalli