gr*****@aol.com (Griff) wrote in message news:<d6**************************@posting.google. com>...
How come
print "\ "
prints a backslash followed by a space
It does not. It prints a space.
print "\z"
prints the z without a backslash ?
Yeah, but it emits a warning.
As neither \z nor \+space are Perl escape sequences as far as I know,
i would expect them both to be processed identically ?
If you have warnings switched off then they appear to be processed
identically.
However, you should not have warnings switched off.
Any non-letter preceded by a backslash represents that literal
character, always.
Any letter preceded by a backslash is potentially a Perl escape
sequence. There may be no \z yet but there may be one in future.
Hense you get a warning. Until and unless \z is defined it is
interpreted as a literal z. If this offends you then you can always
promote the warning to an error.
This newsgroup does not exist (see FAQ). Please do not start threads
here.