use GD::Barcode::UPCE; my $oGdBar = GD::Barcode->new( 'UPCE', $customer{id} ); if ( !$oGdBar ) { display_menu_error("ERROR: $GD::Barcode::errStr \n"); } print "PTN:", $oGdBar->{text}, ":", $oGdBar->{barcode}, "\n"; #FIXME Prints out an error regarding unblessed referance my $output = '/tmp/UPCE.png'; open my $OUTFILE, '>', $output; print {$OUTFILE} $oGdBar->plot->png; close {$OUTFILE}; undef $oGdBar; undef $OUTFILE; undef $output; system "lpr -r $output";