Help for this page

Select Code to Download


  1. or download this
    ($chopped) = $s =~ s/^(.)//s;
    # or
    $s =~ s/^.//s;
    
  2. or download this
    substr($s, 0, 1) = "";  # no way to get the value back, though...
    # Note: you need the parens. Precedence of the assigment is higher tha
    +n that of the comma.
    
  3. or download this
    $chopped = substr $s, 0, 1, "";
    # or
    substr $s, 0, 1, "";