Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Question about reading specific line in a text file

by naikonta (Curate)
on Apr 04, 2009 at 07:03 UTC ( #755411=note: print w/replies, xml ) Need Help??


in reply to Re: Question about reading specific line in a text file
in thread Question about reading specific line in a text file

Actually, you only need one control statement if you know exactly the line number you want to process, by using $. aka $INPUT_LINE_NUMBER in English.
while (<DATAFILE3>) { $line = $_, last if $. == 76; }

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://755411]
help
Chatterbox?
[Eily]: there are some special array variables that are not interpolated in double strings, like @*, @/, @(, and @)
[Eily]: is this documented somwhere?
[Eily]: "@{/}" does interpolate @/ though
[Eily]: (while the same for @*, @(, and @) throw a warning)
[talexb]: TStanley Cool. Yeah, that's about 45 minutes away. Nice spot.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2017-06-23 14:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (548 votes). Check out past polls.