preface 
 
  Look_up Engine  
 
  email how to  
 
  counter  
 
  regex  
 
  search engine  
 
  home  
 
  ask us  
 

 

Perl scripting


Applications


OO Perl


Perl & Databases


Search a word:
   



© The scientific sentence. 2010

Perl Files
Files


Handling Files

To open a file, read it in, print it, and close it, use the following scripts in this example: Example: -------- $file = 'any_file.txt'; # Name of the file open(INFO, $file); # Open the file @lines = ; # Read it into an array @lines close(INFO); # Close the file print @lines; # Print the array To append to a file, use open(INFO, ">>$file"); # Open for appending Example: ------- open(INFO, ">> $file"); print INFO "This line goes to the file.\n"; @lines = ; # Read it into an array @lines close(INFO); # Close the file print @lines; # Print the array
  
Google
Web
ScientificSentence
 




chimie labs
|
scientific sentence
|
java
|
php
|
green cat
|
contact
|


© Scientificsentence 2007. All rights reserved.