You can do it by making them arrayrefs:
foreach (@$par) {
....
}
foreach (@$whandicap) {
....
}...or you can reference them:
# --------------------------------------------------------
# lookup course and get par for each hole
&switch_to_courses;
my (%course) = &get_record2('1'); # always berkeley hills = #1
my (@par) = split (/:/, $course{'WPar'});
my (@whandicap) = split (/:/, $course{'WHandicap'});
return(\@par,\@whandicap);
}
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
my ($par,$whandicap) = &get_par_for_course; foreach (@$par) {
....
}
foreach (@$whandicap) {
....
}
Code:
my ($par,$whandicap) = (@$par,@$whandicap)Code:
sub get_par_for_course { # --------------------------------------------------------
# lookup course and get par for each hole
&switch_to_courses;
my (%course) = &get_record2('1'); # always berkeley hills = #1
my (@par) = split (/:/, $course{'WPar'});
my (@whandicap) = split (/:/, $course{'WHandicap'});
return(\@par,\@whandicap);
}
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!