Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

kensaigm's scratchpad

by kensaigm (Friar)
on May 30, 2007 at 23:31 UTC ( #618352=scratchpad: print w/ replies, xml ) Need Help??

#!/usr/bin/perl ### # # Find and compare account lists # ### use strict; use warnings; my $inputfile = qq/FOO.TXT/; my $custdfile = qq/Bar.csv/; # # parse company out file # my @inputdata; # global comparable local *INFILE; open INFILE, "<$inputfile" or die; while(<INFILE>){ my @accntdata=split(/,/, $_); @inputdata = splice(@accntdata,3); } close(INFILE); # # parse the customer supplied file # my @accntinfo; # global comparable local *CUSFILE; open CUSFILE, "<$custdfile" or die; while(<CUSFILE>){ $_ =~ s/\n//g; @accntinfo = $_; } close(CUSFILE); my $acctcomp; foreach $acctcomp (@inputdata){ my @matches = grep(/$acctcomp/,@accntinfo); print "$matches[0]\n"; }
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2015-07-05 21:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls