How To Prevent SSH From Prompting When The Host Is Unknown

Author: , January 26th, 2022

If you are asked “Are you sure you want to continue connecting (yes/no)?” when trying to connect via SSH, then the remote host’s identification key has not yet been stored in your ~/.ssh/known_hosts file. This then requires you to type the full string “yes” in order to proceed because the default value for ssh is […]

How To Enable Variable References in Perl While Using Strict

Author: , August 4th, 2019

I wanted to call a sub-routine based on a variable in Perl, like this:

but it failed because of use strict:

To enable using a variable as a reference, simply specify that to Perl:

How To Declare DOCTYPE And Encoding Using CGI.pm And PERL

Author: , May 31st, 2011

I found myself needing a specific doctype the other day and this is what I found… First, get the correct doctype string from the W3C website list. Then, simply use -dtd to specify it to CGI.pm during the call to start_html:

In addition, use -encoding to specify the character set for XHTML. It defaults […]

How To Use Tie::IxHash In Perl Strict Mode

Author: , October 17th, 2010

The following syntax FAILS: [code] use strict; my %hash; use Tie::IxHash; tie %hash, Tie::IxHash; [/code] The SOLUTION is to wrap the Tie::IxHash declaration in single quotes. Parentheses added for better syntax: [code] tie (%hash, ‘Tie::IxHash’); [/code]