Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Jan 162010
 

Playing with qw() function in Perl

Answer:

The qw (quote word) function is very useful to generate a list of words.

E.g.

my @names = ('peter', 'john', 'mark');

print @names;

my @names2 = qw(peter john mark);

print @names2;

As you can see above, the use of qw() made the code more readable.

Jan 152010
 

How to enable Server Side Includes (SSI) ?

Answer:

Pick either one of the following method and add the following lines to Apache configuration (httpd.conf).

1. Enable SSI on files with extension .shtml

AddType text/html .shtml
AddHandler server-parsed .shtml

2. Enable SSI on files if they have the user-execute bit set

XBitHack on

Reference: http://httpd.apache.org/docs/1.3/mod/mod_include.html