144

Input/Output
Open for Reading

  • To open a file for reading, prepend the file name with the < prefix

      $fName = "/the/path/to/the/filename";
      open( MYINPUT, "<$fName" );

  • To read one line at a time from the file

      $line = <MYINPUT>;