<p>How can I extract the whole line in a row, for example, row 3.
These data are saved in my text editor in linux.
Here's my data:</p>

<pre><code>1,julz,kath,shiela,angel
2,may,ann,janice,aika
3,christal,justine,kim
4,kris,allan,jc,mine
</code></pre>

<p>I want output like:</p>

<pre><code>3,christal,justine,kim
</code></pre>

You can assign the diamond operator on your filehandle to a list, each element will be a line or row.
```
```
open $fh, "myfile.txt";
my @lines = <$fh>;
```
```
EDIT:
This solution grabs all the lines so that you can access any one you want, e.g. row 3 would be
```
$lines[2]
```
... If you really only want one specific line, that'd be a different solution, like the other answerers'.