Help for this page

Select Code to Download


  1. or download this
    open(IN, "/some/file") || die "Cant open /some/file: $!\n";
    while (<IN>) {
    ...
       chomp($capture = $_);
    }
    close(IN);
    
  2. or download this
    open(IN, "/some/file") || die "Cant open /some/file: $!\n";
    chomp( ($capture) = grep(/^$some_match/, <IN>) );
    close(IN);