in reply to Re: using sub routines and solving an issue i have with passing variables
in thread using sub routines and solving an issue i have with passing variables
im just trying to get my head around it is all :)sub tear_down{ my ($dataFile) = @_; open my $file, '<', $dataFile || die "$!"; my count = 3; for ( my $i = 1 ; $i <= $count ; $i++ ) { seek to bytes in file; read x bytes into $data ; parse_file_1($data) ###### but how would i loop so first $data goes to parse_file_1, seco +nd $data would go to parse_file_2 ect? ###### would i have to send it to another sub that could count each o +ne? and if count = 1 send to parse_file_1 ###### and if count=2 then send to parse_file_2 ect ect? cz nested lo +ops give me unexpected results alot of times } }
|
|---|