Help for this page

Select Code to Download


  1. or download this
    use strict;
    use 5.010;
    ...
    foreach my $word (qw(abc def ghi)) {
       say $word;
    }
    
  2. or download this
    use strict;
    use 5.010;
    ...
       say $word;
    }
    say $word;  # word is "hello" here
    
  3. or download this
    use strict;
    use 5.010;
    ...
       say $word;
    }
    # generate syntax error if $word is used here