#!/usr/local/bin/perl use strict; use warnings; Main: { my @param_names = ('elevation','location_type','point_name','position','road_type','road_type_description','vegetation'); categorize_attributes(\@param_names); } sub categorize_attributes { my ($value_ref) = @_; my @value_add = (); @value_add = @{$value_ref} if ref($value_ref) eq 'ARRAY'; if (scalar(@value_add) > 0){ foreach my $value (@value_add){ print "Is $value an attribute (y or n)? "; my $response = ; chomp($response); if ($response =~ /^y$/i){ print "response is $response\n"; print "configure as an attribute\n"; } else { print "response is $response\n"; print "configure as a parser\n"; } } # end foreach $value (@value_add) } }