in reply to Need to match number other than 1

I need to match a number other than 1.

So you started with matching 1 ? How did you do that?

Read perlre. While you're at it, read How (Not) To Ask A Question, then post the code you tried.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: Need to match number other than 1
by ropey (Hermit) on Nov 29, 2007 at 12:03 UTC
    Am I missing the point here or isnt it just
    if($number != 1) { }

      You miss the "match number" part.

      qwurx [shmem] ~ > perl -wle '$foo = "bar"; print "not 1" if $foo != 1' Argument "bar" isn't numeric in numeric ne (!=) at -e line 1. not 1

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}