Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks for the Help!use strict; use warnings; my $added = [ { link => "/var/www/docs", name => "mydocs", }, { link => "/var/www/read", name => "letters", } ]; my @keys = qw( link name ); my $success; foreach my $send_to(@send) { $success = sent( { to => 'send_to', account => 'to_account', name => 'name', subject => 'subject', title => 'title', for my $hash (@$added) { for my $key (@keys) { $key => $hash->{$key}, } } type => 'docs', }); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Add values to subroutine inside of a loop.
by AnomalousMonk (Archbishop) on Jul 02, 2018 at 16:11 UTC | |
by Anonymous Monk on Jul 02, 2018 at 18:28 UTC | |
by haukex (Archbishop) on Jul 02, 2018 at 18:41 UTC | |
|
Re: Add values to subroutine inside of a loop.
by hippo (Archbishop) on Jul 02, 2018 at 16:06 UTC | |
|
Re: Add values to subroutine inside of a loop.
by Anonymous Monk on Jul 04, 2018 at 02:55 UTC |