B
Bill H
If I use the following to load a file into an array, is there a simple
way of reversing the arrays contents?
open(FILE,"sometextfile.txt");
@THETEXTFILE = <FILE>;
close(FILE);
So $THETEXTFILE[0] holds line 1, [1] holds line 2 ect. other than doing
something like this is there a way to reverse the values?
for($i = @THETEXTFILE -1;$i >=0;$i++)
{
$THENEWFILE[@THENEWFILE] = $THETEXTFILE[$i];
}
I am just typing this in, not pasting actual code.
Bill H www.ts1000.us
way of reversing the arrays contents?
open(FILE,"sometextfile.txt");
@THETEXTFILE = <FILE>;
close(FILE);
So $THETEXTFILE[0] holds line 1, [1] holds line 2 ect. other than doing
something like this is there a way to reverse the values?
for($i = @THETEXTFILE -1;$i >=0;$i++)
{
$THENEWFILE[@THENEWFILE] = $THETEXTFILE[$i];
}
I am just typing this in, not pasting actual code.
Bill H www.ts1000.us