Something in my code is inserting invisible newlines into my strings in a terminal, and I would like to have any suggestions as to how to fix my code to get rid of them, or where to find such info.
code causing newline (newline 'appears' directly after $index):
say "Do you want to simplify a radical (option 1), find a prime facto +rization (option 2), or both (option 3)?\n"; $option=<STDIN>; say "Enter a number:\n"; $input = <STDIN>; if ($option==1 || $option==3){ say "Enter index of radical\n"; $index=<STDIN>; } $safe = $input; $current =$safe; #... if($current!=1){ say "$simple rad[$index] $current"; } if ($option>1){ say "The prime factorization of $safe is:\n"; say %powers;} if ($option!=2){ $simple = ($safe/$current); $current=$safe/($simple**$index); say "The simplified radical is:\n"; if($current!=1){ say "$simple rad[$index] $current"; }else{ say "$simple rad[$index]"; }}
In reply to 'Invisible' newlines/line wrapping by luolimao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |