[comp.lang.perl] help needed: remove leading/trailing blanks

shan_x@jhuvms.bitnet (Xuning Shan) (05/03/90)

I am new to PERL. But from the manual, I think it is a 
better language for me to write an accounting report
program.  There are several files produced by the
accounting softwares. I need to combine them into one.
When comparing user names from two different files,
I used:
	if( $name1 eq $name2)
		{block1}
	else
		{block2}
Block2 was always executed. But by  printing out
$name1 and $name2, they are the same.  Can
some one give me some pointers to solve the problem?
Are there any introduction materials to PERL besides
the PERL manual?

Thanks.

X.  Shan
shan_x@jhuvms.bitnet

PS. I guessed it is due to leading/trailing blanks. ...