I'd like to add to James' answer with some concrete examples. I've used this operator for pulling out sections of text based on regular expressions.
I was writing a tool that involved running commands on a remote server through Net::SSH. This particular server had the annoying habit of printing a MOTD regardless of whether the session was a login session or not. This resulted in getting a lot of garbage back when I ran a command and retrieved the output. As I didn't have a lot of sway in the server setup, I created a small script that printed out a delimiter, ran the program, and then printed another delimiter. The output looked something like this.
Welcome to Server X!
+----------------------------------------------------------------------+
| Use of this server is restricted to authorized users only. User |
| activity may be monitored and disclosed to law enforcement personnel |
| if any possible criminal activity is detected. |
+----------------------------------------------------------------------+
----------------------------------------------
Setting up environment for user Adam.
----------------------------------------------
>>>>>>>>>>>>>>>>>>>>>>>>>
Program Output
<<<<<<<<<<<<<<<<<<<<<<<<<
The flip-flop operator was a useful shortcut to pull out just the section of code with the output I needed. I used a regex that matched the 25 greater-thans ">" to start the match, and 25 less-thans "<" to end the match.
output.each { |line| puts line if line[/^>{25}/] .. line[/^<{25}/] }
Output
>>>>>>>>>>>>>>>>>>>>>>>>>
Program Output
<<<<<<<<<<<<<<<<<<<<<<<<<
Most examples I've seen have involved pulling chunks of data out of a file or arrays based on regular expressions. Some other examples that come to mind are pulling out git merge conflicts, certain records from legacy flat file systems (like structs written to file), and log files.
Basically, any time you'd need to pull out sections based on beginning and ending data rather than just an individual line's content. It's a bit more complex than just a simple regex, but less complex than writing a parser.
print if ($_ =~ /third/) .. ($_ =~ /fifth/)
(I know it's not your code, but there's no need to continue spreading code that uses deprecated features). – Uncork