Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Extracting DNC issues

by MoodyDreams999 (Beadle)
on Oct 06, 2023 at 21:39 UTC ( [id://11154840]=note: print w/replies, xml ) Need Help??


in reply to Re: Extracting DNC issues
in thread Extracting DNC issues

No, I'm trying to do if the number doesn't exist in combined numbers then it should be dnc All I'm doing is comparing phone numbers, we get one set of numbers, we run that through black list, we get fdnc and clean from that number set. so I take clean and fdnc against All the numbers basically whatever is left over in all and that isnt in the other 2 is the dnc numbers.

Replies are listed 'Best First'.
Re^3: Extracting DNC issues
by chromatic (Archbishop) on Oct 07, 2023 at 17:09 UTC
    I'm trying to do if the number doesn't exist in combined numbers then it should be dnc

    I understand that, but $dnc retains the previous value you assigned every time through the loop, so I wonder if that's what you intended. If you move the declaration and assignment into the loop, $dnc will be an empty string unless the current number doesn't exist in combined numbers.

    I don't know if that's what you want though.


    Improve your skills with Modern Perl: the free book.

      Yes, so that was probably the issue I was having. DNC isnt a column until we create it, so it should be an empty string unless the current number doesn't exist in combined numbers. Isn't it in the while loop though, the ending bracket for while loop is after that statement
        Isn't it in the while loop though

        Not in the code you posted:

        my $dnc_col = ''; while (my $row = $csv->getline($input))

        Unless I misunderstand your intention, I think you should swap the order of these two lines.


        Improve your skills with Modern Perl: the free book.

Re^3: Extracting DNC issues
by NERDVANA (Curate) on Oct 07, 2023 at 03:59 UTC
    Until this reply, I had no idea what you meant by DNC. I still don't know the significance of the other terminology, either, like "cleaned" or "combined". And without input or output I just kind of shrugged and moved on. You seem to assume we know something about these files you're processing.

    I'd suggest restructuring the post to start with what you expect to accomplish with the code, a short example of input, the incorrect output you get now, and what correct output would look like.

      Until this reply, I had no idea what you meant by DNC

      A simple google would have told you that DNC refers to either Democratic National Committee or District of North Carolina.

      FDNC is easier, clearly referring to the fascinating book, The Future Does Not Compute: a philosophical exploration of some of the darker aspects of computers, with a probing emphasis on networked computers that mimic true communities. :)

        ++ LOLFOFLRATGSEAUSU :-)

        — Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11154840]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-05-30 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found