Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks!
I am trying to pass some values to a subroutine but stuck on the array part of it, here is a sample code to show the problem if anyone can help:
I am trying to pass some values to a subroutine but stuck on the array part of it, here is a sample code to show the problem if anyone can help:
Thanks!... errors( all_msgs => \@all_files, msg_subject => 'Error files', mail_msg => 'Listed files for processing:', ); sub errors { my (%args) = @_; my @all_msgs = $args{all_msgs} || ''; my $msg_subject = $args{msg_subject} || ''; my $mail_msg = $args{mail_msg} || ''; ... foreach my $msgs(@all_msgs) { print "$msgs\n"; ... } ... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Passing array into a hash
by toolic (Bishop) on Mar 28, 2013 at 15:20 UTC | |
by Anonymous Monk on Mar 28, 2013 at 15:34 UTC | |
Re: Passing array into a hash
by sundialsvc4 (Abbot) on Mar 28, 2013 at 15:27 UTC |
Back to
Seekers of Perl Wisdom