Any ideas, without touching each character in the string?#!/usr/bin/perl -w use strict; my $variable = "123g 321 123 g 321"; if ($variable =~ /g/) { #need the position of the first g here #which, should be 3 }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |