|Perl: the Markov chain saw|
Return full line from line number Xby Rathlar (Initiate)
|on Oct 26, 2008 at 22:23 UTC||Need Help??|
Rathlar has asked for the
wisdom of the Perl Monks concerning the following question:
I'm working on some code here and I have no idea how to pull a full line by searching for the line number.
i have file mdata.txt and inside the lines are like this:
Here is what I need to do:
Pull the number and name from the txt file located at a user defined line number. Then split the 2 and assign them to variables.
I think that will split the line and assign the variables in one go unless I messed up there as well...
Basically I just need to search a file for a specific line number and then assign the text on that line to $mdata
Would anyone be able to help me figure this out? I'd be forever grateful for help with this.