Question: Suppose I have a text file with the following format 

```
@ATDGGSGDTSG
NTCCCCC
+
@nddhdhnadn
@ATDGGSGDTSG
NTCCCCC
+
nddhdhnadn

```

Now its a repeating pattern of "4" lines and I every time want to print only the 2nd line i.e. the line after the line starting with "@" i.e 2nd line..6th line..etc.

How can I do it?

Answer: 
```
perl -ne 'print if $b and !/^@/; $b=/^@/' file

```
You could have a variable like `$printNextLine` and loop over all your Input, Setting it to `1` whenever you see a line with @ and printing the current line while Setting the variable back to `0` if it is `1`.

Not as effective and short as the other answers but maybe more intuitive for someone new to perl.