Help for this page

Select Code to Download


  1. or download this
    sub test {
       local $\="NEWLINE" if 1;
    ...
       }
       print "text:";
    }
    
  2. or download this
    # This works.
    my @ary;
    ...
    my (@ary);
    @ary = split (" ",$str) while (my $str=<DATA>);
    print join(" / ", @ary);
    
  3. or download this
    my @words = map { split " ",$_ } <DATA>;
    print "@words\n";
    
  4. or download this
    $/=" ";
    my @words=<DATA>;