$a *= $b means the same thing as $a = $a * $b.
On Sun, 02 Jan 2011 19:00:05 -0500, J. S. John
wrote:
Hi all, I'm new to Perl. The only other language I know is
Matlab/Octave and I'm still working my way around Linux. I am using
Shlomi Fish's tutorial on perl until I get the llama book. I'm
> "JSJ" == J S John writes:
JSJ> Hi all, I'm new to Perl. The only other language I know is
JSJ> Matlab/Octave and I'm still working my way around Linux. I am using
JSJ> Shlomi Fish's tutorial on perl until I get the llama book. I'm stuck
JSJ> on section [4.1. "+=" and friends ] [1].
On 11-01-02 07:07 PM, Sheppy R wrote:
Sorry, forgot to reply-to-all again:(
$a *= 2;
Basically translates to this:
$a = $a * 2;
just like
$b += 1;
translates to:
$b = $b + 1;
This is true of almost every binary operator. Some of the weird ones:
$x ||= 0; # if $x is zero, undef, or an
Sorry, forgot to reply-to-all again :(
$a *= 2;
Basically translates to this:
$a = $a * 2;
just like
$b += 1;
translates to:
$b = $b + 1;
On Sun, Jan 2, 2011 at 7:00 PM, J. S. John wrote:
> Hi all, I'm new to Perl. The only other language I know is
> Matlab/Octave and I'm still working my
That means: $a = $a * 2
i.e take the existing value of $a, multiply it with 2 and reassign it to $a
Cheers,
Parag
On Sun, Jan 2, 2011 at 4:00 PM, J. S. John wrote:
> Hi all, I'm new to Perl. The only other language I know is
> Matlab/Octave and I'm still working my way around Linux. I am usi
Hi all, I'm new to Perl. The only other language I know is
Matlab/Octave and I'm still working my way around Linux. I am using
Shlomi Fish's tutorial on perl until I get the llama book. I'm stuck
on section [4.1. "+=" and friends ] [1]. I don't really understand the
part "$a *= 2; $b += 1;" What is