new2jscript
Technical User
I am looking to loop through a file containing lines of such:
1345672|1
4833891|9
7921648|2
The intended logic is if x matches the first number (before the pipe) then set $secondnumberval to the second number (after the pipe).
I've some basic experience with perl. With perl this can be accomplished with simple pattern memory/buffering or splitting. I'm new to javascript and have been unsuccessful in finding anything similar. Any help would be greatly appreciated
1345672|1
4833891|9
7921648|2
The intended logic is if x matches the first number (before the pipe) then set $secondnumberval to the second number (after the pipe).
I've some basic experience with perl. With perl this can be accomplished with simple pattern memory/buffering or splitting. I'm new to javascript and have been unsuccessful in finding anything similar. Any help would be greatly appreciated