Will someone be kind enough to explain the technicalities behind the following scalar assignment ?
my $scalar = grep /\d+/ `some command`;
sets $scalar to 0 or 1 depending on whether grep was successful in matching the regexp or not.
my ($scalar) = grep /\d+/ `some command`;
Sets $scalar to the output of grep. Why so ?
Thanks much in advance