in reply to %p issue on perl script
You're treating the contents of $row and $col as a sprintf format sequence. Change
printf " %s At ($row, $col) the row is %s and the column is %s for EUR + & NAM \n", $feedback_value, $my_row, $my_column;
to
printf " %s At (%s, %s) the row is %s and the column is %s for EUR & N +AM \n", $feedback_value, $row, $col, $my_row, $my_column;
If you wanted to to interpolate the values into the format string because you were using the same format string over and over again, you'd need to convert instances of "%" to "%%".
my $power = '95%'; (my $escaped_power = $power) =~ s/%/%%/g; my $fmt = "sample: %-4s result: %5.2f power: $escaped_power\n"; for (0..$#data) { printf($fmt, $_, $data[$_]); }
|
|---|