> 
> > 2) 'blah.css' contains only the CSS specs, nothing else.  Is that as it
> > should be?
> 
> Yes
> 

Well -- or not :)

Just as we can use Perl to produce valid HTML, we can use Perl to
produce valid CSS.  I use it often to produce dynamic CSS based on
User-Agent to work around gross deficiencies in some browsers (*cough*,
Internet Explorer, *cough*).

However, if you wish to do that - and more power if you do - you are
going to have to produce valid output:

........................... BEGIN PERL PROGRAM .........................
#!/usr/bin/perl
# file /usr/local/apache/cgi-bin/style.css mode 755 

use strict;
use warnings; 
use CGI;
our $query = new CGI; 
print $query->header('text/css'); 

print <<'EOF'
BODY { background: url("/images/ruff.jpg");  font-family: "Helvetica", sans;  }
TABLE { margin: auto; border-collapse: collapse; font-weight: bold; border: 
double 3px;  border-color: black;  } 
TR { border: double 3px;} 
TD { border: solid 1px; } 
TD.category { text-align: center; font-size: 120%;  }
TD.red { color: red; border-color: black;  } 
EOF
    ;

............................ END PERL PROGRAM ..........................


Doing soemthing useful is left as an exercise to the reader ;>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
        Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
sort them into the correct order.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to