Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
        push @array1, 'crap';
        push @array2, 'dumb';
    }
    
  2. or download this
    Global symbol "@array1" requires explicit package name at ./test_loop.
    +pl line 18.
    Global symbol "@array2" requires explicit package name at ./test_loop.
    +pl line 19.
    Execution of ./test_loop.pl aborted due to compilation errors.
    
  3. or download this
    ...
    my (@array1, @array2);
    
    foreach my $item ('top', 'heavy', 'fool') {
    ...