use strict; use warnings; sub f { print "$_[0]\n"; } my @SList = qw(Name Latitude Longitude); foreach my $item (@SList) { f( $item ); }