Thank you!#!/usr/bin/perl use strict; my $uid; my @array = ("one","two","three"); foreach $uid (@array){ print "uid in loop=$uid\n"; # prints each value of $uid as expected &mail($uid); } sub mail { # never prints the value of $uid ? ? print "uid in sub=$uid\n"; }
In reply to Scalar Value Not Available To Subroutine by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |