Most likely, your $var1 and/or $var2 are not clean. Somewhere there is(are) returns.
This helps to visually inspect your strings: (just pass your $var1, $var2 as parameters)
use strict; use warnings; inspect("abcd\n123"); sub inspect { (my $copy = shift) =~ s/([^[:print:]])/sprintf " (0x%02x) ", ord $ +1/ge; print $copy; }
If your $var1 and $var2 are read from terminal or a file, you might want to chomp them.
In reply to Re: output to a single line
by pg
in thread output to a single line
by Eva
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |