Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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 romping around the Monastery: (7)
As of 2014-09-23 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (216 votes), past polls