you are correct, you do not need " " around $.
thank you!
I was using strict and warnings, but must of had another error.
I am unfamiliar with the variable $.? I tried playing with it, but was
unsuccessful. I could not find it in cookbook nor in programming perl.
linect=$.
linect=1;
while ( <FILEHANDLE>) {
if ( $linect > 9 ) {
do whatever ...
}
$linect++;
}
Derek B. Smith
OhioHealth IT
UNIX / TSM / EDM Teams
Jeff 'japhy'
Pinyan
<[EMAIL PROTECTED] To
rg> [EMAIL PROTECTED]
cc
02/15/2005 10:38 'Perl Beginners '
AM <[email protected]>
Subject
RE: Start reading from a specific
line
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?
--
Jeff "japhy" Pinyan % How can we ever be the sold short or
RPI Acacia Brother #734 % the cheated, we who for every service
http://japhy.perlmonk.org/ % have long ago been overpaid?
http://www.perlmonks.org/ % -- Meister Eckhart
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>