in reply to Xcalcfin

smokemachine, your GUI looks very sharp.

The only suggestion I would make with regards its presentation is to perhaps make the result window (the Entry widget) larger:

our $dis = $mw->Entry( -width => '30' )->pack; # Changed width +from 10 to 30
As for the actual code, I very much agree with jdporter's points.  Here are some further suggestions I would add:
  1. Put back use strict.  Rather than comment it out to get rid of the one error:   Global symbol "$label" requires explicit package name at Xcalcfin line 52., it's better to just fix the error by changing label = $mw->Text( ... ) to my label = $mw->Text( ... ), and then you get to keep the benefits of "use strict" afterwards.
  2. Add use warnings;.  Just because there aren't any warnings now, doesn't there won't be any later.  Do yourself a favor by protecting against them now.
  3. The only place where characters wrap 80-columns is the line separators:   #####################################.  Make them less than 80 characters for people who like the default terminal width.
  4. Use perltidy to clean up the indentation.  Then, try hard to imitate its style later, when you write more code!

    Wouldn't this:

    sub CLxsub { $x=0; $dis->delete('0.0','end'); } sub xsysub { $x = $y; $y = $dis->get; $dis->delete('0.0','end'); $dis->insert('end',$x); $res='s'; } sub Rssub { my $aj=$dis->get; $dis->delete('0.0','end'); $dis->insert('end',$y); $x=$y; $y=$z; $z=$t; $t=$aj; $res='s'; }
    be so much easier to read like this ...?
    sub CLxsub { $x = 0; $dis->delete( '0.0', 'end' ); } + sub xsysub { $x = $y; $y = $dis->get; $dis->delete( '0.0', 'end' ); $dis->insert( 'end', $x ); $res = 's'; } + sub Rssub { my $aj = $dis->get; $dis->delete( '0.0', 'end' ); $dis->insert( 'end', $y ); $x = $y; $y = $z; $z = $t; $t = $aj; $res = 's'; }
  5. Move all of the huge anonymous subroutines out of the button definitions!  They will be easier to read, and to maintain, as standalone, named subroutines.  You should only pass the subroutine names (and any arguments) to the button definitions.
  6. Be productively "lazy", and create subroutines for common functionality.  For example, there's no need to do this over and over again:
    my $STO = $mw->Button( -text => 'STO', -command => sub{$sto='s'}, -width =>'1', -height =>'1', -foreground => 'white', -background => 'black' )->pack; $STO->place(-x=>100 + $xxx,-y=>'170');
    Instead, write a "wrapper" for a button, such as:
    sub button($$$$$;$$$$) { my ($parent, $text, $pcmd, $x, $y, $fg, $bg, $width, $heig +ht) = @_; + # Defaults $fg ||= 'white'; $bg ||= 'black'; $width ||= 1; $height ||= 1; + # Color abbreviations my $p_abb = { 'db' => 'darkblue', 'dg' => 'darkgoldenrod', }; defined($p_abb->{$fg}) and $fg = $p_abb->{$fg}; defined($p_abb->{$bg}) and $bg = $p_abb->{$bg}; + # Create the button widget (note command need not be given +) my $b = $parent->Button(-text => $text); $pcmd and $b->configure(-command => $pcmd); $b->configure(-width => $width, -height => $height); $b->configure(-foreground => $fg, -background => $bg); + # Place the button (no need to "pack" it first!), and retu +rn it $b->place(-x => $x, -y => $y); return $b; }
    One advantage of this is that you can default those parameters which are (almost) always the same, such as the height, width and colors.  Another is that, since you're now doing the place within the subroutine (and you don't need the "pack" first, by the way), you don't need to assign the button outside of the subroutine in most cases.  Finally, the button definition becomes much cleaner:
    button($mw, 'Enter', [\&entersub], 197, 155); button($mw, '+', [\&somasub], 353, 170); button($mw, '-', [\&subtrasub], 353, 140); button($mw, 'x', [\&multisub], 353, 110); button($mw, '/', [\&divisub], 353, 80); button($mw, 'CLx', [\&CLxsub], 133, 140); button($mw, 'xsy', [\&xsysub], 100, 140); button($mw, 'Rs', [\&Rssub], 66, 140); button($mw, 'SST', [\&Rssub], 33, 140); button($mw, 'R/S', [\&Rssub], $xxx, 140); button($mw, 'RCL', sub{$rcl = 's'}, $xxx+133, 140); button($mw, 'STO', sub{$sto = 's'}, $xxx+100, 170); button($mw, 'g', 0, $xxx+66, 170, 0, 'db +'); button($mw, 'f', 0, $xxx+33, 170, 0, 'dg +'); button($mw, 'OFF', sub{exit}, $xxx, 170);
That's all I can think of at the moment.  I hope it's helpful.

@ARGV=split//,"/:L"; map{print substr crypt($_,ord pop),2,3}qw"PerlyouC READPIPE provides"