Nice tutorial tin_man. I just wanted to add some basic things into it.
For arrays, you can use the
qw function after the array name if you don't feel like typing all the parenthesis and commas
Ex:
Code:
@stuff = ("book", "table", "lamp");
you could use:
Code:
@stuff = qw(book table lamp);
Same thing goes for hash tables. You could do something like this:
Code:
#!/usr/bin/perl
%days = qw(
Sun Sunday
Mon Monday
Tue Tuesday
Wed Wednesday
Thur Thursday
Fri Friday
Sat Saturday
);
print $days{Sun};
I also believe that I found a mistake in tin_man's tutorial. When you access a hash table via the print statement, you have to use a "{}" instead of "()".
Ex: