prints:#!/usr/bin/perl use strict; use warnings; use 5.014; { local $/ = ""; while (<DATA>) { chomp; print "$_\n" if tr/\n//; # if 1 or more newlines } } __DATA__ Group 1 Group 2 Group 3 Group 3 Group 4 Group 5 Group 5 Group 5
Group 3 Group 3 Group 5 Group 5 Group 5
In reply to Re: Shorten a list...
by Cristoforo
in thread Shorten a list...
by la
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |