That gives "a". I'd expect nothing to get printed - if I remove the first character of a one-character string, I should be left with the empty string, not with the same string.$_ = "a"; s/(.(.*))/($2ne'')?$2:$1/e; print
In reply to Re^4: cut of first char of a string
by Anonymous Monk
in thread cut of first char of a string
by holli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |