Help for this page

Select Code to Download


  1. or download this
    print ("a", "b")[1];
    print qw(a, b)[1];
    ...
    # Result:
    syntax error at x.pl line 3, near ")["
    Execution of x.pl aborted due to compilation errors.
    
  2. or download this
    use strict;
    use warnings;
    ...
    Possible attempt to separate words with commas at x.pl line 6.
    syntax error at prog.pl line 5, near ")["
    Execution of x.pl aborted due to compilation errors.
    
  3. or download this
    print ("a", "b")[1];
    
  4. or download this
    (print ("a", "b"))[1];
    
  5. or download this
    print (("a", "b")[1]);
    
  6. or download this
    print qw(a, b)[1];
    
  7. or download this
    print qw(a b)[1];