When parsing text, it's important to know exactly what format(s) you have to deal with. Any vagueness or uncertainty will likely lead to wrong results. For instance, you say that your lines are formatted like "x=y", but then you give examples that are "x = y". See the difference? You have to know which it is -- or if it could be both -- so you can parse it properly. In this case, you might need to split on '=', ' = ', or '/\s*=\s*/'.
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
In reply to Re: Swap Input lines
by aaron_baugher
in thread Swap Input lines
by 300zxmuro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |