Help for this page

Select Code to Download


  1. or download this
    while (<$FH>) { 
      print; # prints the current line using $_ implicitly
    }
    
  2. or download this
    while ( my $filename = readdir(DH) ) {
      next if $filename eq '.' or $filename eq '..';
    ...
        close FH or die "close: $!\n";
      }    
    }
    
  3. or download this
    if ( -f 'The Bravery-Believe.txt' ) {
      # do something
    }
    
  4. or download this
    my $wanted = 'The Bravery-Believe.txt';
    
    ...
        
    }