eprom has asked for the wisdom of the Perl Monks concerning the following question:
When I need to put the same information to a file, I use:foreach $play (@ranked) { if (($play->{track} ne '') && ($play->{track} ne 0)){ $title = pack("A32", "$play->{title}"); $artist = pack("A32", "$play->{artist}"); $album = $play->{album}; $track = $play->{track}; if(length($track) == 1){ $track = '0'.$track; } $listbox->insert('end', "$title$artist$play->{album}-$track"); } }
When I examine the file report.dat, it contains text only. How do I generate a file containing text and fonts, size, etc.? or How can I send this to the local printer along with font, size, etc.?open(REPORT, ">report.dat") || die("Can't open output file"); @ranked = sort by_artist @hash; foreach $play (@ranked) { if($play->{track} != 0) { $title = $play->{title}; $artist = $play->{artist}; $album = $play->{album}; $track = $play->{track}; if(length($track) == 1){ $track = '0'.$track; } write REPORT; } } close(REPORT);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to print fonts to printer
by maa (Pilgrim) on Mar 05, 2004 at 20:23 UTC | |
|
Re: How to print fonts to printer
by muba (Priest) on Mar 05, 2004 at 20:56 UTC | |
|
Re: How to print fonts to printer
by arden (Curate) on Mar 06, 2004 at 02:51 UTC |