|
|
| P is for Practical | |
| PerlMonks |
Re: Can a filehandle name be dynamic?by ELISHEVA (Prior) |
| on Sep 24, 2009 at 12:11 UTC ( #797184=note: print w/ replies, xml ) | Need Help?? |
|
You can store a filehandle is a variable, so why not use an array of filehandles, e.g. open($aFiles[$i], ">>"$filename")? Note: apparently print doesn't like print $aFiles[$i] "Some text" so you will have to assign the file handle to a scalar before using it, something like this:
Best, beth
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||