# Jondy # http://blog.9cbs.net/jondynetuse mime :: base64; use tk; use tk :: labframe
MY $ main = new mainwindow; $ main-> title ('base64 encoding interchange "); $ main-> Geometry (" 300x150 ");
$ main-> labframe (-Label => "main", -Labelside => 'acrosstop', width => 276, height => 60) -> Place (-x => 8, -y => 10); MY $ basecode = $ main-> entry (-width => 20, -relief => 'groove', -font => '{coier new} 13 {normal}') -> Place (-x => 20, -y => 35); MY $ asCicode = $ main-> entry (-width => 20, -relief => 'groove', -font => '{coier new} 13 {normal}' -> Place (-X => 20, -y => 60); $ main-> button (-text => 'conversion', -relief => 'groove', -font => '{Song} 9 {normal}', -command = > / & eNCode) -> Place (-x => 235, -y => 34); $ main-> button (-text => 'restore', -relief => 'groove', -height => '0' , -Font => {Normal} 9 {normal} ', -command => / & decode) -> Place (-x => 235, -y => 59); $ main-> label (-text => " Base64 encoded conversion program ', -font =>' {Song body} 9 {normal} ', -width => 30) -> Place (-x => 128, -y => 105); $ main-> label Text => "Powered by Jondy / N Jondy/@tom.com", -font => '{Song} 9 {normal}', -width => 30) -> Place (-x => 128, -y = > 120);
$ basecode -> INSERT ('0', 'base64'); $ Ascicode -> Insert ('0', 'ASCII');
Mainloop;
Sub Encode {MY $ Asci2code = $ BASECODE-> GET; $ asci2code = decode_base64 ($ asci2code); $ Ascicode -> Delete ('0', 'end'); $ Ascicode -> Insert ('0', $ asci2code) Sub decode {MY $ BASE64CODE = $ Ascicode-> Get; $ base64code = encode_base64 ($ base64code); $ basecode -> delete ('0', 'end'); $ basecode -> insert ('0', $ BASE64CODE);