my $maskPrompt = "\r" . ' ' x (length($prompt) + 2) . "\r";
Why do you create this variable if you never use it?
my (@input) = (); print $prompt; chomp @input;
Why do you assign nothing to an already empty variable? And why then do you chomp an empty variable?
foreach $times(1 .. $times) { $ascii .= chr (<STDIN>); }
Why are you using the same variable name for the loop creation and for the local variable? I have been using Perl for many many years and I have never seen anyone do this before and it is very confusing. It only works because the value stored in $times is local to the loop body but it is not something that you should do because it is very confusing.
In reply to Re^2: Problem with reading multi-line
by jwkrahn
in thread Problem with reading multi-line
by sarshads
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |