سؤال

Assuming I have the following:

my @net = (`echo "HELLO" > file`,
           `less file`);

is it guaranteed that the order of execution is from 0..N (the first element in the array is executed first, then the second,etc..)?

I've tested this, and this is what really happens, but can I count on that?

thanks,

هل كانت مفيدة؟

المحلول

Yes. Each of the comma-separated items in your brackets () on the right-hand side are terms. These have the highest precedence in Perl, and evaluate left-to-right. Backticks are quote-like operators.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top