#!/usr/bin/perl use warnings; use strict; # add semicolon here my $file = shift @ARGV; open FILE, $file or die "Can't read $file: $!\n"; # fix quotes here while () # add parentheses and fix spelling of FILE { # Splitting this into three lines doesn't fix any bugs, but it # makes it easier to read: s/#.*//; s/^\s+|\s+$//g; # Add missing / next if /^$/; print "$_\n"; }