my $messageText = "This is some text\n";
$messageText .= "Add more text here\n";
Is the same as:
my $messageText = "This is some text\n";
$messageText = $messageText . "Add more text here\n";
Update: added brackets to link, fixed typo | [reply] [d/l] [select] |
| [reply] [d/l] [select] |
perlop is only intended to be read after first reading perlintro.
.= appends the string on the right to the contents of the scalar variable on the left.
| [reply] [d/l] |
Thank you all.
Maybe I should have thought it out.
| [reply] |
perlop is only intended to be read after first reading perlintro.
Its funny but, perlop doesn't tell you to read perlintro first :)
| [reply] |
Hi Anaconda,
I would humbly suggest that you try out the stuff. Meaning write a small script that will use .= because thats what I did, and right after that, I tried it with a =. :). It gave me some error, but heck, thats okay. Once you do that, Then, read up the Perl Documentation, or do a google search as that will tell you why that stuff is there. Don't be afraid to try out stuff. Thats the best part of scripting...Have fun buddy :)
I would also sincerely suggest that you look up perl documentation. You'll come across some real eye openers. One of the strengths of this beautiful language, is its awesome documentation. Use it, you'll thank yourself later.
Perlpetually Indebted To PerlMonks
use Learning::Perl;
use Beginning::Perl::Ovid;
print "Awesome Books";
http://dwimperl.com/windows.html is a boon for Windows.
| [reply] [d/l] [select] |