chris01010
Programmer
Hi,
I have a sub function called pressEnter within my perl menu script which basically means that the script will await an interaction from the user before moving on.
Unfortunately when the script goes into pressEnter it just hangs (even if you press enter!!).
Any ideas on what could be causing this?
I've included another sub function so you can see how it is called.
I have a sub function called pressEnter within my perl menu script which basically means that the script will await an interaction from the user before moving on.
Unfortunately when the script goes into pressEnter it just hangs (even if you press enter!!).
Any ideas on what could be causing this?
Code:
sub checkJob
{
system('clear');
print "The current Job Status is:\n\n";
`./scriptlist.ksh 2`;
open OUTPUT, "./output";
undef $/;
$_ = <OUTPUT>;
($var) = m/^(INTE.*PM)$/sm;
print "$var\n\n";
close OUTPUT;
pressEnter();
}
sub pressEnter
{
print "Press Return to continue\n\n";
$dummy = <>;
mainMenu();
}
I've included another sub function so you can see how it is called.