in reply to Re^2: word with some number in between
in thread word with some number in between

The /^$+ part makes no sense. If you you just want to test for the presence of digits then a simple /[0-9]/ will work splendidly.

Replies are listed 'Best First'.
Re^4: word with some number in between
by Happy-the-monk (Canon) on Jun 29, 2013 at 11:28 UTC

    Continuing hippo's advice, you should continue to the grep part next.

    Cheers, Sören

    (hooked on the Perl Programming language)

Re^4: word with some number in between
by Anonymous Monk on Jun 29, 2013 at 11:33 UTC
    but since /0-9/ can be anywhere in the word , not necessarily in beginning or end

      Precisely. eg.

      $ perl -e 'print "Matched.\n" if "foo8baz" =~ /[0-9]/;' Matched. $ perl -e 'print "Matched.\n" if "foobaz" =~ /[0-9]/;'