Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Scalar Value Not Available To Subroutine
by BrowserUk (Patriarch) on Dec 20, 2012 at 17:23 UTC | |
by tobyink (Canon) on Dec 20, 2012 at 17:42 UTC | |
by BrowserUk (Patriarch) on Dec 20, 2012 at 18:04 UTC | |
by ikegami (Patriarch) on Dec 21, 2012 at 05:41 UTC | |
by LanX (Saint) on Dec 20, 2012 at 19:06 UTC | |
by ikegami (Patriarch) on Dec 21, 2012 at 05:38 UTC | |
|
Re: Scalar Value Not Available To Subroutine
by LanX (Saint) on Dec 20, 2012 at 16:40 UTC | |
|
Re: Scalar Value Not Available To Subroutine
by tobyink (Canon) on Dec 20, 2012 at 17:13 UTC |