Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
ok, here it is:
#!/usr/bin/perl -w use Tk; sub grab; sub st; my $me = MainWindow->new; $menubar = $me -> Frame() -> pack('-side' => 'top','-fill' => 'x'); $filemenu = $menubar -> Menubutton('-text' =>'file') -> pack('-side' = +> 'left'); $filemenu -> command( -label => 'help', -command => sub{st;} ); $filemenu->separator(); $filemenu->command('-label'=>'exit','-command'=>sub {exit}); $me->Button(-text => 'translate to 1337', -command => sub{grab;} )->pack; $text1 = $me->Text (-font=>'14','-width'=>40, '-height'=> 1 )->pack; $me->Label(-text=> '1337 5p34k' )->pack; $text2 = $me->Text (-font=>'14','-width'=>40, '-height'=> 1 )->pack; MainLoop; sub grab { my $take = $text1->get('1.0','end'); $take =~ s/you/joo/ig; $take =~ s/\b(own)/pwn/ig; $take =~ s/good/leet/ig; $take =~ s/great/leet/ig; $take =~ s/cool/dope/ig; $take =~ s/kill/frag/ig; $take =~ s/hack/hax/ig; $take =~ s/ing/xoring/ig; $take =~ s/stupid/nub/ig; $take =~ s/dumb/nub/ig; $take =~ s/soo+/uber/ig; $take =~ s/very/uber/ig; $take =~ s/beginner/nub/ig; $take =~ s/fear/phear/ig; $take =~ tr/aA/4/; $take =~ tr/oO/0/; $take =~ tr/Ee/3/; $take =~ tr/lL/1/; $take =~ tr/tT/7/; $take =~ tr/sS/5/; $take =~ tr/zZ/2/; $text2->delete('1.0','end'); $text2->insert('1.0',"$take"); } sub st { my $me2=MainWindow->new; $me2->Label(-text=>'Created By: Narmak', -font=>'20')->pack; $me2->Label(-text=>'1337 5p34k Visual Version 1.0', -font=>'20')->pack; }

In reply to Re: Re: Re: Re: Re: Re: perl2exe by Anonymous Monk
in thread perl2exe -gui fails by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (3)
    As of 2019-09-17 02:53 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The room is dark, and your next move is ...












      Results (199 votes). Check out past polls.

      Notices?