Help for this page

Select Code to Download


  1. or download this
    $ perl -we'my @a=qw( a b c ); my $x = @a . "\n"; print $x' | od -c
    0000000   3  \n
    0000002
    
  2. or download this
    $ perl -we'my @a=qw( a b c ); my $x = @a "\n";'
    String found where operator expected at -e line 1, near "@a "\n""
            (Missing operator before "\n"?)
    syntax error at -e line 1, near "@a "\n""
    Execution of -e aborted due to compilation errors.
    
  3. or download this
    $ perl -we'my @a=qw( a b c ); my $x = (@a, "\n"); print $x' | od -c
    Useless use of private array in void context at -e line 1.
    0000000  \n
    0000001
    
  4. or download this
    $ perl -we'my @a=qw( a b c ); my @x = (@a, "\n"); print "[$_]" for @x'
    + | od -c
    0000000   [   a   ]   [   b   ]   [   c   ]   [  \n   ]
    0000014