Regular Expression Perl

while(){
    print if s/\S/*/g;
}
__DATA__
    A
    AAA
    AAAA