in reply to print Is Substituting Characters At Beginning Of String
chomp $line;
You still have the carriage returns (\r) at the end of your strings, which will move the cursor to the start of the line again and then overwrite stuff.
I recommend stripping all whitespace from the end of the strings:
$line =~ s!\s*$!!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print Is Substituting Characters At Beginning Of String
by shilo (Novice) on Jan 14, 2016 at 20:04 UTC | |
by Athanasius (Archbishop) on Jan 15, 2016 at 09:04 UTC | |
by shilo (Novice) on Jan 15, 2016 at 14:32 UTC |