On Jan 30, kasi ramanathen said: >i want to just use a pos function to indicate the position of the match.
pos() doesn't tell you that. It tells you where the NEXT match will START looking. If you're using Perl 5.6 or later, you can use the $-[0] variable (that is element 0 of the @- array) to get the starting position of the current match. If you're using an older version of Perl, you'll have to do something like pos($str) - length($&) -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]