open(INPUT, $file) or die "Can't read from file: $! $file";
# Where we "move" the pointer to line number 10
$. = 0;
do
{
$_ = <INPUT>
}
until $. == 10;
while (<INPUT>)
{
#Do whatever I want with $_
}
Jeff 'japhy' Pinyan wrote:
On Feb 15, [EMAIL PROTECTED] said:
my $linect="$."; while ( <FILEHANDLE>) { if ( $linect > 9 ) { do whatever ... } $linect++; }
need to use double-quotes around variable $.
No you don't.
my $linecount = $.;
works just fine.
And is there a reason you don't want to use $.? That is, why create another variable which does the same thing?
-- If I have seen further it is by standing on the shoulders of the giants Isaac Newton
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>