Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

(ichi) Re: Regex tutor in Perl/Tk

by ichimunki (Priest)
on Jul 01, 2002 at 15:40 UTC ( #178584=note: print w/ replies, xml ) Need Help??


in reply to Regex tutor in Perl/Tk

Just a suggestion (not a criticism!), when you have a lot of Tk widgets that share properties, like you do here with font, justify, offvalues, etc, you might consider simply making an array of those properties and stuffing that into the property list for each widget instead.

my @props = ( '-color' => COLOR, '-justify' => 'left', '-etc' => 'etc' ); my $button = $root->Button( -text => 'Sample', @props )->pack();
This keeps your code more concise and makes the differences between the widgets easier to see.


Comment on (ichi) Re: Regex tutor in Perl/Tk
Download Code
Re: (ichi) Re: Regex tutor in Perl/Tk
by Popcorn Dave (Abbot) on Jul 01, 2002 at 16:16 UTC
    Thanks for that!

    Every time I think I know Perl... : )

    Some people fall from grace. I prefer a running start...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://178584]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2015-07-02 04:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (27 votes), past polls