Help for this page

Select Code to Download


  1. or download this
    my @list = qw{ABCDE DEFGH}; # @list has two elements.
    my @list = qq{ABCDE DEFGH}; # @list has one element.
    my @list = q{ABCDE DEFGH};  # @list has one element.
    
  2. or download this
    my @list = qw{ABCDE DEFGH};      # Two elements.
    my @list = ('ABCDE', 'DEFGH');   # Two elements.
    
  3. or download this
    my @list = ([qw{ABCDE DEFGH}], [qw{IJKLM NOPQR}]);  # Two array-refs w
    +ith two elements in each.
    my @list = (['ABCDE, 'DEFGH'], ['IJKLM', 'NOPQR']); # Two array-refs w
    +ith two elements in each.
    
  4. or download this
    my @list = ('ABCDE', qw{DEFGH IJKLM}, 'NOPQR');  # Four elements.