[SATLUG] Calling Perl wizards
Jeremy Mann
jeremymann at gmail.com
Wed Jul 13 22:07:23 CDT 2005
It's not a file, rather a range of text sent to another Perl module
which should write a barcode. I setup something which I want to bring
into this code:
http://mann.uthscsa.edu/barcode.html
You set the barcode number, how big in height you want it, then it
outputs the barcode.
Once I get the formatting down, I want to be able to say I want this
barcode height, I want this range of numbers, now output it into a
table that I can printout.
The code I sent is just to test for the range of barcode numbers and
it outputs correctly for each range.
On 7/13/05, Frank Huddleston <fhuddles at yahoo.com> wrote:
> oops I see that you do not have this gif in a file, but are putting
> actual gif gibberish into the HTML table. What I wrote won't work for
> that.
>
> On Jul 13, 2005, at 8:48 PM, Frank Huddleston wrote:
>
> > Looks like an HTML problem to me. How about just doing:
> >
> > {
> > print "<tr><td>";
> > print "<img src=\"";
> > print GD::Barcode->new('COOP2of5', $number)->plot->gif;
> > print "\"/>";
> > print "</td></tr>";
> > }
> >
> > On Jul 13, 2005, at 5:16 PM, Jeremy Mann wrote:
> >
> >> I've come across a problem with Perl. I'm trying to use to
> >> content-types inside of my script. The problem is that the first one
> >> always overrides the second and I can't figure out how to make it use
> >> both.
> >>
> >> What I'm trying to do is generate a range of numbers, for this case
> >> call it 100 to 150. This number will be sent to a Perl module that
> >> creates barcodes from numbers. I've got that part working just fine.
> >> However, I want to create each barcode inside of a table to be printed
> >> out later.
> >>
> >> My code is:
> >>
> >> #!/usr/bin/perl
> >>
> >> use GD::Barcode::UPCA;
> >>
> >> print "content-type: text/html \n\n";
> >> print "<table border='1'>";
> >> for (my $number = 100; $number <=150; $number++)
> >> {
> >> print "<tr><td>";
> >> print "content-type: image/gif\n\n";
> >> print GD::Barcode->new('COOP2of5', $number)->plot->gif;
> >> print "</td></tr>";
> >> }
> >> print "</table>";
> >>
> >> This comes out as a table with the correct amount of rows, but each
> >> row contains gibberish representing the GIF image as text. I don't
> >> understand why its not using the 2nd specified content-type inside the
> >> table.
> >>
> >> Any ideas?
> >>
> >>
> >>
> >> --
> >> Jeremy
> >> _______________________________________________
> >> SATLUG mailing list
> >> SATLUG at satlug.org
> >> http://alamo.satlug.org/mailman/listinfo/satlug
> >>
> >
> > _______________________________________________
> > SATLUG mailing list
> > SATLUG at satlug.org
> > http://alamo.satlug.org/mailman/listinfo/satlug
> >
>
> _______________________________________________
> SATLUG mailing list
> SATLUG at satlug.org
> http://alamo.satlug.org/mailman/listinfo/satlug
>
--
Jeremy
More information about the SATLUG
mailing list