The result shows why it is good to know what /g does in scalar mode, and why pos() is a nice function to have.
This builds an array of the locations right after the space. This was perfect for me since I wanted to know where the next column would begin, but that is not always the ideal choice.
my @pos; while ($line =~ / /g) { push @pos, pos($line); }
In reply to Locate char in a string by tilly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |