C:\test>type count.pl #! perl -slw use strict; use 5.010; say for 1 .. 1e6; #### #! perl -slw use strict; use Win32::Process; Win32::Process::Create( my $hProc, '/perl64/bin/perl.exe', 'perl count.pl', 0, 0, '.' ) or die $^E; my $state = 1; while( ) { if( $state ) { $hProc->Suspend(); $state = 0; } else { $hProc->Resume(); $state = 1; } print "\nProcess is ", $state ? 'running' : 'suspended'; }