look at this code fragment:
--------------------------------------------------------------
for(my $i=0; $i<=$#users; $i++){
if($users[$i][0] eq $name){
chop($users[$i][2]);
my @projects = split(/,/, $users[$i][2]);
return @projects;
}
}
--------------------------------------------------------------
it works fine. However, to get it to work CORRECTLY, I have to replace the 'chop' with a 'chomp'.
If I do that, it doesn't work. it wont remove the trailing newline with a chomp. I've tried about everything I can think of, and nothing is working.
It's redhat 7.1 running perl 5.6.0.
This is pissing me off...
edit: posted blank message.
--------------------------------------------------------------
for(my $i=0; $i<=$#users; $i++){
if($users[$i][0] eq $name){
chop($users[$i][2]);
my @projects = split(/,/, $users[$i][2]);
return @projects;
}
}
--------------------------------------------------------------
it works fine. However, to get it to work CORRECTLY, I have to replace the 'chop' with a 'chomp'.
If I do that, it doesn't work. it wont remove the trailing newline with a chomp. I've tried about everything I can think of, and nothing is working.
It's redhat 7.1 running perl 5.6.0.
This is pissing me off...
edit: posted blank message.
