I was messing around with the beginnings of a simple script and noticed early one that the output I expected to see whas there but it has a trailing "1" inserted on the end. Why is this 1 being added and how do I get rid of it?
chomp($check = `id -g`);
print $check . "\n";
@results = print $check;
print @results . "\n";
if you are a normal user it is suppose to report back:
but it does not. This is what I get back:
Has an extra 1 on the end.