#!/usr/bin/perl

use warnings;
use strict;

###########################################
#
# subjects.pl
#
# Prints out the Subject lines from a
# mail inbox in "mbox" format.
#
###########################################

# <> takes one line of input from standard input,
# and stores the line in the variable $_

while( <> )
{
    if( /^Subject:/i )
    {
        print;
    }
}
