All pastes #573325 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-18 03:07 UTC
rendered paste body
my $filename = $ARGV[0];
    open( FILE, "< $filename" ) or die "Can't open $filename : $!";

    while( <FILE> ) {

            s/#.*//;            # ignore comments by erasing them
                    next if /^(\s)*$/;  # skip blank lines

                            chomp;              # remove trailing newline characters

                                    push
                                    @lines, $_;    # push the data line onto the array
                                        }
                                        close FILE;

                                        print @lines;