elsif( ref $data eq 'IO::File' ) { my $block; while( $data->read($block, 1024) ) { print $block; } # Close file undef $data;