NateTut has asked for the wisdom of the Perl Monks concerning the following question:
# # right_bmp # # Label BMP Stored as a Scalar # # FILENAME: C:/My Documents/Clients/Dem/pl/MMG/Right.bmp # THIS FUNCTION RETURNS A BASE64 ENCODED # REPRESENTATION OF THE ABOVE FILE. # SUITABLE FOR USE BY THE -data PROPERTY. # OF A Perl/Tk PHOTO. # # Arguments: # # Returns: $binary_data # sub right_bmp { my $binary_data = <<EOD; Qk1W5ggAAAAAADYAAAAoAAAAsAEAAMIBAAABABgAAAAAACDmCAAAAAAAAAAAAAAAAAAAAA +AAAAAA . . . #Long sequence of encoded data deleted for brevity . . . CQAACwAADgIAFQwACwQABQMAAAIBAgwTAAAOAAAR EOD return($binary_data); } # END right_bmp... # # Later on in the Code... # my $Right_Picture = $root->Photo ( -data => MMG_Pictures::right_bmp(), -format => 'bmp', ); . . . # # Give Feedback to User # if($Answer == $My_Answer) { $text_Messages->Insert("YOU ARE CORRECT!\n$Problem $Answer\n"); $label_Picture->configure ( -image => $Right_Picture, ); } else { $text_Messages->Insert("WRONG!\n$Problem $Answer\nYou said:$My_A +nswer\n"); $label_Picture->configure ( -image => $Wrong_Picture, ); }
readmore tags added by holli
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inline Encoding Audio::Wav Objects
by thundergnat (Deacon) on Jun 28, 2005 at 17:08 UTC | |
by NateTut (Deacon) on Jun 28, 2005 at 23:05 UTC | |
|
Re: Inline Encoding Audio::Wav Objects
by zentara (Cardinal) on Jun 29, 2005 at 11:46 UTC | |
|
Re: Inline Encoding Audio::Wav Objects
by waswas-fng (Curate) on Jun 28, 2005 at 16:53 UTC |