in reply to Re: howto strip the first char of a string?
in thread howto strip the first char of a string?
The first of these does not work for me (at least on perl 5.005_03) The second is cunning enough though.
The first one will work with a minor tweakperl -lpe 'substr $_, 0, 1 = "";' Can't modify constant item in scalar assignment at -e line 1, near """ +;" Execution of -e aborted due to compilation errors. perl -lpe 'substr $_, 0, 1, "";' this is his is
Cheers,perl -lpe 'substr($_, 0, 1) = "" ' test est
|
|---|