in reply to Problem with \\
A single "\" gets encoded or escaped as a double "\\" and therefore your challenge string unexpectedly has grown to be 9 characters long.<crystal-ball mode=off>
Output isuse strict; use warnings; use Data::Dumper; my $test = '123\456'; print Dumper($test);
$VAR1 = '123\\456'
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|