Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
Don't ask to ask, just ask
 
PerlMonks  

kensaigm's scratchpad

by kensaigm (Pilgrim)
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 contemplating the Monastery: (8)
As of 2014-04-20 06:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls