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

Necos's scratchpad

by Necos (Friar)
on Jun 04, 2004 at 18:06 UTC ( #361081=scratchpad: print w/replies, xml ) Need Help??

#!/usr/bin/perl use strict; use warnings; use Text::CSV; my $file1 = 'hr_sorted.csv'; my $file2 = 'log.csv'; open('F', $file1) || die $!; open('S', $file2) || die $!; my (@first, @second); my $csv = Text::CSV->new(); while (<F>) { chomp; $_ =~ s/\r//g; push(@first,$_); } close(F); while (<S>) { chomp; $_ =~ s/\r//g; push(@second,$_); } close(S); my %slcs = ( 'ML' => 'H.E.R.O', 'EC' => 'College Gateway', 'SJ' => 'So +cial Justice', 'GI' => 'Global T.E.A.M', 'LS' => 'R.E.A.Ch', 'CM' => 'Communication Media Technology'); my @id; my $c = 0; my @index; my @res; for (@first) { print $_,$/; $csv->parse($_); my @line = split(/\,/,$_); print Data::Dumper::Dump(@line); my $lname = $line[0]; $lname =~ s/\s+/ /g; $lname =~ s/\s+$//; $lname = lc($lname); my $fname = $line[1]; print "$fname\n"; $fname =~ s/\s+/ /g; $fname =~ s/\s+$//; $fname = lc($fname); print length($line[3]),$/; next;
Produces this error:
CONDE,YESENIA MARGARITA,7/4/1990,LS Use of uninitialized value in subs +titution (s///) at mlist.pl line 46. Use of uninitialized value in concatenation (.) or string at mlist.pl +line 50. Use of uninitialized value in substitution (s///) at mlist.pl line 52. Use of uninitialized value in length at mlist.pl line 54. ,12,A,Los Angeles Hi ,WG1A
On this line:

CONDE,YESENIA MARGARITA,7/4/1990,LS ,12,A,Los Angeles Hi ,WG1A
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[ambrus]: Today I accidentally cut my hand while carrying a computer. On the display part of the motherboard that sticks out at the back of the chasis and has ports, there's this thin metal sheet with holes cut for the ports, to guide plugs into the sockets.
[ambrus]: This sheet has sharp needle-like parts, 0.004 long and less than 0.001 wide, that can get bent to point outwards, and one of these cut into my palm when I lifted the box.
[ambrus]: So now when I choose what motherboard to buy for my new home computer, I have one more specific property to guide me. Useful, because there's so many different boards to choose from.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-01-16 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.