[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] <MAIL> chunk 113. ?



At 09:45 -0400 10/11/99, Karl Long wrote:
> This works fine but when I add the $file++; then I get:
> Use of uninitialized value, <MAIL> chunk 113.

> $file=0;  #init my file count

> 	$file++; #if I take this out it runs fine

> print STDOUT "this is $auther[$file] and the file is $outPath$file\n
> and this is the @auther\n\n";

At 11:06 -0400 10/11/99, Paul Schinder wrote:
> It's the print
> statement that's giving you the errors (for some reason).

For the reason that you are printing @auther, the auther array, and
$auther[0] is uninitialized.

You init'd $file to 0 but bumped it to 1
   $file++
before ever using it in the auther array.  So $auther[0] is empty,
$auther[1] holds your first From string.

If you take out the $file++, then $auther[0] holds the first From: string
and it's not empty (uninitialized).

- Vicki
Vicki Brown <vlb@cfcl.com>         ZZZZzzz |\      _,,,---,,_
http://www.cfcl.com/~vlb                   /,`.-'`'    -.  ;-;;,_
Journeyman Sourceror: Scripts & Philtres  |,4-  ) )-,_. ,\ (  `'-'
P.O. Box 1269  San Bruno  CA  94066      '---''(_/--'  `-'\_)
 

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org