Help for this page

Select Code to Download


  1. or download this
    open (PAGE, $filename) || die "Can't open $filename: $!";
    my $text = <PAGE>;
    close PAGE || die "Can't close $filename: $!";
    
    # parse $text somehow
    
  2. or download this
    my $text;        # outside of the block so it's in scope after we leav
    +e the block
    {
        local $/;
    ...
        $text = <PAGE>;
        close (PAGE) || die "Can't close $filename: $!";
    }