in reply to Skip a line

If what is meant by the first line is this
print DATAFILEOUT "$company_name|$time|$email|$member1|$member1phone +|$data|$expiretime|$pictureurl|$password|$website|$member2|$member2ph +one|$address|$citystatezip|$fax|$catlisting\n";
you can just comment out the line. If on the other hand the first line is the first variable in the array @temp (aka $temp[0]). Then you can always just skip it using a for loop as follows.

Instead of

print DATAFILEOUT @temp;

try something like:

for (1 .. $#temp) { print DATAFILEOUT $temp[$_]; }
or the more readable

my $temp_length = @temp; for my $current_array_index ( 1 .. ($temp_length - 1) ){ print DATAFILEOUT $temp[$current_array_index]; }

-enlil

Replies are listed 'Best First'.
Re: Re: Skip a line
by sauoq (Abbot) on Nov 11, 2002 at 20:42 UTC

    for (1 .. $#temp) { print DATAFILEOUT $temp[$_]; }
    or the more readable
    my $temp_length = @temp; for my $current_array_index ( 1 .. ($temp_length - 1) ){ print DATAFILEOUT $temp[$current_array_index]; }

    What in the world would make you think that second example is more readable than the first?

    Not that I would go to all that trouble anyway...

    print DATAFILEOUT @temp[1..$#temp];
    Now, that's readable! ;-)

    -sauoq
    "My two cents aren't worth a dime.";