File Opening, Input, Output and Sorting

File Handles open (FILE_HANDLE, “”); Open for reading: open (SONGS, “song_list.txt”); open (SONGS, “song_list.txt”) or die “Can’t open that file! Error is $!”;   Retrieve lines using < > : open (SONGS, “song_list.txt”) or die “Can’t open that file!”; for $line (<SONGS>) { print $line; }   Open for overwriting: open (SONGS, “>song_list.txt”) or die …

How Do You Become An IT Security Expert?

There’s a question I’ve heard many, many times. Writer Michael Kassner wrote a very good article on this subject:;selector-fd-river I’m especially impressed by the last few lines of the article, which basically say: If you don’t love learning, constant and ongoing, you’re not right for this business.

Beginning (X)HTML

Course/Class Number: 58111/46065 Class Title: 58111 (X)HTML: Beginning Resources 1. Getting Started Introductions and announcements IMPORTANT NOTE: Step by step instructions are in boxes. Please perform every step before continuing. Raise your hand and let me know if you have problems with any step! About browsers Example files View page source: Ctrl > U …

Perl String Comparisons and String Replacements

Strings and String Comparisons Be careful which operators you use! Are you assigning, or testing? $answer = “no”;if ($answer == “yes”) {print “Answer is Yes.\n”;} Exercise: do test operatiors make a difference? Test this code: $i = 11;if ($i == “11”) { print “Equivalent numbers.\n”; }if ($i eq “11”) { print “Equivalent strings.\n”; } Getting …

Perl “while” and “until” Loops

while and until $a = 0; while ($a != 3) { $a++; print “Counting upward: now \$a is $a…\n”; } until ($a == 0) { $a–; print “Now we go backward:  $a…\n”; } Resources

Perl “if” Testing

if: Testing a Condition if ($user eq “fred”) {print “Welcome in, Fred.\n”;}elsif ($user eq “joe” || $user eq “jill”){print “Get out, $user\!\n”;}else {print “No Admittance.\n”;} unless ($age > 21 && $smile == “big”) {print “You’re too young for me.\n”;}else {print “How about a date?\n”; } Note the “and” ( && ) and “or” ( || …

Perl Operators

Operators The ever-friendly explanation: A nice introduction to Perl Operators The more formal Perlop re. Operators Compare Perl vs. Shell Operators: