Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add simple test script to track side effects

  • Loading branch information...
commit e94280ce6edeefb3a4536475379882205d496912 1 parent d6bb78f
@FROGGS FROGGS authored
Showing with 37 additions and 0 deletions.
  1. +37 −0 test.pl
View
37 test.pl
@@ -0,0 +1,37 @@
+
+say "hello from P6";
+if 1 {
+ say 1;
+}
+
+{
+ use perl5;
+ use strict;
+ use feature 'say'; # say does work without it though
+
+ #package Main;
+
+ if( 2 ) {
+ say("2: hello from P5");
+ }
+ if( 0 ) {
+ say "you should never see this";
+ }
+ say "you should never see this" if 0;
+ say "you should never see this" unless 1;
+ unless ( "" ) { print "3\n"; }
+ say 4;
+ say "5: 1..5";
+ $_ = 7;
+ for (6..9) { say $_ }
+ for (10..13) {
+ say $_;
+ }
+ sub a { say 14; }; a();
+ my $s = 15;
+ say $s;
+ #sub b ($x) { say $x } # Method 'multisig' not found for invocant of class 'Perl6::P5Grammar'
+ #for my $x (10..13) { say $x; } # scoped variables not yet implemented. Sorry.
+}
+
+say "16";
Please sign in to comment.
Something went wrong with that request. Please try again.