Hi,
I have the following code in a script I'm writing:
foreach my $line (INN) {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there is :)
The script will be reused and
Hi,
I have the following code in a script I'm writing:
foreach my $line (INN) {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there is :)
The script will be
Tor Hildrum wrote:
Hi,
Hello,
I have the following code in a script I'm writing:
foreach my $line (INN) {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there is :)
The script
From: Tor Hildrum [EMAIL PROTECTED]
I have the following code in a script I'm writing:
foreach my $line (INN) {
if ( 10 == ($line =~ s/,/,/g) ) {
print OUT $line;
}
}
Is this poor style? It looks a bit ugly, but I can't figure out a
better way to do it. I'm sure there
On Tue, 18 Jan 2005 01:08:56 +0100, Jenda Krynicky [EMAIL PROTECTED] wrote:
foreach my $line (INN) {
if ( $line =~ /^[^,]*(?:,[^,]*){10}$/) ) {
print OUT $line;
}
}
That is check whether the full string is something not containing
comma followed by ten times comma and