RE: [PBML] Just one more explanation please..
- 1. It is an abbreviation for
$cart_content = $cart_content . "Subtotal: " .
&display_price($total_cost) . "\n";
A common operation is to modify an existing variable relative to itself. So
rather than coding
$variable = $variable <operator> <some expression>;
You can code
$variable <operator>= <some expression>;
$a = $a + 3; is equivalent to $a += 3;
$b = $b * 2; is equivalent to $b *= 2;
$c = $c . "Hello"; is equivalent to $c .= "hello";
and so on.
2. "No reference?" Your system should have the on-line Perl documentation
set that came with the installation. All installations I have seen set up a
"perldoc" command (or something very similar) that accesses the on-line Perl
documentation. Check the Perl installation instructions if necessary.
"perldoc perl" to get a list of the verious Perl manual sections
"perldoc perlop" covers Perl operators and precedence.
Search for "Assignment Operators".
The ActiveState installation for Windows, Linux and Solaris comes with the
on-line Perl documentation set in HTML format. You can also go to
www.activestate.com and find the ActivePerl on-line Perl documentation set
on the Internet.
> -----Original Message-----
> From: Franki [mailto:frankieh@...]
> Sent: Saturday, January 27, 2001 11:37 AM
> To: firstname.lastname@example.org
> Subject: [PBML] Just one more explanation please..
> $cart_content .= "Subtotal: " .
> &display_price($total_cost) . "\n";
> in this line here, I notice its using ".="
> what does that mean?
> I know that's a really dumb question,
> I read a tute ages ago that answered that but I can't remember...
> I am waiting for my perl books to arrive and as such I have
> no reference and
> can't find an explanation on the net.
> Many thanks...
> Frank Hauptle