TheDauntless
Programmer
Hey,
I keep getting this error with the following code:
Why do I keep getting this error? I'm now getting it at the first 5 lines of 'listenForMenuChoice'.
It probably has something to do with variable scope, but I've been googling for a few hours now and I can't find a descent explanation....
All help is appreciated!
I keep getting this error with the following code:
Code:
#!/usr/bin/perl -w
use strict;
sub mainMenu
{
print "Kies een optie (1-7)\n";
&listenForMenuChoice;
}
sub listenForMenuChoice
{
local($choice);
$choice = <>;
chop $choice;
use Switch;
switch ($choice)
{
case "1"
{
$status = 1;
&startNewOrder;
}
case "1"
{
$status = 1;
&startNewOrder;
}
}
}
# de huidige status waar de klant in zit (komt overeen met menu opties)
global $status = undef;
Why do I keep getting this error? I'm now getting it at the first 5 lines of 'listenForMenuChoice'.
It probably has something to do with variable scope, but I've been googling for a few hours now and I can't find a descent explanation....
All help is appreciated!