If you just want to remove the extra spaces then use the \s+ construct:
The regex says substitute 1 or more spaces with a single space. (Note: you have $line[0] which I assume is a typo). Check out perlre for more info.$lines[0] =~ s/\s+/ /g;
In reply to Re: help! reading in special characters from file
by derby
in thread help! reading in special characters from file
by confused_programmer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |