Permalink
Browse files

Perlito5 - TODO update

  • Loading branch information...
1 parent a8106a1 commit 9643c620a54b95f47fcc11a366a951eb7032f39e @fglock committed Sep 5, 2013
Showing with 42 additions and 0 deletions.
  1. +42 −0 TODO-perlito5
View
@@ -357,6 +357,15 @@ TODO list for Perlito5
Both failed with syntax errors.
+-- flip-flop operator
+ if either operand to scalar '..' is a constant the value is implicitly compared to the input line number ($.)
+
+-- unary minus on strings.
+
+ my $_ = "a"
+ print -$_
+ # -a
+
* Nice to Have
@@ -386,6 +395,39 @@ TODO list for Perlito5
-- *{$pkg . "::foo"} = \&bar;
+* Oddities
+
+-- from moritz, Schwern and others at
+ http://stackoverflow.com/questions/161872/hidden-features-of-perl
+
+ - you can give subs numeric names if you use symbolic references
+
+ $ perl -lwe '*4 = sub { print "yes" }; 4->()'
+ yes
+
+ - you can use letters as delimiters
+
+ $ perl -Mstrict -wle 'print q bJet another perl hacker.b'
+ Jet another perl hacker.
+
+ Likewise you can write regular expressions:
+
+ m xabcx
+ # same as m/abc/
+
+ The "desperation mode" of Perl's loop control constructs which causes them to look up the stack to find a matching label allows some curious behaviors which Test::More takes advantage of, for better or worse.
+
+ SKIP: {
+ skip() if $something;
+
+ print "Never printed";
+ }
+
+ sub skip {
+ no warnings "exiting";
+ last SKIP;
+ }
+
* Deprecate

0 comments on commit 9643c62

Please sign in to comment.