App-Cheats

 view release on metacpan or  search on metacpan

cheats.txt  view on Meta::CPAN

## Perl Modules - Time::Seconds
#############################################################

# Date arithmetic in Javascript (add 90 days to a date)
# Time::Seconds imports ONE_DAY
perl -MTime::Seconds -MTime::Piece -le "$now=localtime; $now+=$now->tzoffset; $now += ONE_DAY * 90; print $now->strftime('%Y-%m-%d')"

# Subtract days.
perl -MPOSIX -le   '
    @t = localtime; $t[3] -= 1299;
    print scalar localtime mktime @t
'

# Seconds to HMS (hhmmss)
use Time::Seconds;
my $time = Time::Seconds->new(time - $time0)->pretty;
#
perl -MTime::Seconds -E 'say Time::Seconds->new(time)->pretty;'
# 18845 days, 18 hours, 4 minutes, 21 seconds


#############################################################
## Perl Modules - Tk (General)
#############################################################

# Create a simple Tk window
perl -MTk -le '$mw=MainWindow->new; $mw->title("Hello"); $mw->Button(-text => "Done", -command => sub{exit})->pack; MainLoop'

# Create a simple grid window
perl -MTk -le '$m=MainWindow->new; $m->Button->grid($m->Button,$m->Button); $m->Button->grid($m->Button,$m->Button); MainLoop'

# Create a simple grid window with last button spanning several columns
perl -MTk -le '$m=MainWindow->new; $m->Button->grid($m->Button,$m->Button); $m->Button->grid($m->Button,"-", -sticky => "nsew"); MainLoop'

# Create a simple grid window with last button spanning several rows
perl -MTk -le '$m=MainWindow->new; $m->Button->grid($m->Button,$m->Button, -sticky => "nsew"); $m->Button->grid($m->Button,"^"); MainLoop'

# Create a simple grid window with last button removed/ignored/skipped
perl -MTk -le '$m=MainWindow->new; $m->Button->grid($m->Button,$m->Button); $m->Button->grid("x",$m->Button, -sticky => "nsew"); MainLoop'

# Have a button to disable another button
perl -MData::Dumper -MTk -wle '
   $mw     = MainWindow->new;
   $exit_b = $mw->Button(-text => "exit", -command => sub{exit})->pack(-ipadx => 20, -ipady => 10);
   $text   = "Disable Exit";
   $mw->Button(-textvariable => \$text, -command => sub{
      if( ($exit_b->configure(-state))[-1] eq "disabled" ){
         $exit_b->configure(-state => "normal");
         $text = "Disable Exit";
      }
      else{
         $exit_b->configure(-state => "disabled");
         $text = "Enable Exit";
      }
   })->pack;
   MainLoop;
'

# TODO: Check if Unigraph is perl tk

# Create Menu Buttons (PTk,bind method)
perl -MTk -le '$mw=MainWindow->new; $mw->Button(-text => "Exit", -command => sub{exit})->pack(-side => "bottom", -fill => "both", -expand => 1); $f=$mw->Frame(-relief => "ridge", -borderwidth => 2)->pack(-side => "top", -expand => 1, -fill => "both")...

# Perk Tk Event Types (PTk,bind method)
ButtonPress (or Button)
ButtonRelease
Circulate
Colormap
Configure
Destroy
Enter
Expose
FocusIn
FocusOut
Gravity
KeyPress (or Key)
KeyRelease
Leave
Map
Motion
Reparent
Unmap
Visibility

# Perl Tk Event Info Usage program
perl -MTk -le '$mw=MainWindow->new; $b=$mw->Button->pack(-ipadx => 60); $b->bind("<Key>", [sub{print "ARGV: @_[1..$#_]"}, Ev("k"), Ev("K"), Ev("N"), Ev("T")]); MainLoop'

# Perl Tk Event Info (PTk,bin methods,Ev)
#
# Coordinates (relative to window)
Ev('x')
Ev('y')
#
# Coordinates (relative to root of window)
Ev('X')
Ev('Y')
#
# Button Number (of mouse click)
Ev('b')
#
# Size of widget
Ev('h')     # height
Ev('w')     # width
#
# Keyboard Info
Ev('k')     # Physical Key Value  37   37
Ev('K')     # Letter              A    a
Ev("N")     # Decimal             65   97
#
# Event Type
Ev('T')     # KeyPress

