in reply to delimited files
This does not handle quoted fields. But in my exp. quoted CSV-files are seldom used, so I'll leave it as it is.my @delim = (",", ";", ":", "\t"); my $line = "This;is;delimited;with;a;semicolon,;and;there;is;a;comma"; for ( @delim ) { print "possibly delimited with $_\n" if $line =~ /([^$_]+$_){2,}/; } # prints "possibly delimited with ;"
|
|---|