Help for this page

Select Code to Download


  1. or download this
    foreach $loopvariable (@data_array)
    { print $loopvariabe ; }
    
  2. or download this
    foreach (@data_array)
    { print $data_array ; } #this looks like wrong syntax
    
  3. or download this
    >perl -wMstrict -le
    "my @array = qw(one two three);
    ...
    "
    Global symbol "$array" requires explicit package name at -e line 1.
    Execution of -e aborted due to compilation errors.
    
  4. or download this
    >perl -wMstrict -le
    "my @array = ('two', 'three', 'four');
    ...
     print qq{@array};
    "
    twp thref fous