Perl Programming Perl: More on Data Types and Operators |
Unfortunately, you also had that lubber Orlando Bloom blocking your path to that hottie Kiera Knightley. Not to mention a giant squid-faced pirate hot on your trail. Well never ye fear land lubber. The good Cap'n is back and he'll set ye sailin' in the right direction as sure as Ben Affleck can't act. Yo Ho Ho and a Bottle of Data We left off with Lists, and that's where we will start up again. In our first example, we are going to learn how to pass a variable into a list. #!/usr/local/bin/perl $add_this = 1 @my_value = {$add_this 'Dollar ', 'Is ', 'All ', 'I ', 'Own '}; print @my_value This would print out: 1 Dollar Is All I Own You will notice that I have a space after each value when I assign them. If I didn't, the text would all run to together.
blog comments powered by Disqus |