I get this in return... Use of uninitialized value in concatenation (.) or string at C:\scripts\Xsv.pl l ine 26, <STDIN> line 392. I still not know where I put in what I am searching for. and I need to search two fields "Recipient-Address, Sender-Address" If my search word "Auser" (case should not matter)is in either field the give me the 5 columnsuse strict; use warnings 'all'; use Text::CSV_XS; open STDIN,"c:\\scripts\\20051030.log" or die $!; my $columns; open STDOUT, ">Answers.out" or die "can't redirect stdout"; my $parser = Text::CSV_XS->new ({sep_char => "\t"}); while (<STDIN>) { next if ! length $_; if (! $parser->parse ($_)) { warn "Error parsing: $_"; next; } my @columns = $parser->fields(); next if ! defined $columns[20]; print "$columns[0], $columns[1], $columns[7], $columns[18], $columns [19]\n"; }
In reply to Re^2: Extracting data from each line that matches a email address from a Log file (Tab delimited)
by Motomo94
in thread Extracting data from each line that matches a email address from a Log file (Tab delimited)
by Motomo94
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |