#!/usr/bin/perl use strict; use warnings; my $c = 0; while (<>) {    if ($. == 1 and m~^#!~) {        s~^#!.*?perl~~;    }    $c += () = m~(\S)~g; } print $c, "\n";