2009/12/9 John W. Krahn :
> Jeff Pang wrote:
>>
>> Noah:
>>>
>>> sub exiting {
>>> my ($hostname, %login) = @_;
>>
>> Passing arguments like this has no such problem.
>> But you'd better pass the hash as a reference to the subroutine.
>>
>> exitint($hostname, \%login);
>>
>> sub exiting {
>>
John W. Krahn:
Jeff Pang wrote:
Noah:
sub exiting {
my ($hostname, %login) = @_;
Passing arguments like this has no such problem.
But you'd better pass the hash as a reference to the subroutine.
exitint($hostname, \%login);
sub exiting {
my $hostname = shift;
my %login = %{+shi
Jeff Pang wrote:
Noah:
sub exiting {
my ($hostname, %login) = @_;
Passing arguments like this has no such problem.
But you'd better pass the hash as a reference to the subroutine.
exitint($hostname, \%login);
sub exiting {
my $hostname = shift;
my %login = %{+shift};
What is t
Jeff Pang wrote:
> Noah:
>
>>
>> sub exiting {
>> my ($hostname, %login) = @_;
>
> Passing arguments like this has no such problem.
> But you'd better pass the hash as a reference to the subroutine.
...or bundle _all_ parameters into a hashref, which I've found to be
oh so extensible, wi
Noah:
sub exiting {
my ($hostname, %login) = @_;
Passing arguments like this has no such problem.
But you'd better pass the hash as a reference to the subroutine.
exitint($hostname, \%login);
sub exiting {
my $hostname = shift;
my %login = %{+shift};
...
}
print "logi
On 12/8/09 Tue Dec 8, 2009 5:41 PM, "Noah"
scribbled:
>
> Hi there List people,
>
> I am hoping to send a hash and a scalar to a subroutine but the variable
> is not completely being sent. Below is the error message below is
> showing something is not getting passed that well to the subrouti
Hi there List people,
I am hoping to send a hash and a scalar to a subroutine but the variable
is not completely being sent. Below is the error message below is
showing something is not getting passed that well to the subroutine.
Looks like %login is empty.
--- snip ---
$ret{$hostnames[0]