Help for this page

Select Code to Download


  1. or download this
    open my $inputFH, '<', $pathToFile or die "Can't open $pathToFile for 
    +reading.  Reason given = $!\n";
    open my $outputFH, '>', $pathToFile2 or die "Can't open $pathToFile2 f
    +or writing.  Reason given = $!\n";
    while ($line = <$inputFH>)
    {
        print $outputFH "Foo $line Baz\n";
    }