Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax question

Status
Not open for further replies.

teser

Technical User
Joined
Mar 6, 2001
Messages
194
Location
US
Please advise what this '.=' is saying in a perl script such as:

while ($line = <$fh>) {$paragraph .= $line; }

What is the '.=' doing between $paragraph and $line??
 
teser,

That is a shortcut used to simplify concatenation. The following two are the same:

$paragraph .= $line;
$paragraph = $paragraph . $line;

They both concatenate $line to the end of $paragraph.

Brandon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top