1
2
3
4
use GD::Barcode::Code39;
binmode(STDOUT);
print "Content-Type: image/png\n\n";
print GD::Barcode::Code39->new('*CODE39IMG*')->plot->png;
1
2
3
4
5
6
7
use GD::Barcode::Code39;
my $filename = "code39.png";
open(my $png, ">", $filename) || die("Cannnot open $filename: $!");
print $png GD::Barcode::Code39->new('*CODE39IMG*')->plot->png;
binmode($png);
close($png);
1 2 3 4 5
my $filename = "code39.png"; open(my $png, ">", $filename) || die "Cannnot open $filename: $!"; binmode($png); print $png GD::Barcode::Code39->new('*CODE39IMG*')->plot->png; close($png) || die "Cannnot close $filename: $!";
1 2 3 4 5 6 7 8 9 10
#6)CODE-39 #6.1 NORMAL print "=======================\nCode39: NORMAL\n"; $oGdBar = GD::Barcode->new('Code39', '*123456789012*'); print "PTN:", $oGdBar->{text}, ":" ,$oGdBar->barcode, "\n"; open(OUT, '>Code39.png'); binmode OUT; #for Windows print OUT $oGdBar->plot->png; close OUT; undef $oGdBar;