Friday, January 19, 2007

More Perly goodness:

time - my $now = localtime time;
mkdir in Perl - mkdir("newdir", 0755) || die "Cannot mkdir newdir: $!";
chdir
push - Push a value onto an array
Does a file exist? Is it executable? - if (-e $file && -x $file)
File.pm
process management
Getopt::Std - Standard options, like -v. For long options use Getopt::Long
Examples of Getopt
Comparing values
make sure to use "my" in subroutines
Perl Regexp cheat sheet
Perl examples of regexps
String selections in Perl
More regexps in Perl
substr
Perl string functions
Array Manipulation in Perl
Perl arrays
picking up Perl - Arrays
More arrays with Perl - print "the size of the hash: " . keys( %wavelength ) . "\n";
Perl associative arrays - $ages{"The Queen Mother"};# Returns 108