Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Is this possible in any form? Doing this, perl seems to get mad and crash & burn. If I do$fh[0] = "file1"; $fh[1] = "file2"; $fh[2] = "file3"; open($fh[0], "path/to/file/$fh[0]"); while(<$fh[0]>) { ... } close($fh[0]);
It tells me that I cannot use "file1" as a filehandle. Any suggestions?while($fh[0]) { ... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dynamic File Handles
by trammell (Priest) on Jun 06, 2005 at 20:43 UTC | |
by Anonymous Monk on Jun 06, 2005 at 21:02 UTC | |
by cmeyer (Pilgrim) on Jun 06, 2005 at 21:07 UTC | |
Re: Dynamic File Handles
by jeffa (Bishop) on Jun 06, 2005 at 20:27 UTC | |
by Anonymous Monk on Jun 06, 2005 at 20:34 UTC | |
by cmeyer (Pilgrim) on Jun 06, 2005 at 20:54 UTC | |
Re: Dynamic File Handles
by eyepopslikeamosquito (Archbishop) on Jun 06, 2005 at 20:56 UTC | |
Re: Dynamic File Handles
by ivancho (Hermit) on Jun 07, 2005 at 02:08 UTC |