http://qs321.pair.com?node_id=674731


in reply to Regex - counting number of '|'

this one works for me:

use strict; my $inp_row = "per|l|mo|nks|ro|ck|s"; print $inp_row =~ tr/\|/\|/, "\n";
HTH,
Mickey

Replies are listed 'Best First'.
Re^2: Regex - counting number of '|'
by ikegami (Patriarch) on Mar 18, 2008 at 07:54 UTC
    He specifically said he didn't want to hardcode the character, so no good.
      Hi guys!

      Thanks a lot for takin the time out for this...!! I m really grateful...!! I am new to perl and was havin a really tough time with these things... but things are now slowly falling into place....!!

      Again... thanks..!!