in reply to Re: Getopt, regexen, and newlines
in thread Getopt, regexen, and newlines

The shell does indeed sanitize the arguments, unless I quote them. However, quoting them doesn't change the effect of the script, which still ends up giving me sanitized escape characters rather than newlines.

Of course, I should have mentioned as much in the original post, and I'll go add something about that as a note now. I'll rep++ you for pointing that out.

print substr("Just another Perl hacker", 0, -2);
- apotheon
CopyWrite Chad Perrin

Replies are listed 'Best First'.
Re^3: Getopt, regexen, and newlines
by Roy Johnson (Monsignor) on Oct 12, 2005 at 18:58 UTC
    Backslashed characters are just backslashed characters unless Perl reads them in a double-quotish context. To do that, see efficient char escape sequence substitution.

    Caution: Contents may have been coded under pressure.