Add to @INC
You might need to add a path to @INC for Perl on some hosts:
BEGIN{push @INC, "/home/user/perl/usr/lib/perl5/site_perl/5.8.7";}
Favicons
The following will work under any modern browser (IE included):
<link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon" /> <link rel="icon" href="/favicon.ico" type="image/vnd.microsoft.icon" />
linkmust be insidehead/favicon.icois a legacy name and path that older browsers will sniff regardless of the above codetypemay beimage/giforimage/png(but it doesn't work in IE)
- A useful page on the Wikipedia (..SRSLY?)
- Free ICO import/export plugin for Photoshop (works in CS3 Win)
Function arguments in Perl
a.k.a. URGHHH...
The three ways you want to remember are:
If you don't know exactly what's coming, roll it all in a hash:
sub perlFunc { my %args = @_; print $args{what_was_that_again}; return(%args); }Or, if you do know what's coming:
sub otherPerlFunc { my ($what_was_that_again, $oh_yeah, $never_mind) = @_; }And finally, if it's a single parameter you might as well just:
sub oneMorePerlFunc { my $singleValue = shift; }
Command line calculator
echo 2/20 | bc -l
No, really.
