More precisely:$string =~ s/\n//g;
This safer version of "chop" removes any trailing string that corresponds to the current value of $/ (also known as $INPUT_RECORD_SEPARATOR in the English module).
In reply to Re^2: Regex Confusion
by toolic
in thread Regex Confusion
by Kelly22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |