$/ = '*' x 60 . "\n"; while (my $block = <>) { # Do something to $block... print $block; }