# Perl Tk Event Info (PTk,bin methods,Ev)
# Stop events in callback.
return      # Exits only current sub
Tk::break   # Stops all callbacks for an event

# View order of bindings for a widget (PTk,bin methods,Ev)
print for $b->bindtags
print "$_: ", $b->bind($_) for $b->bindtags

# Order order of bindings for a widget (PTk,bin methods,Ev)

cheats.txt  view on Meta::CPAN

# Add tab completion to an entry widget
perl -MTk -le '$mw=MainWindow->new; $e=$mw->Entry(-textvariable => \$t)->pack; $e->focus; $e->bind("<Tab>", sub{@a=glob "$t*"; $t=shift @a if @a; $e->selectionClear}); MainLoop'

# Bind Enter/Carriage Return key (PTk)
$e->bind("<Return>"

# Swap button (PTk)
perl -MTk -le '$mw=MainWindow->new; for(1..3){my $b=$mw->Button(-text => "B$_", -width => 20)->pack; $b->configure(-command => sub{ ($n)=grep{$b[$_] eq $b}0..$#b; return unless $n > 0; @b[$n,$n-1]=@b[$n-1,$n]; $_->packForget for @b; $_->pack for @b})...

# Drag and swap buttons (PTk)
perl -MTk -le '$mw=MainWindow->new; my @b; sub id{my($n)=grep{$b[$_] eq $_[0]}0..$#b; $n} for(1..3){push @b, $mw->Button(-text => "B$_", -width => 20)->pack} $mw->bind("<ButtonRelease-1>",[sub{$m=id(shift); $n=id($mw->containing(@_)); @b[$m,$n]=@b[$n...

# Swap frames of buttons (PTk)
perl -MTk -le '$mw=MainWindow->new; my @b; sub id{my($n)=grep{$b[$_] eq $_[0]}0..$#b; $n} for my $fi(1..3){my $f=$mw->Frame->pack; push @b,$f; $f->Button(-text => "Btn - $fi - $_", -width => 20)->pack(-side => "left") for 1..3} $mw->bind("<ButtonRele...

# Notebook example 1. multiple pages/tabs (PTk)
perl -MTk -MTk::NoteBook -le '$nb=MainWindow->new->NoteBook->pack(-fill => "both", -expand => 1); @pgs = map { $nb->add("page$_", -label => "Page $_") } 0..5; $pgs[0]->Button(-text => "Button $_")->pack(-fill => "both") for 1..5; $pgs[1]->Label(-text...

# Notebook example 2. multiple pages/tabs (PTk)
# Command when clicking a page/tab
perl -MTk -MTk::NoteBook -le '$nb=MainWindow->new->NoteBook(-font => "Courier 14 bold")->pack(-fill => "both", -expand => 1); @pgs = map { $nb->add("page$_", -label => "Page $_") } 0..20; $pgs[0]->Button(-text => "Button $_")->pack(-fill => "both") f...

# Notebook example 3. multiple pages/tabs (PTk)
# Page deletion
perl -MTk -MTk::NoteBook -le '$nb=MainWindow->new->NoteBook->pack(-fill => "both", -expand => 1); @pgs = map { $nb->add("page$_", -label => "Page $_") } 0..10; $nb->pagecget("page0", "-state"); $pgs[0]->Button(-text => "Button $_")->pack(-fill => "bo...

# Notebook example 4. multiple pages/tabs (PTk)
# Get page by name
perl -MTk -MTk::NoteBook -le '$nb=MainWindow->new->NoteBook->pack(-fill => "both", -expand => 1); @pgs = map { $nb->add("page$_", -label => "Page $_") } 0..10; $nb->pagecget("page0", "-state"); $pgs[0]->Button(-text => "Button $_")->pack(-fill => "bo...

# Notebook example 5. multiple pages/tabs (PTk)
# 2 rows
perl -MTk -MTk::NoteBook -le '$nb=MainWindow->new->NoteBook->pack(-fill => "both", -expand => 1); $nb->add("page0$_", -label => "Page $_") for 1..5; map { my $nb = $_; $nb->add("page1$_", -label => "Page $_") for 6..10;   } map $_->NoteBook->pack, ma...

# Notebook example 6. multiple pages/tabs (PTk)
perl -MTk -MTk::NoteBook -le '$nb=MainWindow->new->NoteBook->pack; $nb->add("page0$_", -label => "Page $_") for 1..5; @pgs = map $nb->page_widget($_), $nb->pages; ($p,@rest)=@pgs; $nb1=$p->NoteBook->pack; $nb1->add("page1$_", -label => "Page $_") for...

# Entry widget validation options (PTk)
perl -MTk -le 'MainWindow->new->Entry(-validate => "key", -validatecommand => sub{$_[1] =~ /\d/}, -invalidcommand => sub{ print "ERROR" })->pack->focus; MainLoop'

# Making Scrollbars (PTk)
# When text widget is scrolled its "-yscrollcommand" command is invoked. This calls $s->set(...)
# When the scrollbar is clicked on "-command" is invoked which calls $t->yview(...)
perl -MTk -le '$mw=MainWindow->new; $s=$mw->Scrollbar; $t=$mw->Text(-yscrollcommand => ["set" => $s]); $s->configure(-command => ["yview" => $t]); $s->pack(-side => "right", -fill => "y"); $t->pack(-fill => "both"); MainLoop'

# Scale widget example (PTk)
perl -MTk -le 'MainWindow->new->Scale(-from => 1, -to => 5, -tickinterval => 1, -showvalue => 0)->pack; MainLoop'

# Balloon widget example (PTk)
perl -MTk -MTk::Balloon -le '$mw=MainWindow->new; $b=$mw->Button(-text => "DO NOTHING")->pack; $mw->Balloon->attach($b, -msg => "button"); MainLoop'

# Balloon widget example (PTk)
perl -MTk -le '$w=tkinit; $bt=$w->Button(-text => "this does nothing")->pack; $w->Balloon->attach($bt, -msg => "really nothing"); MainLoop'

# Listbox example (PTk)
perl -MTk -le '$w=MainWindow->new; $lb=$w->Scrolled("Listbox", -scrollbars => "osoe")->pack; $lb->insert(0,1..10); $w->Button(-text => "SHOW", -command => sub{@s=$lb->curselection; print $lb->get(@s) if @s})->pack; MainLoop'

# Handle clicking the "X" button on a window to close (PTk)
perl -MTk -le '$w=MainWindow->new; sub e{print "safe exit"; $w->destroy} $w->protocol("WM_DELETE_WINDOW", \&e); $w->Button(-text => "EXIT", -command => \&e)->pack; MainLoop'

# Menu(bar) example (PTk)
perl -MTk -le '$w=MainWindow->new; $m=$w->Menu; $w->configure(-menu => $m); %h=map{$_ => $m->cascade(-label => "~$_")} qw/File Edit Help/; $h{File}->command(-label => "Exit", -command => sub{exit}); MainLoop'

# Menu(bar) example using -menuitems (PTk)
perl -MTk -le '$w=MainWindow->new; $m=$w->Menu; $w->configure(-menu => $m); %h=map{$_ => $m->cascade(-label => "~$_", -menuitems => [[checkbutton => "MY_CHECK"],[command => "MY_CMD", -command => sub{print "exit"}, -accelerator => "Ctrl-o"],[radiobutt...

# Simple Menu(bar) example using -menuitems (PTk)
perl -MTk -le '$w=MainWindow->new; $m=$w->Menu; $w->configure(-menu => $m); $m->cascade(-label => "~File", -menuitems => [[command => "new", -accelerator => "Ctrl-n"],"",[command => "Open", -accelerator => "Ctrl-o"]]); MainLoop'

# Simple 2 Menu(bar) example using -menuitems (PTk)
perl -MTk -le '$w=MainWindow->new; $m=$w->Menu; $w->configure(-menu => $m); $m->cascade(-label => "~File", -menuitems => [[cascade => "new", -accelerator => "Ctrl-n", -menuitems => [map [command => $_],qw/PNG JPEG TIFF/], -tearoff => 0],"",[command =...

# Color changing menu(bar) (PTk)
perl -MTk -le '$color="$red"; $w=MainWindow->new; $mi=[[cascade => "~Edit", -menuitems => [[cascade => "~Background", -menuitems => [map [radiobutton => $_, -variable => \$color, -command => [sub{my $c=shift; $w->configure(-background => $c); print "...

# Very primitive notebook (poor man's notebook) (PTk)
perl -MTk -le '$w=MainWindow->new; ($top,$bot)=map{$w->Frame->pack} 1..2; @b=map { $top->Button(-text => "B$_", -command => [sub{print shift}, $_])->pack(-side => "left") } 1..3; @f=map{$bot->Frame} 1..3; $f[0]->pack; $f[0]->Label(-text => "L1")->pac...

# Wait until variable is changes. Other button can still be pressed though. (PTk)
perl -MTk -le '$w=MainWindow->new; $w->Entry(-width => 20, -textvariable => \$t)->pack; $w->Button(-text => "PRINT", -command => sub{print "ABC"})->pack; $w->Button(-text => "PAUSE", -command => sub{$w->waitVariable(\$t); print "DONE"})->pack; MainLo...

# Simple composite Mega-Widget based on a Toplevel (PTk)
perl -MTk -le '{package Tk::My; use base "Tk::Toplevel"; Construct Tk::Widget "My" } $w=MainWindow->new; $w->My; MainLoop'

# Define own bitmap
perl -MTk -le '$w=MainWindow->new; $p=pack("b5"x5,"..1..",".111.","11111",".111.","..1.."); $bm=$w->DefineBitmap(up => 5,5,$p); $w->Button(-width => 10, -height => 30, -bitmap => "up")->pack; MainLoop'

# Define own bitmap (fansy)
cat star.bm
..............................
..............................
..............................
..............1...............
..............1...............
.............111..............
.............111..............
............1.1.1.............
.......11...1.1.1...11........
.......11..1..1..1..11........
.........1.1..1..1.1..........
..........1...1...1...........
.........1.1..1..1.11.........
.......11...1.1.1....11.......
.....11......111.......11.....
...111111111111111111111111...
.....11......111.......11.....
.......11...1.1.1....11.......
.........1.1..1..1.11.........
..........1...1...1...........
.........1.11.1.11.1..........
.......11...1.1.1...11........
.......11...1.1.1...11........
.............111..............
.............111..............
..............1...............
..............1...............
..............................
..............................
..............................
perl -MTk -le '$w=MainWindow->new; $s=30; $p=pack("b$s"x$s,`cat start.bm`); $w->DefineBitmap(start => $s,$s,$p); $w->Button(-bitmap => "start")->pack; MainLoop'

# DirTree example (PTk)
perl -MTk -le 'MainWindow->new->Scrolled("DirTree")->pack(qw/-fill both -expand 1/); MainLoop'

# LabEntry example (PTk,label and entry in one)
perl -MTk -le 'tkinit->LabEntry(-label => "name", -textvariable => \$name, -labelPack => [qw/ -side left /], -width => 20)->pack; MainLoop'

# Clicking a button will send it to the top. Cycle through
perl -MTk -le '$w=tkinit; @b=map{$w->Button(-text => $_)->pack} a..c; $_->configure(-command => sub{$b[-1]->pack(-before => $b[0]); unshift @b, pop @b }) for @b; MainLoop'

# Show or hide widgets based on a checkbutton (advanced options)
perl -MTk -le '$w=tkinit; $b=$w->Button->pack(qw/ -side bottom /); $p=1; $w->Checkbutton(-text => "Pack", -variable => \$p, -command => sub{ if($p){ $i=$b->{packInfo}; $b->pack(@$i) } else { $b->{packInfo} = [$b->packInfo]; $b->packForget }  })->pack...

# Sleep/Wait (PTk)

cheats.txt  view on Meta::CPAN


#############################################################
## Perl Modules - Tk (Appendix B)
#############################################################

# Adjuster example (PTk,Appendix B)
perl -MTk -le '$w=tkinit; %def=qw/-fill both -expand 1/; $b=$w->Button(-text => "Button A")->pack(%def); $w->Adjuster(-side => "top", -widget => $b)->pack(qw/-fill x/); $w->Button(-text => "Button B")->pack(%def); MainLoop'

# Balloon Example (Ptk,Appendix B)
perl -MTk -le '$w=tkinit; $btn=$w->Button(-text => "Button A")->pack; $bl=$w->Balloon; $bl->attach($btn, -msg => "click me"); MainLoop'

# Bitmap Example (Ptk,Appendix B)

# BrowseEntry Example (Ptk,Appendix B)
#
# Simple
perl -MTk -MTk::BrowseEntry -le 'tkinit->BrowseEntry(-label => "label", -variable => \$v, -choices => [1..10], -browsecmd => sub{print "Clicked $v"})->pack; MainLoop'
#
# Insert additional values
perl -MTk -MTk::BrowseEntry -le '$b=tkinit->BrowseEntry(-label => "label", -variable => \$v, -choices => [1..10], -browsecmd => sub{print "Clicked $v"})->pack; $b->insert("end",20,30); MainLoop'

# Button Example (Ptk,Appendix B)

# Canvas Example (Ptk,Appendix B)
#
# Simple useless canvas
perl -MTk -le '$c=tkinit->Scrolled("Canvas")->pack; MainLoop'
#
# Click in canvas window will show x,y coordinates
perl -MTk -le 'sub print_xy { my($c,$x,$y)=@_; print "(x,y) = @{[ $c->canvasx($x) ]}, @{[ $c->canvasy($y) ]} "   } $c=tkinit->Scrolled("Canvas")->pack; $c->Subwidget("canvas")->CanvasBind("<Button-1>", [ \&print_xy, Ev("x"), Ev("y") ]); MainLoop'

# ColorEditor Example (Ptk,Appendix B)

# Dialog Example (Ptk,Appendix B)

# DirTree Example (Ptk,Appendix B)

# Entry Example (Ptk,Appendix B)

# ErrorDialog Example (Ptk,Appendix B)

# FileSelect Example (Ptk,Appendix B)

# Frame Example (Ptk,Appendix B)

# HList Example (Ptk,Appendix B)
perl -MTk -MTk::HList -le '$h=tkinit->HList(-indent => 20)->pack; $h->add(qw/A -text a/); $h->add(qw/A.B -text a->b/); MainLoop'

# Label Example (Ptk,Appendix B)

# LabEntry Example (Ptk,Appendix B)
# Learn how to use Text indices (demo)
perl -MTk -le '%def=qw/-side left/; $mw=tkinit; $t=$mw->Text->pack; ($i,$d)=map{my $v; $mw->LabEntry(-label => "$_:", -textvariable => \$v, -labelPack => [%def])->pack(%def); \$v} qw/Index Data/; $mw->Button(-text => "INSERT", -command => sub{$t->ins...

# LabFrame Example (Ptk,Appendix B)

# ListBox Example (Ptk,Appendix B)

# MainWindow Example (Ptk,Appendix B)

# Menu Example (Ptk,Appendix B)

# MenuButton Example (Ptk,Appendix B)

# Message Example (Ptk,Appendix B)

# NoteBook Example (Ptk,Appendix B)

# Optionmenu Example (Ptk,Appendix B)

# Pane Example (Ptk,Appendix B)

# Photo Example (Ptk,Appendix B)

# ProgressBar Example (Ptk,Appendix B)

# Radiobutton Example (Ptk,Appendix B)

# ROText Example (Ptk,Appendix B)

# Scale Example (Ptk,Appendix B)

# Table Example (Ptk,Appendix B)

# Text Example (Ptk,Appendix B)

# TextUndo Example (Ptk,Appendix B)

# Tiler Example (Ptk,Appendix B)

# TList Example (Ptk,Appendix B)

# TopLevel Example (Ptk,Appendix B)

# Tree Example (Ptk,Appendix B)


#############################################################
## Perl Modules - Tk::TextString, Tk::TextStrings
#############################################################

# Tie Text widget to store input as an entry or label would in "-variable" (PTk)
perl -MTk -le '{package P; sub TIESCALAR{my($c,$o)=@_; bless \$o,$c} sub FETCH{my($s)=@_; $$s->get("1.0", "end")} sub STORE{my($s,$v)=@_; $$s->delete("1.0", "end"); $$s->insert("end", $v)} } $mw=MainWindow->new; $t=$mw->Text->pack; tie $v, "P", $t; $...

# Tie Text widget to -variable. Set value with button or entry (PTk)
perl -MTk -le '{package P; sub TIESCALAR{my($c,$o)=@_; bless \$o,$c} sub FETCH{my($s)=@_; $$s->get("1.0", "end")} sub STORE{my($s,$v)=@_; $$s->delete("1.0", "end"); $$s->insert("end", $v)} } $mw=MainWindow->new; $t=$mw->Text->pack; tie $v, "P", $t; $...

# Example of new TextString Mega-Widget (PTk,tie,user module)
perl -MTk -MTk::TextString -w -le '$mw=MainWindow->new; $mw->TextString(-variable => \$v)->pack; $mw->Entry(-textvariable => \$v)->pack(-side => "left"); $mw->Button(-command => sub{print "[$v]"})->pack(-side => "left"); MainLoop'

# Scolled multiple text boxes through multiple -variables (PTk,tie,user module)
perl -MTk -MTk::TextString -w -le '%d=qw(-side left); $mw=MainWindow->new; @f=map{$mw->Frame->pack} 1..3; @t=map{my $v; $f[0]->TextString(-height => 2, -variable => \$v)->pack(%d); \$v} @f; $f[1]->Entry(-textvariable => $_)->pack(%d) for @t; $f[2]->B...

# Scolled multiple text boxes through single -variable (PTk,tie,user module)
perl -MTk -MTk::TextStrings -w -le '%d=qw(-side left); $mw=MainWindow->new; @f=map{$mw->Frame->pack} 1..3; @t=map{$f[0]->TextStrings(-height => 2, -variable => \$v)->pack(%d); \$v} @f; $f[1]->Entry(-textvariable => $_)->pack(%d) for @t; $f[2]->Button...

# Can text widget and entry widget are synced (PTk, tie,user module)
perl -MTk -MTk::TextStrings -le '$mw=MainWindow->new; $mw->TextStrings(-height => 2, -variable => \$v)->pack; $mw->Entry(-textvariable => \$v)->pack; MainLoop'


#############################################################
## Perl Modules - Try::Tiny
#############################################################

cheats.txt  view on Meta::CPAN

# Hide option (undo the change):
	- rename the DWORD from from ShowBasedOnVelocityId to HideBasedOnVelocityId


#############################################################
## Windows - Variables
#############################################################

# Get windows script directory (DOS,pwd,windows vars)
echo %~dp0

# Start in currect script directory (windows vars)
cd /d %~dp0


#############################################################
## Windows Commands - ipconfig
#############################################################

# Internet not working on Windows
# Disable all adapters, but Ethernet 2.
# Then:
ipconfig /renew
ipconfig /release
# Enable the adapters again.


#############################################################
## Windows Commands - net
#############################################################

# See which folders are being shared on windows 10
net share


#############################################################
## Windows Commands - netstat
#############################################################

# Special Addresses
netstat -ano -p tcp | findstr 8080
# Address 0.0.0.0   allows access by another machine.
# Address 127.0.0.1 allows faking a server by using the loopback adapter.


#############################################################
## Windows Commands - putty
#############################################################

# Launch all benches and watch the date (Putty,xterm)
#
# @REM='
# @echo off
# mode CON: COLS=120 LINES=30
#
# set file=H:/kog.dat
# perl -lE "$f='%file%'; -e $f and exit; print qq(Enter your password: ); chomp($p=<STDIN>); open FH, qq(>$f); print FH $p; system qq(attrib +h $f) "
# set /P pass=< %file%
#
# echo Opening Exceed
# start /B "Exceed" "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Open Text Exceed 14 x64\Exceed.lnk"
#
# echo Opening Putty
# perl -x -l -S "%0" "%pass%"
# echo Everything is opened. Close this Window.
# exit /b
# ';
#
#
# #!perl
#
# #-----------------------------------------------------
# # SUBS
# #-----------------------------------------------------
#
# sub make_file {
# 	my ($n,$x,$y) = @_;
# 	my $file = "run$n.txt";
# 	open FH, ">", $file or die $!;
# 	print FH q(echo -e '\e[8;1;30t');		# Size
# 	print FH "echo -e '\\e[3;$x;${y}t'";	# Placement
# 	print FH "/home3/timp/watchdate";
# 	close FH;
# 	$file;
# }
#
# sub make_cmd {
# 	my ($user,$_,$pass,$file) = @_;
# 	my $cmd = qq(start "Putty" "$ENV{PWPROD}\\wnt\\putty\\putty.exe" -X -ssh $user\@lnxbr$_ -pw $pass -m "$file" -t&);
# 	$cmd;
# }
#
#
# my ($pass) = @ARGV;
#
#
# #-----------------------------------------------------
# # new
# #-----------------------------------------------------
# my @benches = grep { not / 40 | 49 /x  } 21..70;
# my $COLS    = 3;
# my $ROWS    = @benches / $COLS;
# my $Xoffset = 300;
# my $x       = $Xoffset;
# my $y       = 0;
# my $height  = 50;
# my $width   = 270;
# my $cnt     = 0;
# my $y2;
# my $user    = "timp";
#
# $ROWS++ if $ROWS > int($ROWS);
#
# for(@benches){
# 	my $file = make_file($_,$x,$y);
# 	my $cmd  = make_cmd($user,$_,$pass,$file);
# 	# print  $cmd;
# 	system $cmd;
#
# 	$y += $height;
# 	$cnt++;



( run in 0.699 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )