$ perl -wle ' $line = " This is a test."; if ( $line =~ m/(\S)/g ) { print pos($line); } ' 4
In reply to Re: find the starting character position in a line
by linuxer
in thread find the starting character position in a line
by hifirock
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |