I don't know when it was introduced, but it was before 5.6
You're right. I was fooled by a funny, little quirk:
$ perl555 -e 'use 5.006' syntax error at -e line 1, at EOF Execution of -e aborted due to compilation errors. $ perl555 -e 'use 5.006;' Perl 5.006 required--this is only version 5.00505, stopped at -e line +1. BEGIN failed--compilation aborted at -e line 1.
Apparently the semicolon is significant.
So, the broader point still holds not to use dotted-numerics, even with a semicolon:
$ perl555 -e 'use 5.6.0;' syntax error at -e line 1, near "use 5.6" Execution of -e aborted due to compilation errors.
Isn't the syntax deprecated or invalid in future versions too?
I think you're referring to "v-strings" -- v5.6.0 -- whereas this is some magic in parsing use with ordinary 5.6.0 as some sort of bareword. E.g. (and without the semicolon)
$ perl562 -e 'use v5.8.0' Perl v5.8.0 required--this is only v5.6.2, stopped at -e line 1. BEGIN failed--compilation aborted at -e line 1. $ perl562 -e 'use 5.8.0' Perl v5.8.0 required--this is only v5.6.2, stopped at -e line 1. BEGIN failed--compilation aborted at -e line 1.
I don't know if the latter is going away or not.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re^2: Don't use 5.6.N
by xdg
in thread Don't use 5.6.N
by xdg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |