#!/usr/bin/perl BEGIN { open(STDERR, '>', 'C:/app_name/err.log' or die $!; select STDERR; $| = 1; # un-necessary, I know print STDERR "hello world\n"; } use lib 'C:/app_name'; use strict; use warnings; use My::App; my $app = My::App->new(cfg => 'C:/app_name/app.cfg') or die "Didn't get past this point\n"; print STDERR "Ok, got here\n"; while ($app->run_ok) { print STDERR "Inside while loop\n"; $app->do_things(); $app->rest_for_a_while(); } print STDERR "finishing up now\n";