foreach (@_) { # use $_ here } #### foreach my $some_path (@$path_list) { # etc }