#!/usr/bin/perl -w #distlog.pl use strict; use IO::File; my %output_handles; while (<>) { unless (/^(\S+):/) { warn "ignoring the line with missing name: $_"; next; } my $name = lc $1; my $handle = $output_handles{$name} ||= IO::File->open(">$name.info") || die "Cannot create $name.info: $!"; print $handle $_; } #### Error: Can't use string ("IO::File") as a symbol ref while "strict refs" in use at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/IO/File.pm line 188, <> line 1.