The first of these does not work for me (at least on perl 5.005_03) The second is cunning enough though.
perl -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
The first one will work with a minor tweak
perl -lpe 'substr($_, 0, 1) = "" '
test
est
Cheers, R. |