Skip to content

Instantly share code, notes, and snippets.

@curegit
Last active February 23, 2021 12:58
Show Gist options
  • Save curegit/4a36c56beea482bcb7bc0f7c8ab8cae5 to your computer and use it in GitHub Desktop.
Save curegit/4a36c56beea482bcb7bc0f7c8ab8cae5 to your computer and use it in GitHub Desktop.
QRコードを出すPerl CGI
#!/usr/bin/perl
use CGI;
use GD::Barcode::QRcode;
binmode(STDOUT);
my $cgi = new CGI;
my $string = $cgi->param("string");
print "Content-Type: image/png\n\n";
print GD::Barcode::QRcode->new($string, { Ecc => "Q", Version => 5, ModuleSize => 3 })->plot->png;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment