Using a backslash "escapes" the following character. Given:
$n = "\1n\1r"; foreach (split //, $n) { print ++$x." ".ord($_)."\n"; }
...produces:
| 1 | 1 |
| 2 | 110 |
| 3 | 1 |
| 4 | 114 |
Check out Quote and Quote-like Operators in perlop.
Cē
In reply to Re: What does \1 do?
by cciulla
in thread What does \1 do?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |