in reply to Re: Grepping the filehandler
in thread Grepping the filehandler
Thanks for your explanation.
I tried to reference the file handler with a readline which gave the last line when it is dereferenced. Bit confused here as in the previously mentioned code it considers the first line of a file in a scalar context but when it comes to referencing last line is considered.
open $f,'<','file' or die $!; my $r=\<$f>; print ref($f);#SCALAR print "$$r";# prints the last line of the code
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Grepping the filehandler
by haukex (Archbishop) on Jul 23, 2020 at 17:39 UTC |