SaveImages @img_sources;
The above will report:
Array found where operator expected
Why can't I omit the ()
here?
'That' can be omitted after a verb of attribution (said, stated, announced, disclosed) She said (that) she was tired. She said she was tired. 'That' cannot not be omitted after a verb of attribution, if the words that follow the verb might be mistaken as objects of the verb. In a defining clause, use that.
We can leave out "where, when or why"or we can use "that" instead in relative clauses. We cannot leave out " where " and "when " and use "that" in adding or connective clauses.
We attach relative clauses to independent clauses using relative pronouns or relative adverbs. There are five relative pronouns—that, which, who, whom, and whose—and three relative adverbs—where, when, and why. Deciding when to use “that” and “which” can be puzzling. “That” refers to things and never refers to people.
Examples of relative pronouns include who, whom, whose, where, when, why, that, which and how.
because your SaveImages subroutine is declared after the call. Parentheses are not necessary if a subroutine is declared before the call.
example:
use strict;
use warnings;
use Data::Dumper;
my @ar = (1, 2);
fn @ar;
sub fn
{
print Dumper \@_;
}
does not work, while
use strict;
use warnings;
use Data::Dumper;
my @ar = (1, 2);
sub fn
{
print Dumper \@_;
}
fn @ar;
works.
This is an expected behavior and is pointed out in the camel book.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With