why no syntax error?
From: Ronald Fischer (ronaldf_at_eml.cc)
Date: 11/30/04
- Next message: Sherm Pendley: "Re: why no syntax error?"
- Previous message: Richard Gration: "Re: "anonymous" variable in Perl?"
- Next in thread: Sherm Pendley: "Re: why no syntax error?"
- Reply: Sherm Pendley: "Re: why no syntax error?"
- Reply: Anno Siegel: "Re: why no syntax error?"
- Reply: Bernard El-Hagin: "Re: why no syntax error?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Nov 2004 02:05:31 -0800
I recently wrote the following nonsense:
if($arg = ~ /^\d{4}$/) { ... }
In case you don't see it immediately: I had erroneously typed a space between
the equal sign and the tilde.
To my surprise, this statement was executed without error message. $arg was set
to 294967295.
The tilde did bitwise complement of course, but on what? On a regexp? This
does not seem to make sense to me....
This was executed under Perl 5.6.1
Ronald
- Next message: Sherm Pendley: "Re: why no syntax error?"
- Previous message: Richard Gration: "Re: "anonymous" variable in Perl?"
- Next in thread: Sherm Pendley: "Re: why no syntax error?"
- Reply: Sherm Pendley: "Re: why no syntax error?"
- Reply: Anno Siegel: "Re: why no syntax error?"
- Reply: Bernard El-Hagin: "Re: why no syntax error?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|