JSAWS has asked for the wisdom of the Perl Monks concerning the following question:
@FILES = ( 1, 2, 3 ); foreach $FILE (@FILES) { # Open filehandle tailing file written by ssh<br><br> open ( ${fh.$FILE}, "tail -f file$FILE |") || die "can't open file$ +FILE"; while ( ${line.$FILE} = ${fh.$FILE} ) { # Here I do my split on the CSV line and assign to arrays (keepi +ng the # $FILE value as a suffix to the array name)<br><br> @{fields.$FILE} = split(/,/,${line.$FILE}); push @{AAA.$FILE}, ${fields.$FILE[0]}; # .....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Filehandle/array naming
by bliako (Abbot) on Nov 20, 2020 at 11:30 UTC | |
by choroba (Cardinal) on Nov 20, 2020 at 11:38 UTC | |
by bliako (Abbot) on Nov 20, 2020 at 12:57 UTC | |
by choroba (Cardinal) on Nov 20, 2020 at 13:48 UTC | |
by bliako (Abbot) on Nov 20, 2020 at 16:55 UTC | |
| |
by JSAWS (Novice) on Nov 20, 2020 at 11:58 UTC | |
by JSAWS (Novice) on Nov 20, 2020 at 12:00 UTC | |
|
Re: Filehandle/array naming
by Anonymous Monk on Nov 20, 2020 at 13:24 UTC |