Hi there Monks!
I need to add the keys and values from the "$added" array of hashes to the sub routine "sent".
It gives a syntax error near "for ". How can it be done if anyone think it can?
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',
});
}
Thanks for the Help!