in reply to "uhshifting" the diamond?

glwtta,
If this were a regular file, you could seek back to the beginning of the file. See perldoc -f seek. PodMaster was gracious enough to point out in a /msg that this would not work on a tty or a pipe.

So this leaves handling the first line differently. This can be accomplished using a "flag" or using $. as PodMaster pointed out. That pretty makes this post pointless other than to show what you could do if this was a regular file.

Cheers - L~R