On Tue, 18 Jan 2005 01:08:56 +0100, Jenda Krynicky <[EMAIL PROTECTED]> wrote:
> foreach my $line () {
> if ( $line =~ /^[^,]*(?:,[^,]*){10}$/) ) {
> print OUT $line;
> }
> }
>
> That is check whether the full string is "something not containing
> comma followed by ten times comma
From: Tor Hildrum <[EMAIL PROTECTED]>
> I have the following code in a script I'm writing:
>
> foreach my $line () {
> 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
Tor Hildrum wrote:
Hi,
Hello,
I have the following code in a script I'm writing:
foreach my $line () {
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 b
> Hi,
>
> I have the following code in a script I'm writing:
>
> foreach my $line () {
> 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 wil
Hi,
I have the following code in a script I'm writing:
foreach my $line () {
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 probably m