in reply to Chop command that removes the first character

a simple regex will help you, the beauty of perl :-D
$_="monkey" ; s/^.(.*)$/$1/; print

hope this helps..
--
to ask a question is a moment of shame
to remain ignorant is a lifelong shame

Replies are listed 'Best First'.
Re^2: Chop command that removes the first character
by tachyon (Chancellor) on Oct 26, 2004 at 10:36 UTC

    Actually you want s/^.//s You need the /s to make a . match *anything* - it does not by default. Also why capture to $1 only to replace it with an exact replica?

      i don't know... i'm just a beginner, beginners make mistakes :-D
      so i'm sorry: i just assumed the first character would never be a newline (that's the only thing the /s does actually.. it allows you to also match a newline with the .)
      --
      to ask a question is a moment of shame
      to remain ignorant is a lifelong shame