Help for this page

Select Code to Download


  1. or download this
    if ($num % 2 == 0) {
        #even
    ...
    else {
        #odd
    }
    
  2. or download this
    while(!eof(FILE1) && !eof(FILE2) {
       my $file1 = <FILE1>;
       my $file2 = <FILE2>;
    }
    
  3. or download this
    my @eol = ("\n","\t","\r"); # etc, etc
    while(<FILE>) {
        local $/ = shift @eol;
        my $line = <FILE>;
    }