Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

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]
[Mr. Muskrat]: (considered) Re^3: Please help with Regexp::Common needs to be reparented to Re^2: Please help with Regexp::Common
[Mr. Muskrat]: Is it just me or does that timeout issue seems to be happening more often lately?
[Corion]: Mr. Muskrat: I'm not sure if it really happens more often, but I don't exactly know either
[LanX]: yep
[LanX]: more often for some weeks now
[Corion]: I think I'll have to manually (as god) intervene with that node, as the simple reparenting didn't seem to fix the parent/child relationship of the nodes
[Corion]: I think I have an idea but I'll have to open a ticket with on that - hopefully I get to that on the weekend
LanX imagines a burning thorn bush
[Mr. Muskrat]: Thank you!
[Mr. Muskrat]: Oh that is odd. I got the message that it was reparented but yeah, it didn't actually do it. lol

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2017-01-19 16:24 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (170 votes). Check out past polls.