in reply to Using perl interactively with VI
I answer question 1 only. You can use this code:
This chops off the first character from $string, and puts it into $char.$string=~ s/(.)//s; $char= $1;
There's also an other solution:
which does the same.$char= substr ($string, 0, 1, "");
|
|---|