Warning: Cannot modify header information - headers already sent by (output started at /data/web/virtuals/85063/virtual/www/domains/waldauf.org/lib/plugins/color/syntax.php:1) in /data/web/virtuals/85063/virtual/www/domains/waldauf.org/inc/actions.php on line 180
programming:perl:read_file - WiKi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

programming:perl:read_file [2015/03/31 22:45] (current)
Line 1: Line 1:
 +====== Read file ======  
 +  
 +===== Read last X lines =====  
 +  
 +==== Using bash tail ====  
 +  
 +<code perl>  
 +open my $fh, "-|", "tail", "-3", @ARGV or die "$0: cannot read file: $!";  
 +  
 +print while <$fh>;  
 +</code> 
Navigation
Print/export
Toolbox