in reply to perl Regex

Anonymous Monk,
Here is a complete working script:
#!/usr/bin/perl use strict; use warnings; use Text::xSV; my $csv = Text::xSV->new( 'filename' => 'domain.txt', 'sep' => '|' ); while ( my $row = $csv->get_row() ) { for ( 0 .. $#$row ) { if ( $row->[$_] eq 'DOMAIN' ) { print "Domain: $row->[ $_ + 1 ]\n"; last; } } }
Cheers - L~R