#!/usr/bin/perl #<--------------------------# Where are 'use strict;', 'use warnings;'? open $fb, "myfilename.txt"; # What if the file is missing? while ($line=<$fb>) # What if you forgot you're using $line elsewhere? { #<------------------# Perl ignores whitespace but why be messy? chomp($line); if ($.=<>){ # `=` is not a comparison operator! print length "$line"; # ^---------# ... and then a newline character? } # Odd indentation makes it hard to tell what this matches. #<----------------------# Perl ignores whitespace but why be messy? }