At 09:36 -0800 2001.03.09, Christopher Palmer wrote:
>In the following code:
>
>foreach $file_name ( @file_list ) {
>print "$i - " . "$file_name";
>$i ++;
>}
>
>why is the output
>
>1 - filenameA
>filenameB
>filenameC
>
>instead of
>
>1 - filenameA
>2 - filenameB
>3 - filenameC
Because @file_list = "filenameA\nfilenameB\nfilenameC\n" instead of
("filenameA\n", "filenameB\n", "filenameC\n"). It is all one string,
instead of three strings. Perhaps you could show us how you create
@file_list.
--
Chris Nandor [EMAIL PROTECTED] http://pudge.net/
Open Source Development Network [EMAIL PROTECTED] http://osdn.com/