Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Column by Column Comparison

by moritz (Cardinal)
on Mar 31, 2013 at 13:53 UTC ( #1026357=note: print w/replies, xml ) Need Help??

in reply to Column by Column Comparison

You should really begin your programs with

use strict; use warnings;

It catches several potential errors in your script:

Scalar value @elements[0] better written as $elements[0] at lin +e 13. Scalar value @filtered[$count] better written as $filtered[$count] at line 21. Scalar value @elements[$count] better written as $elements[$count] at line 21. Scalar value @filtered[$count] better written as $filtered[$count] at line 22. Scalar value @elements[$count] better written as $elements[$count] at line 22. Bareword "easy" not allowed while "strict subs" in use at line +15. had compilation errors.

(The latter is just an artifact from you not using a comment when you should).

Second you should indent your code consistently, indenting the contents of each block by a fix amount more than the code outside the block.

And third, it would be much easier to help you if your provided some example input data so that we can run your code, and then tell us what you get, and what you expected instead.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1026357]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2018-03-18 12:19 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (230 votes). Check out past polls.