We don't bite newbies here... much | |
PerlMonks |
Removing spaces, again.by akm2 (Scribe) |
on Mar 16, 2001 at 01:24 UTC ( [id://64788]=perlquestion: print w/replies, xml ) | Need Help?? |
akm2 has asked for the wisdom of the Perl Monks concerning the following question: My fellow monks, I sit before my window to the all-mighty monastery (thats means my monitor) in a state of confussion. I seek to be enlightened by those of greater wisdom. I am trying to use a regular expression to convert the string (without the quotation marks, of course) below. "AGC LCD-S 8 12X12 WHITE" I run the following expression on the string: ($BKSIC_MODEL[$i]) = substr ($line, 3, 7) =~ m/^\s*(.*)\s*$/; You would expect $BKSIC_MODEL[$i]'s content to equal "LCD-S" (without the quotation marks, of course) right? Well the result I get is: " LCD-S " (without the quotation marks, of course). Please help me slove this strange problem.
Back to
Seekers of Perl Wisdom
|
|