Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    ...
            $data = join "", <MYFILE>;
    }
    print $data,"\n";                       #prints entire file
    
  2. or download this
     1st line
    2nd line
    3rd line
    4th line
    
    End of file
    
  3. or download this
    [root@ems packages]# perl variable_entire_file.pl
    2nd line
    ...
    
    
    Ending the file